1

I recently started using FastMM, now I want to know if is it possible to configure FastMM log file to be a bit more readable so that it can give me direction on where exactly the the memory is being leaked, like specifying the actual unit and function/line number, in most cases I would get something like...

A memory block has been leaked. The size is: 20

This block was allocated by thread 0xE7C, and the stack trace (return addresses) at the time was:

    5005995A [System.pas][System][System.@GetMem][4316]
    5005E99F [System.pas][System][System.TObject.NewInstance][15447]
    5005F292 [System.pas][System][System.@ClassCreate][16757]
    23A606 [FireDAC.Stan.Util.pas][FireDAC.Stan.Util][FireDAC.Stan.Util.TFDBuffer.Create][1516]
    4C46D3 [FireDAC.Phys.IBWrapper][Phys.Ibwrapper.TIBDatabase.$bctr$qqrp29Firedac.Phys.Ibwrapper.TIBEnvp14System.TObject]
    4C4730 [FireDAC.Phys.IBWrapper][Phys.Ibwrapper.TIBDatabase.$bctr$qqrp29Firedac.Phys.Ibwrapper.TIBEnvpvp14System.TObject]
    4CEF79 [FireDAC.Phys.IBBase][Phys.Ibbase.TFDPhysIBConnectionBase.InternalConnect$qqrv]
    E4A553 [FireDAC.Phys.pas][FireDAC.Phys][FireDAC.Phys.TFDPhysConnection.ConnectBase][3161]
    E4A60E [FireDAC.Phys.pas][FireDAC.Phys][FireDAC.Phys.TFDPhysConnection.DoConnect][3187]
    E4B11C [FireDAC.Phys.pas][FireDAC.Phys][FireDAC.Phys.TFDPhysConnection.Open][3361]
    34A14C [FireDAC.Comp.Client.pas][FireDAC.Comp.Client][FireDAC.Comp.Client.TFDCustomConnection.DoInternalLogin][3642]

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

Which does not really give me what I need.

Mike Torrettinni
  • 1,816
  • 2
  • 17
  • 47
Alec
  • 569
  • 2
  • 17
  • 27
  • It's already telling you that - the unit name is in the first set of `[]` (left side of each line) and the line number is in the last `[]` (right side of each line). – Ken White Aug 02 '16 at 12:27
  • Problem with this is that it does not direct you to your code, I have an application which uses alot of units, so this stack trace is so vague, as this memory leak can be in any unit. I need something more meaningful, currently its very hard to detect in my code. – Alec Aug 02 '16 at 12:32
  • 1
    Possible duplicate of [How to get a stack trace from FastMM](http://stackoverflow.com/questions/1130454/how-to-get-a-stack-trace-from-fastmm) – Ken White Aug 02 '16 at 12:38
  • I want something which is in this question, check where he indicates where the memory leak is, but in his case its a question, now I need to know how he made his FastMM log file to specify the exact location of his memory leak, http://stackoverflow.com/questions/10071185/fastmm4-how-to-read-the-log-file?noredirect=1&lq=1 – Alec Aug 02 '16 at 13:17
  • I gave you that information, in the linked post. If you're not going to listen to what we say, why did you post here in the first place? – Ken White Aug 02 '16 at 13:28
  • You need a deeper stack trace. Personally I use madExcept and its stack traces seem more readable. – David Heffernan Aug 02 '16 at 14:51
  • @David yes I need a deeper stack trace, was hoping I can get that with FastMM – Alec Aug 02 '16 at 15:02
  • 1
    My reference to madExcept is that fastmm allows stack traces from other tools like madExcept and EurekaLog and JDGB. But I know you can configure the stack trace depth. Why don't you dig around in the options. You are using the full FastMM aren't you? – David Heffernan Aug 02 '16 at 15:25
  • Yes I am using full FasMM – Alec Aug 04 '16 at 07:09
  • Thanks David, I am finding madExcept very useful! – Alec Aug 05 '16 at 13:47

0 Answers0