

alogrep
Members-
Content Count
205 -
Joined
-
Last visited
Everything posted by alogrep
-
Hi. I tried to open to the Madexcept forum, but I get a FORBIDDEN response. So, I'll kindly ask here. Are these cases false positive leaks : Case 1: this line line is listed in the report if (copy(thisip, 1, 7) <> '192.168') and (pos('127.0.', thisip) <> 1) then Case 2: resultcode := ProcessHttpRequest(method, uri, protocol, ss, keepalive, nosettype, linkclose); and this is the declaration of ProcessHttpRequest function ProcessHttpRequest(Request, uri, protocol, params: string; var keepalive: boolean; var nosettype, linkclose: boolean): integer; Case 3: everywhere I use the degub() procedure, Madexcept lists the line as a leak e.g. debug('ADQUIRE '+ formatdatetime('HH:NN:SS:ZZZ',Now)); procedure debug(s: string); VAR I: integer; begin if (debughook <> 0) OR inparams('Z', I) then begin writeln(F1, s); flush(F1); end; I also see a line "WritetoStream is not supported by TnxCallbackFilterOptioins, but I have no idea to what unit/line of code it refers to. Finally, in the upper pane of the eport I see lsited all the lines that I used to create a stringlist to form a html markup to be transferred: why ? what does it mean? (I attached the report) Thanks for any help. Posserver.exe - 2025-08-25 - 16.31.13 - leak report.mbr
-
Thanks, Kas. Firstly, passing string as const made no difference. as to the ProcessHttpRequest that looks as recursive, it is not recursive, but it is a thread that is created almost continually. The app is an HTTP server: repeat if _stopdeamon or terminated then break; try b:= canread (1000); except on E:SysUtils.Exception do begin debug('****** Canread error: '+e.message); end; end; if b then begin if _stopdeamon then exit; ClientSock:=sock.accept; n:= lastError; if (n=0) then begin try TTCPHttpThrd.create(ClientSock); except on E:SysUtils.Exception do begin debug('TTCPHttpThrd.create ERROR: '+e.message); end; end; end else debug('lasterror='+sock.GetErrorDesc(n)); end; until false; and it is defined here: TTCPHttpThrd = class(TThread) private Sock:TTCPBlockSocket; TrayIconData: TNotifyIconData; ..... ...... public Constructor Create (hsock:tSocket); Destructor Destroy; override; procedure Execute; override; function ProcessHttpRequest(Request, URI,protocol,params: string; var keepalive:boolean; var nosettype,linkclose: boolean): integer; end; It lloks like somehow madexcept gets "confused" with string, AnsiString and Unicodestring. I only use string or AnsiString in the code (is Ansistring the default?). but the most inexcplicalbe this is that madexcept show a leak here: if (copy(thisip, 1, 7) <> '192.168') and (pos('127.0.', thisip) <> 1) then And also for this line debug('ADQUIRE ' + FormatDateTime('HH:NN:SS:ZZZ', NOW)); the repot shows the leak twice:, see attached l.jpg
-
HI. Is there an upgrade option/price from Rad Studio 12.3 to Rad Studio 13? Thanks
-
The IDE keeps freezeng. The event viewer show this erros (repeatedly) Faulting application name: DelphiLSP.exe, version: 29.0.55362.2017, time stamp: 0x67bf9abb Faulting module name: dcc32290.dll, version: 29.0.55362.2017, time stamp: 0x00000000 Exception code: 0xc0000005 Fault offset: 0x00163819 Faulting process id: 0x2638 Faulting application start time: 0x01dbf12428349f04 Faulting application path: C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\DelphiLSP.exe Faulting module path: C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\dcc32290.dll Report Id: c7279363-c4a3-4237-9b9b-6af86a9eca33 Faulting package full name: Faulting package-relative application ID: I am going razy. What can be done to eliminate this error? Submitting reports is of no help, they never answer them.
-
I removed all paths from the IDE library (and Project search path) that where "suspiciouis" or non existing. The problem seems to have gone.
-
Hello. I am stuck with this very strange behavious. "Gelati" is not defineD anywhare in the App. Now If i have this code, IFNDEF it is entirely "broken". procedure clearalltables; var i: integer; {$IFNDEF GELATI} S: STRING; // not work here {$ENDIF} begin {$IFNDEF GELATI} with dm2, floorplantable do begin //not work here cancelrange; filter:='sta.......... Then if I change the code like this procedure clearalltables; var i: integer; {$IFDEF GELATI} S: STRING; // DIMMED. ifdef WORKS {$ENDIF} begin {$ifdef gelati} s:='???'; // DIMMED. ifdef WORKS {$endif} {$IFNDEF GELATI //Ifndef is IGNORED??? with dm2, floorplantable do begin cancelrange; filter:='status =''T'' or status=''S'''; filtered:=true; And hee even more incomprehensible procedure clearalltables1; var i: integer; {$IFDEF GELATI} S: STRING; // DIMMED {$ENDIF} begin {$ifdef gelati} s:='???'; //DIMMED {$eLSE} {$IFNDEF GELATI} //NEITHER {$ELSE} NOR {iFNDEF WORK ?????? with dm2, floorplantable do begin cancelrange; filter:='status ...' end; {$endif} {$endif} end;
-
HI I hope someone can shed some light. I can mke it to work I have this code (pseudo) FUNCTION DOTHERPORT; BEGIN {$ifDEF BO} result :=DoCharges(true,-1,false,False,false,lg('CLOSE CHARGES'),'1',dm2.sysdate.fieldbyname('date').asdatetime) {$else} result := DoCharges(sender=Nil,-1,False,False,FALSE,lg(TDsFancyButton(Sender).Caption),'',0,dm2.sysdate.fieldbyname('date').asdatetime); {$endif} END; function selectreport(sender: Tobject); begin if sender = good1 then {$DEFINE BO} dotherport; end; FUNCTION DOTHERPORT; BEGIN {$ifDEF BO} result :=DoCharges(true,-1,false,False,false,lg('CLOSE CHARGES'),'1',dm2.sysdate.fieldbyname('date').asdatetime) {$else} result := DoCharges(sender=Nil,-1,False,False,FALSE,lg(TDsFancyButton(Sender).Caption),'',0,dm2.sysdate.fieldbyname('date').asdatetime); {$endif} END; function selectreport(sender: Tobject); begin if sender = good1 then {$DEFINE BO} else {$define OLD} dotherport; end; I would expect that the line under {$ifdef BO would execute. Instead it goes to the other line. How does $DEFINE work? Thanks.
-
Hello. I submitted 4 bug reports on Quality Portal. Where/how can I see a response to them? I only got emails telling me the report was received, but I cannot see anything in Quality Portal thats shows the stautus of those reports.
-
Hi I got this neat piece of code froma OpenAI GPT searc type TMyHintWindow = class(THintWindow) protected procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; end; procedure TMyHintWindow.WMLButtonDown(var Message: TWMLButtonDown); begin // Close the hint window when clicked ReleaseHandle; end; I put the first part in the interface section, the second in the implementation. But the the WMLButtonDown (clic left button, right?) never gets triggered. What is missing to make it work? Also, in case I make it work, I lso have set the timerr to hide it after 2 seconds. In the timere I use wh (The TMyHintWindow control) if wh <> Nil then begin wh.releasehandle. wh.free; wh:=Nil; end. How can I make the same inside the WMLButtonDown event? Thanks very much. wh
-
Thanks both. But it still does not work. This is the code. I crated a unit unit myhint; interface uses classes, messages,graphics,controls, comctrls; type TMyHintWindow = class(THintWindow) protected procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; public constructor Create(AOwner: TComponent); override; end; implementation constructor TMyHintWindow.Create(AOwner: TComponent); begin inherited Create(AOwner); Color := clinfobk; end; procedure TMyHintWindow.WMLButtonDown(var Message: TWMLButtonDown); begin // Close the hint window when clicked ReleaseHandle; end; end. unit myhint; interface uses classes, messages,graphics,controls, comctrls; type TMyHintWindow = class(THintWindow) protected procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; public constructor Create(AOwner: TComponent); override; end; implementation constructor TMyHintWindow.Create(AOwner: TComponent); begin inherited Create(AOwner); Color := clinfobk; end; procedure TMyHintWindow.WMLButtonDown(var Message: TWMLButtonDown); begin // Close the hint window when clicked ReleaseHandle; end; end. in the dr: Application.Initialize; HintWindowClass:=TMyHintWindow; Then in the form i include myhint.pas. In the FormCreate I crete the control wh:=TMyhintWindow.crete(nil) The wh constructor is executed (the beakpoint is triggered). But when I clkic on the hintt, the procedure TMyHintWindow.WMLButtonDown(var Message: TWMLButtonDown); begin // Close the hint window when clicked ReleaseHandle; end; is not triggered.
-
HI. I have lost 21 hours on this,. I have a stringrid that I need to make a function work correcly. I store a value of Zero in all cells[13,row]. I pass the grid to another function, and right at the beginning of this function misteriousely that value is changed to '1'; This is the code begin linesdone:=''; // SO FAR IT IS OK, STILL '0' prnums:=Tstringlist.create; with dm2 do begin stationprinters.indexname:='number'; stationprinters.setrange([_mycompname,1],[_mycompname,123]) ; stationprinters.first; while not stationprinters.eof do begin prnums.add(stationprinters.fieldbyname('printernumber').asstring); stationprinters.next; end; stationprinters.cancelrange; end; chekqtys; // AS SOON S IT GETS HERE THE VALUE IS '1'; The even strangerthis is that if I comment out the prnums.add(stationprinters.fieldbyname('printernumber').asstring); the value stays to '0'. But then I cannot use the rest of the function, b/c I need the count and the printerindex that need to be used. The stationprinters table has no relation to the stringgrid whatsoever. Anybody has any hint,clue,suggestion,guessing or anything that can help me avoid going crazy?
-
OK maybe it wasn't clear. The grid is not shown in the code because is unrelated to that peace of code; A more completa chunk of code: procedure printorder(grid: Tstringgrid); begin linesdone:=''; // SO FAR IT IS OK, STILL '0' prnums:=Tstringlist.create; with dm2 do begin stationprinters.indexname:='number'; stationprinters.setrange([_mycompname,1],[_mycompname,123]) ; stationprinters.first; while not stationprinters.eof do begin prnums.add(stationprinters.fieldbyname('printernumber').asstring); stationprinters.next; end; stationprinters.cancelrange; end; chekqtys; // this is a procedure; ..... .... compactgrid() And inside checkqtys() I manipulate the grid. I do not know why but the problem seems to have disappeared. Just as I do not know why it appeared. Maybe b/c deep inside checkqtys() I had a line where I set the cells[13,row to '1'. (but on certain conditions) But why WAY BEFORE it reached that point the value of the grid was changed?
-
HI I ccompiled my app and got a warning about an SDK that needed to be load. I investigated a bit and I noticed that the Target Platform showd Android64. Has anybody experienced his? Maybe there is a keaboard shortcut that can do this and I inadvertently pressed it? I also experienced a lot of bugs that I had posted on IDE and API (I .... read only IDE..). No answer there but this is wat happens: 1. " error cannot write the EXE" 2. some .ccp file that could not assert something. 3. at times, Stepping through with f8, the IDE stops responding have to trminate and restart 4. not too often, but sometimes the PC just get OTALLY unresponsive. The only way out is the power button!
-
HI I ccompiled my app and got a warning about an SDK that needed to be load. I investigated a bit and I noticed that the Target Platform showd Android64. Has anybody experienced his? Maybe there is a keaboard shortcut that can do this and I inadvertently pressed it? I also experienced a lot of bugs that I had posted on IDE and API (I .... read only IDE..). No answer there but this is wat happens: 1. " error cannot write the EXE" 2. some .ccp file that could not assert something. 3. at times, Stepping through with f8, the IDE stops responding have to trminate and restart 4. not too often, but sometimes the PC just get OTALLY unresponsive. The only way out is the power button!
-
HI. Is it only me, or in 12.3 (with patches) there are quite a few bugs? For examples: A) Every second time i make a small change and recompile, I get " error cannot write the EXE" (paraphrased) B) every now and then (more now than then) I get some .ccp file that could not assert something. C) Stepping through with f8, usually after a number of steps. The app,stops responding. I have to get out of the IDE, and restart it. D) This is bad, bad, bad. Not as often as the other problems; this one just freezes the PC. The only way out is the power button! I placed a report on one of the incidents, but I'm not even sure if they got it or not. (Why is it so complicated to send a technical report?)
-
HI. I receive this error (delphi 12,3): F2051 Unit VCLTee.TeeProcs was compiled with a different version of Vcl.Menus.TPopupMenu I searched for Vcl.Menus.TPopupMenu.* but nothing exists on the PC. I searched all the VCLTee.TeeProcs.dcu on the PC (attached file (tee.txt) The only menus file I got is Vcl.Menus.pas, which I included in the app. I tried various combinations of the vcltee in the search path, but none seems to work. By the way, in C:\Program Files (x86)\Embarcadero\Studio\23.0\lib\win32\release C:\Program Files (x86)\Embarcadero\Studio\23.0\lib\win64\debug what the win32/win64 refer to? The O.S. or the app developed (in 32 bit or 64bit)? Also. i should use the dcu from the debug folder in 23.0 if i am compiling my app in debug mode and the one from the release folder in 23.0 if i am compiling in release mode? tee.txt
-
showmessage('mymessage') opend 1 of my forms that cannot close unless i exit the application
alogrep posted a topic in VCL
HI. This is a mysterious behavior that I had never encountered for decades I have 2 showmessage(), then a messagedlg, then THIS problematic showmessage, a simple showmessage('mymessage').. The vcl.dialogs.pas (line 6940 on 12.3) Result := mrNone; if LTaskDialog.Execute then Result := LTaskDialog.ModalResult; when it gets to LTaskDialog.Execute if shows the message alright but it ALSO makes my custom form visible and I cannot close it in any way. (I must cloe the app) Any idea on how to ovrcome this behavioiur? -
HI. I have some stringgrids that use objects. For most of them the object is simply an integer (MySg.objects[c,r]:=Tobject(mynumber);; A few use complext object that I declare and assign a Create/destroy consctructor/desctuctor. Now when i try to delete an object of the "comples type" all works fine: the destructor takes care of it.. If i do if assigned(MySg.objects[c,r]) then MySg.objects[c,r].free On the Integer type, I get an AV exception. Perhaps the integer type object does not need to be freed. But then how do I inpect if the object is of integer type or not? MySG.objects[c,r].classname gives me a "not acessible" message. Any helop, please?
-
Thank you all. I came up with another solution, wich seems to work The objects are either integer (very low, from 1-8)) or a typed (defined) object. So I do this: s:=''; try s:=objects[c,r].classname; // only the integer objects do not have a classname except end; if s<> '' then objects[c,r].free Anybody sees some unseen problem with this?
-
HI. I hoe there si sombody with Synapse experience willing to help. I am trying to send an email with an embedded image. The html is Trichview created. In the richview part, I add the image like thi (MMis the is TMimeMess object from synapse) for i := 0 to HTMLImages.Count-1 do begin MM.AddPartHTMLBinary(HTMLImages[i].Stream,HTMLImages[i].Name,'<'+HTMLImages[i].Name+'>',MultiPartRel); end; in the synpase part I have this funcion (by synapse) function TMimeMess.AddPartHTMLBinary(const Stream: TStream; const FileName, Cid: string; const PartParent: TMimePart): TMimepart; begin Result := AddPart(PartParent); Result.DecodedLines.LoadFromStream(Stream); Result.MimeTypeFromExt(FileName); Result.Description := 'Included file: ' + FileName; Result.Disposition := 'inline'; Result.ContentID := Cid; Result.FileName := FileName; Result.EncodingCode := ME_BASE64; Result.EncodePart; Result.EncodePartHeader; end; So the disposition IS "inline", but the recipient get the image as an attachment. I really have no idea of what "CID" (Content ID) should be, i i just pass "<filename>" Wher filename is the filename of the embedded image.
-
THanks Olli73. And I found that the error was I did not add the (pure) text before ading the html part. Do you know by the way if Synapse has a way of including a Return-path? It has a Replyto, but I can't find a return-path.
-
Hi. It is a few days that the IDE does not catch unhandled exceptions. For example, if i put a line with a division by zero, it just goes on. Before the system caught it and the app stopped after the error message. I have checked for any 'forgotten' Application OnException in my code, but I found none. The settings in Compile and Linking are shown in the attached picture. What else should I check, please?
-
OOps!. I got confused . What happens is this I have this bit of code begin n:=0; d:=100/n; if d>0 then n:=1; dm2.tabstable.indexname:='xyz'; The first error is ignored, no warning, no message. The second error is caught, but it does notshow the call stack, so I do not know WHERE it happens (in this case yes I know, but is a nightmare when it may happen God only know where)
-
Thanks to all. No, the division by zero was an exampte (and a test I actually didi). It is all exceptions (that are not handled) The more critical one is when I set a table to an index name that does not esxist. The app just exit, no wrnings.
-
HI. Suddenly I am unalbe to create a VCL New Project. When I launch it in the IDE it freezes for a long time. The task manager shows a strange list of proceses (see attached image. This is the project code: (form 3 does nothig, it only contains a stringgrid. Any idea? program Project4; uses Vcl.Forms, Unit3 in 'Unit3.pas' {Form3}; {$R *.res} begin Application.Initialize; Application.CreateForm(TForm3, Form3); Application.Run; end.