AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

FastMM Optionen

Ein Thema von guidobrose · begonnen am 26. Jun 2007 · letzter Beitrag vom 2. Jul 2007
Antwort Antwort
Seite 1 von 2  1 2      
guidobrose
(Gast)

n/a Beiträge
 
#1

FastMM Optionen

  Alt 26. Jun 2007, 08:57
Hallo

ich habe mir jetzt mal FastMM4 herunter geladen, um evtl. Speicherprobleme in meiner Anwendung finden zu können.

Ich habe die Unit auch brav nach Anleitung in die uses Klausel eingebunden und bekomme in meiner Testanwendung auch gleich einen entsprechenden Hinweis. Jetzt hätte ich natürlich gerne eine LOG Datei und eine entsprechend detailiertere Aufschlüsselung, bin aber anscheinend zu blöd dazu den FullDebugMode einzuschalten. Wie geht denn das nun?

Guido
  Mit Zitat antworten Zitat
Nuclear-Ping
(Gast)

n/a Beiträge
 
#2

Re: FastMM Optionen

  Alt 26. Jun 2007, 09:27
Unter Projektoptionen -> Bedingungen

FullDebugMode;LogMemoryLeakDetailToFile
  Mit Zitat antworten Zitat
guidobrose
(Gast)

n/a Beiträge
 
#3

Re: FastMM Optionen

  Alt 26. Jun 2007, 10:48
Sorry, den Menüpunkt kann ich bei mir nicht finden. Ich verwende TurboExplorer.

Ich dachte, das müsste in der FastMMOptions.inc eingestellt werden, aber ich hab keine Ahnung wie.
  Mit Zitat antworten Zitat
bigg
(Gast)

n/a Beiträge
 
#4

Re: FastMM Optionen

  Alt 26. Jun 2007, 11:22
In der von dir genannten Include-Datei findest du verschiedene Compiler-Schalter, die eventuell mit einem Punkt {.$} versehen sind. Diese müßtest du entfernen und deine Anwendung neu übersetzen.


btw: Die Log Optionen heissen auch alle *Log*.
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#5

Re: FastMM Optionen

  Alt 2. Jul 2007, 12:41
Da habe ich auch gemacht, nur kann ich nirgends eine Log-Datei finden:
Delphi-Quellcode:
{Set the following option to do extensive checking of all memory blocks. All
blocks are padded with both a header and trailer that are used to verify the
integrity of the heap. Freed blocks are also cleared to to ensure that they
cannot be reused after being freed. This option slows down memory operations
dramatically and should only be used to debug an application that is
overwriting memory or reusing freed pointers. Setting this option
automatically enables CheckHeapForCorruption and disables ASMVersion.
Very important: If you enable this option your application will require the
FastMM_FullDebugMode.dll library. If this library is not available you will
get an error on startup.}

{$define FullDebugMode}

  {Set this option to perform "raw" stack traces, i.e. check all entries on the
  stack for valid return addresses. Note that this is significantly slower
  than using the stack frame tracing method, but is usually more complete. Has
   no effect unless FullDebugMode is enabled}

  {$define RawStackTraces}

  {Set this option to check for user code that uses an interface of a freed
  object. Note that this will disable the checking of blocks modified after
  being freed (the two are not compatible). This option has no effect if
   FullDebugMode is not also enabled.}

  {.$define CatchUseOfFreedInterfaces}

  {Set this option to log all errors to a text file in the same folder as the
  application. Memory errors (with the FullDebugMode option set) will be
   appended to the log file. Has no effect if "FullDebugMode" is not set.}

  {$define LogErrorsToFile}

  {Set this option to log all memory leaks to a text file in the same folder as
  the application. Memory leak reports (with the FullDebugMode option set)
  will be appended to the log file. Has no effect if "LogErrorsToFile" and
  "FullDebugMode" are not also set. Note that usually all leaks are always
  logged, even if they are "expected" leaks registered through
  AddExpectedMemoryLeaks. Expected leaks registered by pointer may be excluded
   through the HideExpectedLeaksRegisteredByPointer option.}

  {$define LogMemoryLeakDetailToFile}

  {Deletes the error log file on startup. No effect if LogErrorsToFile is not
   also set.}

  {.$define ClearLogFileOnStartup}

  {Loads the FASTMM_FullDebugMode.dll dynamically. If the DLL cannot be found
  then stack traces will not be available. Note that this may cause problems
  due to a changed DLL unload order when sharing the memory manager. Use with
   care.}

  {.$define LoadDebugDLLDynamically}
Und wo muss die FastMM_FullDebugMode.dll hin? Meine Anwendung startet auch ohne diese DLL, obwohl die Option FullDebugMode aktiviert ist.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Christian Seehase
(Co-Admin)

Registriert seit: 29. Mai 2002
Ort: Hamburg
11.105 Beiträge
 
Delphi 11 Alexandria
 
#6

Re: FastMM Optionen

  Alt 2. Jul 2007, 13:55
Moin Michael,

die Log-Datei solltest Du in dem Verzeichnis finden, in dem sich auch die EXE des zu prüfenden Programmes befindet.
Die DLL muss vom OS zu finden sein, wäre also im SYSTEM32 gut aufgehoben.
Tschüss Chris
Die drei Feinde des Programmierers: Sonne, Frischluft und dieses unerträgliche Gebrüll der Vögel.
Der Klügere gibt solange nach bis er der Dumme ist
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#7

Re: FastMM Optionen

  Alt 2. Jul 2007, 14:05
Ich habe sie jetzt in das Verzeichnis gelegt, in dem auch die Exe erstellt wird. Aber da sehe ich nirgends eine Logdatei. Ausserdem braucht die IDE jetzt ewig lange, um das Programme zu beenden, wenn ich das Programm schliesse.

Jetzt ist eine Aufgetaucht. Kann man auch irgendwie raus bekommen in welcher Zeile im Quellcode das Speicherleck auftaucht?
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
CCRDude
(Gast)

n/a Beiträge
 
#8

Re: FastMM Optionen

  Alt 2. Jul 2007, 14:27
Wenn die log-Datei aufgetaucht ist, enthält sie auch Callstacks. Ich nehm hier mal ein Beispiel aus einem alten Log, das ich hier noch nicht ordentlich weggesäubert hab:

Zitat:
Stack trace of when the object was allocated (return addresses):
402E7E [System][@GetMem]
403EC7 [System][TObject.NewInstance]
404172 [System][@ClassCreate]
403EFC [System][TObject.Create]
465615 [..\..\pkFileSysWin.pas][pkFileSysWin][WindowsFindFileList][136]
465B3F [..\..\pkFileSysWin.pas][pkFileSysWin][WindowsFindFileList][214]
46618F [..\pkFileSysWinTest.pas][pkFileSysWinTest][pkFileSysWinTestExecute][50]
466979 [..\pkFileSysWinTest.pas][pkFileSysWinTestDconsole][TestMain][107]
Datei, Funktion und Zeile lässt sich dort finden (von unten nach oben die Aufrufreihenfolge).
In diesem Beispiel ruft TestMain in Zeile 108 die Funktion pkFileSysWinTestExecute auf, welche in Zeile 50 WindowsFindFileList aufruft, welches in Zeile 214 WindowsFindFileList aufruft (overloaded), welches in Zeile 136 ein Objekt anlegt, das später nicht freigegeben wurde (weiter oben im Log wäre zu finden gewesen, daß es sich dabei im ein TStringList handelt).
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#9

Re: FastMM Optionen

  Alt 2. Jul 2007, 14:52
Ich bekomme leider nur so eine Ausgabe:
Code:
--------------------------------2007/7/2 15:58:57--------------------------------
A memory block has been leaked. The size is: 36

Stack trace of when this block was allocated (return addresses):
402FDE
43189E
432E51 
4331C7 
437656 
4388CD
66C94A
405113 
40517B
407BDF

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

The allocation number is: 238

Current memory dump of 256 bytes starting at pointer address 1032E70:
00 00 00 00 0F 00 00 00 F0 21 10 86 63 9C 80 80 00 00 00 00 FF FF FF 00 00 00 00 00 00 00 00 00
84 41 44 FC 80 80 80 80 00 00 00 00 C1 31 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FE 00 00 00 DE 2F 40 00 A1 55 40 00 CC 55 40 00 D7 04 41 00 1F AF 40 00 DE 2F 40 00 A1 55 40 00
E4 55 40 00 5E 7A 40 00 44 6A 93 7C FA 2F 40 00 ED 54 40 00 3A 85 4B 00 AB 50 40 00 5F 53 40 00
79 CC 66 00 4E E6 91 7C D7 6F 81 7C E0 6F 81 7C 00 00 00 00 24 00 00 00 00 00 00 00 B1 BF 22 F7
0C FE 68 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 4E 40 DD 08 00 00 00 00 C1 22 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
03 01 00 00 24 B0 40 00 1B 30 40 00 E9 27 42 00 50 26 42 00 5D 24 42 00 6D 59 43 00 15 5F 43 00
. . . . . . . . ð  !  . †  c œ  €  €  . . . . ÿ  ÿ  ÿ  . . . . . . . . .
„  A D ü  €  €  €  €  . . . . Á  1  . . . . . . . . . . . . . . . . . .
þ  . . . Þ  /  @  . ¡  U @  . Ì  U @  . ×  . A . . ¯  @  . Þ  /  @  . ¡  U @  .
ä  U @  . ^  z @  . D j “  |  ú  /  @  . í  T @  . : …  K . «  P @  . _  S @  .
y Ì  f . N æ  ‘  |  ×  o   |  à  o   |  . . . . $  . . . . . . . ±  ¿  " ÷
. þ  h . €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €
€  €  €  €  N @  Ý  . . . . . Á  " . . . . . . . . . . . . . . . . . .
. . . . $  °  @  . . 0  @  . é  ' B . P & B . ] $  B . m Y C . . _  C .

--------------------------------2007/7/2 15:58:58--------------------------------
A memory block has been leaked. The size is: 52

Stack trace of when this block was allocated (return addresses):
402FDE
404453 
40481A
60D63A
7C9FB91C [SHGetDesktopFolder]
60C5A0 
60D408 
60D4A7 
60D5CE
7E36B6A3 [OffsetRect]

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

The allocation number is: 37897

Current memory dump of 256 bytes starting at pointer address 103FB10:
40 9A 60 00 48 0F 17 00 50 16 17 00 F0 93 03 01 18 84 14 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 30 A4 01 01 D5 5C EB FE 80 80 80 80 80 80 80 80 00 00 00 00 B1 BA 03 01
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BB 92 00 00 A1 55 40 00 CC 55 40 00 7B 56 40 00
2A 5E 40 00 CF 5D 40 00 A5 48 0F 77 8A 4B 0F 77 2A 5E 40 00 CF 5D 40 00 16 88 36 7E ED 54 40 00
4B 64 40 00 D5 63 40 00 27 45 40 00 6A 44 40 00 65 48 40 00 D4 34 45 00 E2 C7 42 00 D8 C5 42 00
55 DB 45 00 26 00 00 00 00 00 00 00 36 B1 AE 71 0C FE 68 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 C9 4E 51 8E 80 80 80 80 80 80
80 80 80 80 80 80 80 80 00 00 00 00 51 FB 03 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@  š  `  . H . . . P . . . ð  “  . . . „  . . . . . . . . . . . . . .
. . . . . . . . 0  ¤  . . Õ  \  ë  þ  €  €  €  €  €  €  €  €  . . . . ±  º  . .
. . . . . . . . . . . . . . . . »  ’  . . ¡  U @  . Ì  U @  . {  V @  .
*  ^  @  . Ï  ] @  . ¥  H . w Š  K . w *  ^  @  . Ï  ] @  . . ˆ  6  ~  í  T @  .
K d @  . Õ  c @  . ' E @  . j D @  . e H @  . Ô  4  E . â  Ç  B . Ø  Å  B .
U Û  E . & . . . . . . . 6  ±  ®  q . þ  h . €  €  €  €  €  €  €  €  €  €  €  €
€  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  €  É  N Q Ž  €  €  €  €  €  €
€  €  €  €  €  €  €  €  . . . . Q û  . . . . . . . . . . . . . . . . . .

--------------------------------2007/7/2 15:58:58--------------------------------
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

1 - 4 bytes: Unknown x 6
5 - 12 bytes: Unknown x 9
13 - 20 bytes: TIEScrollBarParams x 6, TIEMouseWheelParams x 3, TIEFileBuffer x 15, TList x 63, String x 3, Unknown x 9
21 - 28 bytes: TIEVSoftShadow x 6, TPen x 15, TBrush x 30
29 - 36 bytes: TSizeConstraints x 9, TMargins x 9, TPadding x 9, TFont x 24, Unknown x 5
37 - 52 bytes: TPicture x 6, TShellFolder x 19, Unknown x 6
53 - 68 bytes: TStringList x 19, TTimer x 6, TBitmap x 27, String x 2, Unknown x 9
85 - 100 bytes: TShellChangeThread x 2, TBitmapCanvas x 3, TControlCanvas x 6
101 - 116 bytes: TBitmapImage x 27, TIEMask x 3
133 - 148 bytes: TIETransitionEffects x 3, TIELayer x 9
149 - 164 bytes: TIEBitmap x 15
261 - 292 bytes: Unknown x 3
613 - 676 bytes: TIEEdit x 3
757 - 836 bytes: TIETextControl x 3
1141 - 1252 bytes: Unknown x 3
1861 - 2052 bytes: Unknown x 5
2053 - 2260 bytes: Unknown x 3
2261 - 2484 bytes: TImageEnVect x 3

The sizes of leaked medium and large blocks are (excluding expected leaks registered by pointer): 38580, 164020, 164020, 18612, 16308, 17076, 164020, 73908, 41140, 4276

Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.171 Beiträge
 
Delphi 10.4 Sydney
 
#10

Re: FastMM Optionen

  Alt 2. Jul 2007, 14:55
Du brauchst mehr Debuginfos (z.B. TD32-Debuginfos).
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:48 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz