alogrep
Members-
Content Count
173 -
Joined
-
Last visited
Everything posted by alogrep
-
The problem seems to be that Thread ID: 16172 that I do not now where it comes from IN the log of the Thread.Execute it dows now show (I log every threadId with GetCurrentThreadid()). Thread Start: Thread ID: 980. Process Posserver.exe (13768) Thread Start: Thread ID: 16172. Process Posserver.exe (13768) Thread Exit: Thread ID: 16172. Process Posserver.exe (13768) Module Load: PRNFLDR.dll. No Debug Info. Base Address: $53A00000. Process Posserver.exe (13768) Module Unload: PRNFLDR.dll. Process Posserver.exe (13768) Thread Exit: Thread ID: 980. Process Posserver.exe (13768) First chance exception at $76D98FC2. Exception class EAccessViolation with message 'Acc...... The proper way should be is like this: Thread Start: Thread ID: 812. Process Posserver.exe (13768) Module Load: PRNFLDR.dll. No Debug Info. Base Address: $53A00000. Process Posserver.exe (13768) Module Unload: PRNFLDR.dll. Process Posserver.exe (13768) Thread Exit: Thread ID: 812. Process Posserver.exe (13768) But then that Thread ID: 16172 gets in the way and messes things up.
-
This is the relevant code. code.txt
-
Thcode.txtcode.txtanks. It's quite a long code. I triend to avoid tall unnecessary lines...
-
HI. I am trying to figure what the 2 items indicated by the red lines mean. Is there a list of each element of the database definition? Or any other suggestion?
-
Hello everybody. Another one of my misteries . I have created a component Tslim(TComponent); It is basically a table with cells and row that are created dynamically. In a particular procedure that creates new cells and rows, something happens that suddenly the Slim becomes NIL. That is in a try… except block, when the exception is raised, I inspect the value of Slm, and it shows NIL. The Slim.Destroy is not triggered. Is the a way or something (an Event?) that could be triggered the moment this happens so I can find out what exactly causes that?
-
Detect when/what makes a tcomponet descendent is made NIL?
alogrep replied to alogrep's topic in VCL
What I don’t understand is: how come the G variable is set to NIL? From what I have seen if an object is destroyed for say AV, it is destroyed but not set to NIL. A to send more code, it is not feasible because is too long and nobody would take the time or have the patience to read it. I can give the “scheme” I use.. type tgrids=record g1,hgrid,tabgrid,extras,extragrid,groupqty,servgrid,all,mitad1,mitad2:Tslim; end; type OrderLinevars = record grids: Tgrids; myCompname_,pass, curtabtrans:string // and a bunch of other variables; end; type orderlinerec = record id: string; orderline: OrderLinevars; end; type orderlinearr= array of orderlinerec; PtRecord=^OrderLinevars; in main form I have this public orderlines : orderlinearr; TTCPHttpThrd = class(TThread) private Sock:TTCPBlockSocket; orderline: PTREcord; thisip,objs: string; ......... When there is a new POST request, a new thread is created and executed/ in the Execute part, as the first thing, I do FOR N:=0 TO HIGH(MAIN.ORDERLINES) do if (MAIN.orderlines[n].id=thisip) then begin orderline:=@MAIN.orderlines[n].orderline; orderlineindex:=n; break; end; if orderlineindex<0 then begin setlength(main.orderlines,length(main.orderlines)+1); orderlineindex:=high(main.orderlines); MAIN.orderlines[orderlineindex].id:=thisip; orderline:=@MAIN.orderlines[orderlineindex].orderline; end; The "orderline" is used (for brevity) in all calculations inside the execute. I need some variables that are part of the orderlinerec -> OrderLinevars to be persistent; All the grids are set to NIL at the beginning of Execute, freed at the end; For example, a POST requests set some variables that I need to re-use later for another POST request from the same user. Just as lost as before. -
Detect when/what makes a tcomponet descendent is made NIL?
alogrep replied to alogrep's topic in VCL
I found where the problem occurs (see apptached image). However the call stack doesn't go inside the procedure where the problem actually happes. This is the code procedure (g:Tslim; html:string); var c,r: integer; begin C:=0; R:=0; WITH G DO // this is the "slim" component while (HTML <> '') and (html <> ';') and (copy(html,1,5)<>'slim:') DO BEGIN try N:=POS('<col',html); if n>0 then begin if c> colcount-1 then colcount:=c; if alreadytranslated then begin if (g=extras) and (c=0) and (r>0) and (copy(html,1,5) <> _nota) then cells[c,r]:=' '+copy(html,1,n-1) else cells[c,r]:=copy(html,1,n-1); end else if (g=extras) and (c=0) and (r>0) and (copy(html,1,5) <> _nota) then cells[c,r]:=' '+Fromspanish(copy(html,1,n-1)) else cells[c,r]:=FromSpanish(copy(html,1,n-1)); system.delete(html,1,n+3); if (g=extragrid) and (c=0) then begin k:=pos('line-through',html); if (k>0) then begin orderline.disabledrows[r]:=true; system.delete(html,k,12); end; end; n:=pos('color:::',html); if (n=1) then begin if (copy(html,9,4) <> 'null')then begin if copy(html,9,1) ='#' then begin cellcolors[c,r]:=HexcolToTcolor(copy(html,10,6)); system.delete(html,1,15); end else begin cellcolors[c,r]:=HexcolToTcolor(copy(html,9,6)); system.delete(html,1,14); end; end else system.delete(html,n,12); end; k:=pos('<row',html); if k=1 then begin system.delete(html,1,k+3); c:=-1; // inc() below to 0 inc(r); if r> rowcount-1 then rowcount:=rowcount+1; kount:=rowcount; end; inc(c); end else break; EXCEPT showmessage(inttostr(c)+' '+inttostr(r)+' '+sparam); END; end; end; -
Hi. Does anybody know where to find the Dspack packages for Delphi 11? Thank you in advance.
-
HI. I am totally new to multi platform apps, hence I can't make head or tail of what the error may mean. I hope somebody could give me some help. I downloaded a sample app from Github. When I build it for Windows, it is succesfull. When I bild it for Android I get the error: [PAClient Error] Error: E7688 Unable to execute '"C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe" -cp "c:\program files (x86)\embarcadero\studio\22.0\bin\Android\r8-3.0.73.jar" com.android.tools.r8.D8 --release --min-api 23 --output "C:\HMXE_A\multi_Platform_samples\01-HelloWorld\Android64\Debug\HelloWorld.classes" @"C:\HMXE_A\multi_Platform_samples\01-HelloWorld\Android64\Debug\dex_list.txt"' (Error 1) Delphi Alexandria.
-
HI. Is it possible to change font and button sizes in the showmessage() function? (Delphi 11.2)
-
HI dummzeuch. "Changing the standard ShowMessage dialog in any way (different font etc.) will negate these advantages.". I do not want to negate those advantages, but as it is the dialog appears too small in higher resolutions. I would like to resize font size according to the screen resolution so that it would appear the same on any resolution.
-
I have a pre XE app that for 15 years printed all right. The app prints tickets to Epson printers on a LAN. The printers are set up to auto-cut (they stop printing and cut the page after the last line is printed). I recompiled the app to Delphi 11.2 and all works fine, including the printing. But after a day and ½ of operations (not continually, the network is shut down at night) a strange Outcome came to life: the printer did not cut the paper after the last line printed, but continued up to, presumably, the default page length, leaving a long, long white page empty Anybody would have any idea where to start looking into?
-
Thanks, Stano. But the PC on the LAN did not change. The only thing that changed is the EXE: before was a Delphi 7 compiled EXE, now is a Delphi 11.2 compiled. Do you suspect that the new EXE compiled on a Windows 11 with delphi 11 could have some miscomunication with the pre-existing driver (for Windows 7)? Finally the weird thing is that it worked ok fot a day and 1/2. then the problem arose. I re-installed the old EXE and it printed ok. When I went back to the delphi 11 EXE, it printed ok too (so far).
-
Hi. I get the subject error on this line of code SetWindowLong(thisform.Handle, GWL_STYLE, WS_POPUP or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or WS_SYSMENU); The peculiar thing is I get it in one application but not in another application (they both use the identical code and "thisform") I traced it with Ctrl+F7 and this is the sequence that produces th error. Any help, please? SetWindowLong(thisform.Handle, GWL_STYLE, WS_POPUP or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or WS_SYSMENU); function TWinControl.GetHandle: HWND; begin HandleNeeded; Result := WindowHandle; end; procedure _BoundErr; {$IFDEF PUREPASCAL} begin ErrorAt(Byte(reRangeError), ReturnAddress); end; {$ELSE !PUREPASCAL} {$IFDEF CPUX86} asm MOV AL,reRangeError JMP Error end; procedure Error(errorCode: TRuntimeError); begin ErrorAt(Byte(errorCode), ReturnAddress); end;
-
Thanks, Remy. It worked.
-
[PAClient Error] Error: E7684 Could not find program, 'C:\bin\java.exe'
alogrep posted a topic in FMX
HI. Delphi 11.2, windows 10. I tried to build webbrowser.dproj found in C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Mobile Snippets\WebBrowser but I get that error. I tried to put C:\Program Files (x86)\Common Files\Oracle\Java\javapath (where my java.exe resides) in the path, but had no succes. Could someone help, please? -
Memory leak on TBlobField(FieldByname(field_name)).SavetoStream(Stream);
alogrep posted a topic in VCL
Hi. Madexcept shows a leak on this part of my code: TBlobField(FieldByname('image')).SavetoStream(Stream); var Stream: TMemoryStream; .... Stream:=TMemoryStream.create; TBlobField(FieldByname('image')).SavetoStream(Stream); if Stream.Size > 0 then begin FindGraphicClass(Stream.Memory^, Stream.Size, GraphicClass); ..... ///// end; Stream.free; end; Anybody knows that is wrong with my code? -
Memory leak on TBlobField(FieldByname(field_name)).SavetoStream(Stream);
alogrep replied to alogrep's topic in VCL
Ok this is (a bit modified ) code with dm2,memfloorobjects do begin setit(memfloorobjects,'no'); edit; BlobStream:=TnxBlobStream(memfloorobjects.CreateBlobStream(fieldbyname('image'),bmRead)); try if TnxBlobStream(BlobStream).Size > 0 then begin FindGraphicClass(BlobStream, BlobStream.Size, GraphicClass); TnxBlobStream(BlobStream).Position := 0; b:=Tbitmap.Create; b.LoadFromStream(TnxBlobStream(BlobStream)); //line with leak??? try try Image.Picture.assign(b); except on E:SysUtils.Exception do begin if debughook <> 0 then showmessage(inttostr(picno)+' '+E.message); end; end; finally b.free; end; end; finally TnxBlobStream(BlobStream).free; cancel; end; end; Madexcept says that object created there on thah line with ??? leaked. Why? I did free it. -
Memory leak on TBlobField(FieldByname(field_name)).SavetoStream(Stream);
alogrep replied to alogrep's topic in VCL
Thanks. But Madexcept list the line number of TBlobField(FieldByname('image')).SavetoStream(Stream); -
Hello. Delphi 11.2 I have 2 "errors" that show in this page (see errors.jpg). Yet the project builds and runs ok. I can not decipher the nature of the (false alarm?) errors. One is this (see error2.jpg) The declaration of nxcheck is this: type Tnxcheck = class(TForm) nxSimpleSession: TnxSimpleSession; nxRemoteServerInfoPlugin: TnxRemoteServerInfoPlugin; l1: TListBox; nxsock: TnxWinsockTransport; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } public { Public declarations } function ison(s: string): boolean; end; var nxcheck: Tnxcheck; implementation ..... Why create(nil) yields "too many actua parameters"? I have dozenns of create(Nil) in =other places, with no error . The other is shown in error1.jpg. I can't figure what operator is supposed to be missing here. Any help, please?
-
Thanks to everybody. It all disapperad, by itself. I guess "Error insight" was the culprit.
-
HI. It appears that Nexusdb fórums treat any question about data replication as if were radioactive. Nobody touches it. I hope some courageous soul would look at this scheme of data replication to another PC (PC2) on the same LAN . Maybe I am way off: if so an answer “Yes, you are way off” would suffice Have 2 identical data modules, DM1 with aliaspath pointing to the working directory, and DM2 with aliaspath pointing to a backup directory on another PC and running on a separate thread. The datasets in both DM's are identical. I also have a unit (Unit0)accessible to both data modules where I store some variables and structures/records. Each table has a field NOT autoinc "DR" wich is a unique number identifying each record, and an index based on it. I put A) a "GlobalBeforePost" on each table in DM! which saves the dataset state (dsEdit or dsInsert), the record buffer and the "DR" value to Unit0, B) a "GlobalAfterPost" on each table in the first data module (DM1) which calls a function in Unit0. The pseudo code in the function in Unit0 is: Retrieve the dataset state and "DR" If state = dsEdit then begin If not Findkey(DR]) then Raise error End else Append Retrieve record buffer and copy it to the corresponding table in DM2 Post. The entire operation is inside a starttransaction /commit/except. If this scheme is somewhat feasible, I have 2 questions: 1. Could there be a conflict if 2 users at the same time attempt to update the same table? 2. How do you Save/Copy a record buffer?
-
users downloads error an existing connection was forcibly closed by the remote host
alogrep posted a topic in General Help
Hi. Has anyone experienced this error trying to access Registerd Users Download "error an existing connection was forcibly closed by the remote host" Is the site down, or there is (suddenly) a problem in my PC? THanks -
users downloads error an existing connection was forcibly closed by the remote host
alogrep replied to alogrep's topic in General Help
Thanks. That link did not work for me. But this works: https://my.embarcadero.com/#downloadsPage