Einzelnen Beitrag anzeigen

taveuni

Registriert seit: 3. Apr 2007
Ort: Zrich
526 Beitrge
 
Delphi 11 Alexandria
 
#1

FastMM Memory Leaks : Lesen und verstehen von Stacktrace

  Alt 8. Sep 2014, 12:17
Hallo zusammen,
Auf meine alten Tage muss ich in einem mit XE2 erstellten Projekt ein Memoryleak suchen. Ich habe FastMM mit Fulldebugmode eingebunden und schon mal einige Leaks gefixt. Allerdings waren dies beim beenden des Dienstes nicht freigegebene Objekte. Das Problem tritt aber zur Laufzeit auf. Nun: Trotz Suche in diversern Foren haben ich nicht genau herausgefunden wie ich den Stacktrace deuten kann. Zum Beispiel hier:
Code:
A memory block has been leaked. The size is: 12

This block was allocated by thread 0x24A4, and the stack trace (return addresses) at the time was:
404ADE [System.pas][System][@GetMem$qqri][3454]
468660 [System.Generics.Defaults.pas][System.Generics.Defaults][Generics.Defaults.MakeInstance$qqrpvi][145]
468CF3 [System.Generics.Defaults.pas][System.Generics.Defaults][Generics.Defaults.Comparer_Selector_Binary$qqrp24System.Typinfo.TTypeInfoi][760]
4695A4 [System.Generics.Defaults.pas][System.Generics.Defaults][Generics.Defaults._LookupVtableInfo$qqr49System.Generics.Defaults.TDefaultGenericInterfacep24System.Typinfo.TTypeInfoi][1441]
67893A [System.Generics.Defaults.pas][uDetectionObjects][Generics.Defaults.%TComparer__1$20System.Types.TPointF%.Default$qqrv][1642]
673AE8 [System.Generics.Collections.pas][uDetectionObjects][Generics.Collections.%TList__1$20System.Types.TPointF%.$bctr$qqrv][663]
815B8B [uDataStorage.pas][uDataStorage][TDataStorage.GetPolygonFromXml$qqrx20System.UnicodeString][363]
81B21D [uDataStorage.pas][uDataStorage][TDataStorage.AddParkingLots$qqrip25Udetectionobjects.TCameraii][1169]
70A4F5 [MemDS][TMemDataSet.GetFieldData$qqrp14Data.Db.TFieldpvo]
6DF4D4 [Data.DB.pas][Data.DB][Db.TDataSet.FieldByName$qqrx20System.UnicodeString][11805]
8147E2 [uDataStorage.pas][uDataStorage][TDataStorage.GetConfiguration$qqrv][171]

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

The allocation number is: 5291

Current memory dump of 256 bytes starting at pointer address 7EF6CFE8:
5C A6 87 00 01 00 00 00 08 00 00 00 86 14 66 78 00 00 00 00 61 D2 F6 7E 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 82 17 00 00 DE 4A 40 00 6B 5F 40 00 DA 65 40 00 A0 5F 40 00 DA 65 40 00
BF 40 45 00 67 43 45 00 6A 06 6B 00 63 3A 6B 00 8B 91 66 00 2D 43 6B 00 A4 24 00 00 3C 26 00 00
FA 4A 40 00 89 5F 40 00 25 66 40 00 C2 5F 40 00 CF 5F 40 00 51 41 45 00 CF 5F 40 00 A6 43 45 00
CF 5F 40 00 C3 07 6B 00 CF 5F 40 00 08 00 00 00 88 15 40 00 9A 33 A4 85 98 D2 8A 00 80 80 80 80
65 CC 5B 7A 80 80 80 80 00 00 00 00 B1 C7 F6 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
86 18 00 00 DE 4A 40 00 6B 5F 40 00 DA 65 40 00 4E EE 83 00 91 ED 83 00 5E D4 83 00 36 93 26 00
58 FB 45 00 D9 FE 45 00 BE 7B 40 00 8A 33 A9 76 D8 15 00 00 3C 26 00 00 FA 4A 40 00 89 5F 40 00
\      . . . . . . . . .   . f x . . . . a     ~  . . . . . . . .
. . . . . . . .   . . .   J @  . k _  @  .   e @  . *  _  @  .   e @  .
  @  E . g C E . j . k . c : k .     f . -  C k .   $  . . < & . .
  J @  .   _  @  . %  f @  .   _  @  .   _  @  . Q A E .   _  @  .   C E .
  _  @  .   . k .   _  @  . . . . .   . @  .   3            .      
e   [  z         . . . .       ~  . . . . . . . . . . . . . . . .
  . . .   J @  . k _  @  .   e @  . N     .       . ^      . 6    & .
X   E .     E .   {  @  .   3    v   . . . < & . .   J @  .   _  @  .
Es scheint sich um eine generische Liste zu handeln. Aber wo ist springende Punkt um welche Liste/Funktion es sich handelt?
Oder hier:
Code:
A memory block has been leaked. The size is: 12

This block was allocated by thread 0x24A4, and the stack trace (return addresses) at the time was:
404ADE [System.pas][System][@GetMem$qqri][3454]
468660 [System.Generics.Defaults.pas][System.Generics.Defaults][Generics.Defaults.MakeInstance$qqrpvi][145]
468CF3 [System.Generics.Defaults.pas][System.Generics.Defaults][Generics.Defaults.Comparer_Selector_Binary$qqrp24System.Typinfo.TTypeInfoi][760]
4695A4 [System.Generics.Defaults.pas][System.Generics.Defaults][Generics.Defaults._LookupVtableInfo$qqr49System.Generics.Defaults.TDefaultGenericInterfacep24System.Typinfo.TTypeInfoi][1441]
67893A [System.Generics.Defaults.pas][uDetectionObjects][Generics.Defaults.%TComparer__1$20System.Types.TPointF%.Default$qqrv][1642]
673AE8 [System.Generics.Collections.pas][uDetectionObjects][Generics.Collections.%TList__1$20System.Types.TPointF%.$bctr$qqrv][663]
6733A7 [uDetectionObjects.pas][uDetectionObjects][TObjectPolygon.$bctr$qqrii][1137]
671F2B [uDetectionObjects.pas][uDetectionObjects][TObjectSensor.$bctr$qqrii][587]
6729DC [uDetectionObjects.pas][uDetectionObjects][TParkingLot.SetObjectSensorActive$qqrxo][865]
81B1C4 [uDataStorage.pas][uDataStorage][TDataStorage.AddParkingLots$qqrip25Udetectionobjects.TCameraii][1164]
70A4F5 [MemDS][TMemDataSet.GetFieldData$qqrp14Data.Db.TFieldpvo]

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

The allocation number is: 5279

Current memory dump of 256 bytes starting at pointer address 7EF6CF50:
5C A6 87 00 01 00 00 00 08 00 00 00 F7 77 42 79 00 00 00 00 20 7F F6 7E 00 00 00 00 00 00 00 00
68 36 41 00 00 00 00 00 AB 14 00 00 DE 4A 40 00 60 86 46 00 F3 8C 46 00 A4 95 46 00 3A 89 67 00
E8 3A 67 00 8B 5B 81 00 1D B2 81 00 F5 A4 70 00 D4 F4 6D 00 E2 47 81 00 A4 24 00 00 A4 24 00 00
FA 4A 40 00 C6 A4 40 00 C9 A1 40 00 00 A2 40 00 72 A3 40 00 FF BE 7C 00 38 29 77 00 9A 80 7C 00
E8 92 7C 00 36 79 6F 00 76 94 7C 00 0C 00 00 00 00 00 00 00 79 EB 99 87 5C A6 87 00 01 00 00 00
08 00 00 00 86 14 66 78 00 00 00 00 61 D2 F6 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
82 17 00 00 DE 4A 40 00 6B 5F 40 00 DA 65 40 00 A0 5F 40 00 DA 65 40 00 BF 40 45 00 67 43 45 00
6A 06 6B 00 63 3A 6B 00 8B 91 66 00 2D 43 6B 00 A4 24 00 00 3C 26 00 00 FA 4A 40 00 89 5F 40 00
\      . . . . . . . . .   w B y . . . .        ~  . . . . . . . .
h 6  A . . . . .   . . .   J @  . `    F .     F .     F . :   g .
  : g .   [    . .     .     p .     m .   G   .   $  . .   $  . .
  J @  .     @  .     @  . .   @  . r   @  .     |  . 8  ) w .     |  .
    |  . 6  y o . v   |  . . . . . . . . . y       \      . . . . .
. . . .   . f x . . . . a     ~  . . . . . . . . . . . . . . . .
  . . .   J @  . k _  @  .   e @  . *  _  @  .   e @  .   @  E . g C E .
j . k . c : k .     f . -  C k .   $  . . < & . .   J @  .   _  @  .
Es sind hier uDetection.pas und uDataStorage.pas aufgefhrt.

Code:
A memory block has been leaked. The size is: 52

This block was allocated by thread 0x24A4, and the stack trace (return addresses) at the time was:
404ADE [System.pas][System][@GetMem$qqri][3454]
405F6B [System.pas][System][TObject.NewInstance$qqrv][13000]
4065DA [System.pas][System][@ClassCreate$qqrpvzc][14164]
671EE6 [uDetectionObjects.pas][uDetectionObjects][TObjectSensor.$bctr$qqrii][584]
4138C9 [FastMM4.pas][FastMM4][DebugFreeMem$qqrpv][8900]
6729DC [uDetectionObjects.pas][uDetectionObjects][TParkingLot.SetObjectSensorActive$qqrxo][865]
81B1C4 [uDataStorage.pas][uDataStorage][TDataStorage.AddParkingLots$qqrip25Udetectionobjects.TCameraii][1164]
70A4F5 [MemDS][TMemDataSet.GetFieldData$qqrp14Data.Db.TFieldpvo]
6DF4D4 [Data.DB.pas][Data.DB][Db.TDataSet.FieldByName$qqrx20System.UnicodeString][11805]
8147E2 [uDataStorage.pas][uDataStorage][TDataStorage.GetConfiguration$qqrv][171]
8386C0 [uDetectionCore.pas][uDetectionCore][TDetectionCore.OnDatabaseConnected$qqrp14System.TObject][186]

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

The allocation number is: 5273

Current memory dump of 256 bytes starting at pointer address 7EDE0470:
A0 A4 66 00 D0 60 DF 7E E0 62 DF 7E 19 00 00 00 0A 00 00 00 60 00 00 00 64 00 00 00 5C 00 00 00
01 00 00 00 02 00 00 00 02 00 00 00 B0 CF DF 7E 00 00 00 00 8F 68 D5 C4 00 00 00 00 71 0B DE 7E
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BE 14 00 00 DE 4A 40 00 6B 5F 40 00 E9 BB 40 00
DA 65 40 00 DE B9 7F 00 3A B4 7F 00 9B C9 7F 00 92 7A 80 00 70 7B 80 00 26 C0 80 00 EC 5B 81 00
A4 24 00 00 A4 24 00 00 FA 4A 40 00 89 5F 40 00 25 66 40 00 C2 5F 40 00 4F BC 40 00 5B BB 40 00
F9 98 40 00 E9 97 40 00 3F 60 40 00 82 5F 40 00 25 66 40 00 30 00 00 00 10 A8 7F 00 A5 5F A7 86
98 D2 8A 00 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 5A A0 58 79 80 80 80 80 00 00 00 00 B1 04 DE 7E
*    f .   `    ~    b   ~  . . . . . . . . `  . . . d . . . \  . . .
. . . . . . . . . . . .       ~  . . . .   h     . . . . q .   ~
. . . . . . . . . . . . . . . .   . . .   J @  . k _  @  .     @  .
  e @  .       . :     .       .   z   . p {    . &     .   [    .
  $  . .   $  . .   J @  .   _  @  . %  f @  .   _  @  . O   @  . [    @  .
    @  .     @  . ?  `  @  .   _  @  . %  f @  . 0  . . . .     .   _   
      .                                                      
                                Z *  X y         . . . .   .   ~
Hier wird sogar das Objekt: TObjectSensor aufgefhrt und drei units welche von uns sind.
Macht die Reihenfolge der Auflistung einen Sinn? Wenn ja welchen? Villeicht gibt es ja irgendwo eine Erklrung dazu - nur finde ich sie nicht?
Danke fr Eure Anregungen.
Die obige Aussage reprsentiert meine persnliche Meinung.
Diese erhebt keinen Anspruch auf Objektivitt oder Richtigkeit.
  Mit Zitat antworten Zitat