Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.757 Beiträge
 
Delphi 10.4 Sydney
 
#1

FastMM4 detected that a block has been modified after being freed

  Alt 12. Mär 2011, 22:16
Guten Abend,

ich verstehe diese Ausgabe von FastMM4 nicht.

Was gibt es denn dagegen einzuwenden, wenn ein vorher freigegebener Speicher wieder
benutzt wird?


Ich habe eine Applikation die Tracedateien einließt.
Öffne ich eine Datei einmal und zeige die Daten an
danach schließe ich das Programm wieder.
FastMM4 zeigt keine Leaks o.ä. an.

Öffne ich eine Datei einmal, zeige die Daten an.
Schließe diese Datei und öffne die gleiche Datei erneut
wirft mir FastMM4 diese Meldung um die Ohren.

Wenn ich die Tracedatei schließe gebe ich Thread TDecoder frei.
Wenn ich die Tracedatei erneut öffne wird der Thread wieder neu erstellt.

Was soll mir das TThreadLocalCounter.Recycle sagen?

Hat da jemand Erfahrung mit?

Grüße
Klaus

FastMM has detected an error during a free block scan operation. FastMM detected that a block has been modified after being freed.

Modified byte offsets (and lengths): 13(1)

The previous block size was: 76

This block was previously allocated by thread 0xCA4, and the stack trace (return addresses) at the time was:
402EEA [system.pas][System][@GetMem][2648]
403C67 [system.pas][System][TObject.NewInstance][8824]
403FEE [system.pas][System][@ClassCreate][9489]
4AEC96 [decodeTrace.pas][decodeTrace][TDecodeTrace.create]
403CA5 [system.pas][System][TObject.Create][8840]
4AF64C [showTraceForm.pas][showTraceForm][TshowTraces.FormCreate][124]
41444F [sysutils.pas][SysUtils][TThreadLocalCounter.Recycle][16610]
46CE4F [Forms.pas][Forms][TCustomForm.DoCreate][2756]
46CA97 [Forms.pas][Forms][TCustomForm.AfterConstruction][2680]
40405C [system.pas][System][@AfterConstruction][9537]
46CA63 [Forms.pas][Forms][TCustomForm.Create][2676]

The block was previously used for an object of class: TDecodeTrace

The allocation number was: 207867

The block was previously freed by thread 0x168, and the stack trace (return addresses) at the time was:
402F06 [system.pas][System][@FreeMem][2693]
403C85 [system.pas][System][TObject.FreeInstance][8830]
404039 [system.pas][System][@ClassDestroy][9530]
4AED2E [decodeTrace.pas][decodeTrace][TDecodeTrace.Destroy][45]
403CCB [system.pas][System][TObject.Free][8849]
423AE0 [classes.pas][Classes][ThreadProc][9876]
404B36 [system.pas][System][ThreadWrapper][12127]
7C80B729 [Unknown function at GetModuleFileNameA]

The current thread ID is 0xCA4, and the stack trace (return addresses) leading to this error is:
40B6D8 [FastMM4.pas][FastMM4][CheckBlocksOnShutdown][7981]
40C45E [FastMM4.pas][FastMM4][FinalizeMemoryManager][9045]
40C4A6 [FastMM4.pas][FastMM4][Finalization][9126]
4047BB [system.pas][System][FinalizeUnits][11273]
404A53 [system.pas][System][@Halt0][11943]
4B1996
7C90DCBA [ZwSetInformationThread]
7C817077 [Unknown function at RegisterWaitForInputIdle]

Current memory dump of 256 bytes starting at pointer address 7FF851C0:
[Dump entfernt]
Klaus
  Mit Zitat antworten Zitat