Einzelnen Beitrag anzeigen

TiGü

Registriert seit: 6. Apr 2011
Ort: Berlin
3.070 Beiträge
 
Delphi 10.4 Sydney
 
#13

AW: FastMM Memory Error Detected beim Debuggen

  Alt 10. Aug 2012, 16:13
Ich zweifle langsam an mir?!
Entweder FastMM hat nen schweren Bug oder die VCL-Sourcen haben nen Sprung.

Beispielprogramm OHNE DLL Beteiligung im Anhang (mit FastMM_FullDebug.dll).

Delphi-Quellcode:
procedure TMainForm.Test;
var
 str : string;
begin
  str := edt1.Text;
  lbl1.Caption := str;
end;
Wenn ich hier reindebugge und per MouseOver mir die Werte für edt1.Text und für lbl1.Caption im Debug-Hint anzeigen lasse, bekomme ich beim Beenden einen Memory Leak Report für 2 x UnicodeStrings:
Code:
--------------------------------2012/8/10 16:15:27--------------------------------
A memory block has been leaked. The size is: 68

This block was allocated by thread 0x12E4, and the stack trace (return addresses) at the time was:
40618B
405894 
4493CF [Controls.pas][Controls][Controls.TControl.GetText][5554]
20036 
46C6CC [Main.pas][Main][Main.TMainForm.btn1Click][39]
44B049 [Controls.pas][Controls][Controls.TControl.Click][6758]
438903 [StdCtrls.pas][StdCtrls][StdCtrls.TCustomButton.Click][4421]
439371 [StdCtrls.pas][StdCtrls][StdCtrls.TCustomButton.CNCommand][4858]
44AADD [Controls.pas][Controls][Controls.TControl.WndProc][6642]
760525A8 [NotifyWinEvent]
76072FCA [Unknown function at SetKeyboardState]

The block is currently used for an object of class: UnicodeString

The allocation number is: 650

--------------------------------2012/8/10 16:15:27--------------------------------
A memory block has been leaked. The size is: 68

This block was allocated by thread 0x12E4, and the stack trace (return addresses) at the time was:
40618B
405894 
4493CF [Controls.pas][Controls][Controls.TControl.GetText][5554]
20036 
46C6CC [Main.pas][Main][Main.TMainForm.btn1Click][39]
44B049 [Controls.pas][Controls][Controls.TControl.Click][6758]
438903 [StdCtrls.pas][StdCtrls][StdCtrls.TCustomButton.Click][4421]
439371 [StdCtrls.pas][StdCtrls][StdCtrls.TCustomButton.CNCommand][4858]
44AADD [Controls.pas][Controls][Controls.TControl.WndProc][6642]
760525A8 [NotifyWinEvent]
76072FCA [Unknown function at SetKeyboardState]

The block is currently used for an object of class: UnicodeString

The allocation number is: 656

--------------------------------2012/8/10 16:15:27--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

53 - 68 bytes: UnicodeString x 2

Note: This memory leak check is only performed if Delphi is currently running on the same computer. Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".
Angehängte Dateien
Dateityp: zip LittleTestProgram.zip (441,1 KB, 4x aufgerufen)

Geändert von TiGü (10. Aug 2012 um 16:15 Uhr)
  Mit Zitat antworten Zitat