Jump to content

alogrep

Members
  • Content Count

    205
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. alogrep

    Madexcept leaks show false positives?

    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
  2. alogrep

    Madexcept leaks show false positives?

    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
  3. alogrep

    Rad Studio 13?

    HI. Is there an upgrade option/price from Rad Studio 12.3 to Rad Studio 13? Thanks
  4. alogrep

    IDE freezes (DelphiLSP.exe)

    I removed all paths from the IDE library (and Project search path) that where "suspiciouis" or non existing. The problem seems to have gone.
  5. alogrep

    {$IFNDEF broken?

    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;
  6. alogrep

    $DEFINE: how does it work?

    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.
  7. alogrep

    IDE freezes (DelphiLSP.exe)

    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.
  8. alogrep

    THintWindow; exposing the WMLButtonDown event

    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.
  9. 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
  10. alogrep

    Stringgrid cell value changed arbitrarely

    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?
  11. 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?
  12. alogrep

    Quality Porta and Bug report history

    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.
  13. alogrep

    IDE bugs

    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!
  14. 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!
  15. 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?)
×