alogrep
Members-
Content Count
165 -
Joined
-
Last visited
Everything posted by alogrep
-
HI. my package builds ok. But trying to install results in the error The specified module could not be found. I read all the posts I could find on this. it is almost impossible to find the real problem. Could this info get to shade some light? In Process monitor i see these 2 lines with Result NAME NOT FOUND (each repeated twice) C:\Users\1\AppData\Roaming\Embarcadero\BDS\23.0\UserTools.proj C:\HMXE_A\MYCOMPONENTS\mine2.deployproj tHE DPK IS C:\HMXE_A\MY COMPONENTS\MINE2.DPK And the mine2.bpl IS there. P.S. Dependexny walker gives me many many errors on microsoft dlls ???
-
II I have table1.Edit and it stays there indefinitely on one PC, when I do the same (on exactly the same record on another PC, it does not give me any error: it just goes on and I can even POST it. This happens in the last few hours. Until then It worked fine. I was trying to see why in the oneditError, although I had Action= dsAbort it still showed a message, although the documentation says and it would not. In that message window there was a checkbox "Ignore this error in the future" (or something to that effect) that I marked, Since then the lock timeout error does not get triggered. Any help rom anybody, please?
-
Thanks Peter. I find it strange that a question answered at runtime makes a persistent change in the IDE options. Anyway I went further and found out the method of setting those options on the breakpoints-> Advanced. To me it sounds obvious that the debugger intercept the exception before the try/except block. It does not seem so obvious to me that there is ONLY an option to ignore the exception (then it does not even trigger the OnEditError, for example). I would have expected a sub-option: catch it but do not show notification to the end-user. ..
-
WMIService (PrintJobInfo) spanws to the CPU window , ot trigger exceptio.
alogrep posted a topic in VCL
THI. I have the piece of code show below. when it gets to the line FWMIService := FSWbemLocator.ConnectServer it simply opwns the CPU window and does never get tot except section. Running Delphi 12.1 on win 64bit. (The second piece of code shows how the procedure is called). Any idea anybody? procedure GetWin32_PrintJobInfo; const WbemUser =''; WbemPassword =''; WbemComputer = 'localhost'; wbemFlagForwardOnly = $00000020; var FSWbemLocator : OLEVariant; FWMIService : OLEVariant; FWbemObjectSet: OLEVariant; FWbemObject : OLEVariant; oEnum : IEnumvariant; iValue : LongWord; str:String; begin; FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); try FWMIService := FSWbemLocator.ConnectServer('192.168.1.70', 'root\CIMV2', WbemUser, WbemPassword); except on E:EOleException do writeln(e.message); on E:sysutils.Exception do writeln(e.message); end; begin try CoInitialize(nil); try GetWin32_PrintJobInfo; finally CoUninitialize; end; except on E:EOleException do Writeln(Format('EOleException %s %x', [E.Message,E.ErrorCode])); on E:Exception do Writeln(E.Classname, ':', E.Message); end; -
HI. I have this scheme (pseudocode) rery+0 repeat starttransaction; try table1.edit;. change table1; table1 post; commit; except on E: SysUtils.Exception do begin Rollback; table1 cancel inc(retry); if retry>=3 then showmessage & exit else sleep(500); end; end; until retry>=3; end; In table1 OnPostError I have begin ACTION:=DAaBORT; end; Why do I get the error message (regarding a conflict with other users)? That defeats the purpose of the start transaction/commit/rollback setup. DaAbort should NOT show the message, correct? My intent is to retry the edit/post operation 3 times, but if a message shows up with one user, by the time it reads it and closes it, other concurrent users get a timeout error.
-
Hi I have some legacy units with lots of glyph loaded with tpngoject. In my old Delphi the images are show well. In 10.4, they are simply ignored, not shown. If I inspect the DFM loaded in 10.4 the DATA section of the glyph is not present. Is there any way to make those units in 10.4 easier (or faster) than reload the images 1 by 1? ( I would also like to preserve the original unit to be used with the older version). Thanks.
-
Hi. I have this event procedure Tdm2.APostError(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction); begin ACTION:=DAaBORT; end; Then this piece of pseudocode try table.1.edit; table1.post except on E: SysUtils.Exception do begin if islockerror(e.errocode) then repeatit() else dosomethingelse();; end; end; The function islockerror() checks if the error code is one of timeut, table locked, etc. It always returns false because the E.errorcode is always "Operation aborted". How can I get the value of the REAL error that triggered the event? Thanks
-
Hi everybody. I hope somebody could help me with this "leaks" report from FastMM4.. I have no idea what BaseThreadInitThunk and similar mean.. --------------------------------2024/6/27 17:52:48-------------------------------- A memory block has been leaked. The size is: 20 This block was allocated by thread 0x38E4, and the stack trace (return addresses) at the time was: C775C2 [System.pas][System][@GetMem$qqri][4962] C7C6F8 [System.pas][System][@StartExe$qqrp23System.PackageInfoTablep17System.TLibModule][24306] 75F2FCC9 [BaseThreadInitThunk] 77AD7CBE [RtlGetAppContainerNamedObjectPath] 77AD7C8E [RtlGetAppContainerNamedObjectPath] The block is currently used for an object of class: IdThreadSafe.TIdThreadSafeInteger The allocation number is: 7395 --------------------------------2024/6/27 17:52:48-------------------------------- A memory block has been leaked. The size is: 36 This block was allocated by thread 0x38E4, and the stack trace (return addresses) at the time was: C775C2 [System.pas][System][@GetMem$qqri][4962] 18F665B C7C6F8 [System.pas][System][@StartExe$qqrp23System.PackageInfoTablep17System.TLibModule][24306] 75F2FCC9 [BaseThreadInitThunk] 77AD7CBE [RtlGetAppContainerNamedObjectPath] 77AD7C8E [RtlGetAppContainerNamedObjectPath] The block is currently used for an object of class: IdGlobal.TIdCriticalSection The allocation number is: 6886. This is my coce; TTCPEchoDaemon = class(TThread) private Sock:TTCPBlockSocket; public Constructor Create; Destructor Destroy; override; procedure Execute; override; end; Constructor TTCPEchoDaemon.Create; begin inherited create(true); if self.Handle = 0 then raise EThread.CreateResFmt(@SThreadCreateError, ['ECHO Daemon '+SysErrorMessage(GetLastError)]); FreeOnTerminate:=true; resume; sock:=TTCPBlockSocket.create; end; procedure TTCPEchoDaemon.Execute; var ClientSock:TSocket; begin with sock do begin CreateSocket; setLinger(true,10000); bind(SERVERIP,portnumber); listen; repeat if terminated or _stopdeamon then break; if canread(1000) then begin // *** there is code here, but for this test it // *** never gets execute b/c nothing is sent. end; until false; end; end; Destructor TTCPEchoDaemon.Destroy; begin Sock.free; inherited destroy; end;
-
You are right Remy. They come from nexusdb dcu's (nxBaseServerComp, nxServerManager). I will ask them. Thanks
-
Fr0sT.Brutal, hi. Is there an easy way to use addresses instead of coordinates in your OSMMap library? Thanks
-
Hi. Doe anyone have experienced this erro? It just says Thread creation error: with NOTHING shown after the 2 dots. Mayvbe is a ghost error? Thi is my code if lastError=0 then begin prognum:=prognum+1; try TTCPEchoThrd.create(ClientSock,prognum); except on E:SysUtils.Exception do begin showmessage('prognum ='+inttostr(prognum)+' '+E.message); end; end;
-
Thanks Remy Lebeau. What do you mean by "debugging the RTL source code"? My own code here? try TTCPEchoThrd.create(ClientSock); except on E:SysUtils.Exception do begin showmessage('Thread creation error: '+E.message); end; end; Or does that mean the RTL Dephi code? If so, how can I find where the thread failure happens?
-
HI. prognum did nothing exept being used to give a name to a Tnxdatabae created in the execute code; I do not need it. I will eliminate;
-
Thanks Christian. So to know what is the error what should I do, what should I have in EXCEOT ON E: ???
-
Hi. I have this simple code, where the except block is not entered; n:=0; try d:=100/n; except on E:system.SysUtils.Exception do showmessage(e.message); end; I attached the Options->tools configuration and the Project'sone. May I did something foolish, I uninstalled Madacept with revo Uninstaller, before removing it from the IDE packages? Any way to repair this problem?
-
Delphi 12 does not catch EXCEPTIONS ANYLONGER.
alogrep replied to alogrep's topic in Delphi IDE and APIs
Now whatever esception happens it is catched IFF it is inside a try/except block. Otherwise it is ignored and the app goes to a arandom part of the application (mostly it returns to the form that contains the code that was being executed) -
Delphi 12 does not catch EXCEPTIONS ANYLONGER.
alogrep replied to alogrep's topic in Delphi IDE and APIs
Thanks. Ok that was just for testing. However I do not get any exception notifications aymore. If there is any erro, the App just stops the execution. Sometimes it freezes completely. -
type name_struct= record fname: string; lname : string; end; arec= record names : array of name_struct ; age: array of integer; end; type records = array of arec; setlength(records,100); for x :=0 to 99 do load each records[x] When I do records:=Nil, does it free all "names" (and fname, lname) of all recs as well as the recods array itself?
-
I received a message from vcl.dialogs that sai=ys something about a criticalsection conflict (unfortunately I did not write down the message, and is hard to reproduce. It happend twice, then in a dozen trials doing the identical steps it did not show up). I have a Tcriticalsection instance defined in one of my units and it is used in a thread, but it is always used in a acquaire/release pair in a try/finally block. This happened in the IDE, where I have some breakpoints and I stopped the execution for several seconds.
-
HI. I can't understand why Madexcept shows a leak on FIndFirst/FindClose. THis is what I have : type SendThread = class(TThread) private CriticalSection: TCriticalSection; fmods:modslist; tablename: string; savedir: string; dbase: string; uniq: integer; public Constructor Create(afmods:modslist; atablename: string;uniquenumber: int64;asavedir,adbase: string); Destructor Destroy; override; procedure Execute; override; procedure Fields2sTREAM(fmods:modslist; tablename: string; dbase: Tnxdatabase); end; CriticalSection is created in the Create constructor and free-d in Destroy. In the Execute, I have this. CriticalSection.Acquire; try s:=savedir+'\*'+lowercase(dm2.uniquenumber.tablename)+'.db'; if findfirst(s,faAnyFile,sr)=0 then begin Deletefile(savedir+'\'+sr.name); FindClose(SR); end; s:=Format('%.*d',[13, uniq]); s:= savedir+'\'+s+'$pos-'+lowercase(dm2.uniquenumber.tablename)+'.db'; sStream.savetofile(s); finally CriticalSection.Release; end; Any clue anybody?
-
False leak reported on FindFirst/Findclose inside a Threa?
alogrep replied to alogrep's topic in VCL
Well I did say "I'm sorry". Of course if I had "seen" that other part of the code, probably I would not have asked for help. -
False leak reported on FindFirst/Findclose inside a Threa?
alogrep replied to alogrep's topic in VCL
Sorry, there was another FindFirst() very close to the first one without FindClose(). -
False leak reported on FindFirst/Findclose inside a Threa?
alogrep replied to alogrep's topic in VCL
Thanks. But I DO use FindClose() in my code. The "leak report" says nothing more than what is whown in the attached image. -
Hi. I found these 3 lines thata semm VERY suspicious to me in Processmonitor. Is there something wrong with my delphi 12 installations? 04:14:27.0519775 p. m. Explorer.EXE 9964 RegQueryValue HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe NAME NOT FOUND Length: 16 04:14:27.0526399 p. m. Explorer.EXE 9964 CreateFileMapping C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe FILE LOCKED WITH ONLY READERS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE_READ 04:14:27.0902689 p. m. Explorer.EXE 9964 CreateFileMapping C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\bds.exe.config FILE LOCKED WITH ONLY READERS SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE_READ
-
Vcl.ExtDlgs was compiled with a different version of Vcl.Dialogs.TOpenDialog?
alogrep posted a topic in VCL
HI Compiling the first project in delphi 12, I get this error [dcc32 Fatal Error] : F2051 Unit Vcl.ExtDlgs was compiled with a different version of Vcl.Dialogs.TOpenDialog But Vcl.Dialogs.TOpenDialog.pas does NOT EXISTS? dir \Vcl.Dialogs.TOpenDialog.pas /s Volume in drive C is Acer Volume Serial Number is A295-B72F File Not Found What am I missing?