Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FastMM4

76 views
Skip to first unread message

Rich

unread,
Dec 10, 2007, 9:34:12 AM12/10/07
to
I don't find any specific NG (CodeGear or other) for this so here goes...

I can't seem to get the full version of FastMM4 to show me source code line
numbers in the output file. I've tried all the set FullDebugMode, turn on
Map file, etc. suggested in the FAQ that comes with the download. Anyone
else having this problem? What good is it if I can't relate the detected
leaks to my source code?

Arthur Hoornweg

unread,
Dec 10, 2007, 9:54:10 AM12/10/07
to


You also have to turn on the TD32 linker option afaik.

There's a nice video presentation on the Coderage II download site
that shows how to do it. (Day 4, Francois Gaillard)

--
Arthur Hoornweg

(In order to reply per e-mail, please just remove the ".net"
from my e-mail address. Leave the rest of the address intact
including the "antispam" part. I had to take this measure to
counteract unsollicited mail.)

Uffe Kousgaard

unread,
Dec 10, 2007, 10:00:45 AM12/10/07
to
"Rich" <n...@email.info> wrote in message
news:475d...@newsgroups.borland.com...

>I don't find any specific NG (CodeGear or other) for this so here goes...

It is the basm group.


Rich

unread,
Dec 10, 2007, 12:02:47 PM12/10/07
to
"Arthur Hoornweg" <antispam...@casema.nl.net> wrote in message
news:475d...@newsgroups.borland.com...

> You also have to turn on the TD32 linker option afaik.
>
> There's a nice video presentation on the Coderage II download site
> that shows how to do it. (Day 4, Francois Gaillard)

Yep, I followed the FAQ.

Today I uninstalled all of it, watched the video again following along with
all instructions, but I still don't get line numbers or anything other than
addresses for stack traces. Some parts must be working because FastMM honors
the clear file at startup option.

People use it and it worked in the video. But oh well, I'll have to wait
until a newer version of FastMM comes out, maybe one that is less arcane.

Rich

unread,
Dec 10, 2007, 3:47:34 PM12/10/07
to
"Rich" <n...@email.info> wrote in message
news:475d713e$1...@newsgroups.borland.com...

> Yep, I followed the FAQ.
>
> Today I uninstalled all of it, watched the video again following along
> with all instructions, but I still don't get line numbers or anything
> other than addresses for stack traces. Some parts must be working because
> FastMM honors the clear file at startup option.
>
> People use it and it worked in the video. But oh well, I'll have to wait
> until a newer version of FastMM comes out, maybe one that is less arcane.

FastMM works good as a memory manager, so I guess I should have said I'll
have to wait until a new release to use it as a debugging tool.

Markus.Humm

unread,
Dec 10, 2007, 3:53:38 PM12/10/07
to
Hello,

if you look around there is a tool from JED for easier FastMM 4
configuration...

Greetings

Markus

François GAILLARD

unread,
Dec 11, 2007, 9:23:03 PM12/11/07
to
Hey Rich,
Can you show some example of leak report you get from FastMM?
And perhaps the FastMM options and the project options you used?
I've never been unable to get the lines/numbers, except with 3rd party units
where neither sources nor debug dcus were supplied (and which I would
certainly never ever think of using).
My guess is that some option setting is wrong somewhere.
... my $0.02
++ François ++

"Rich" <n...@email.info> wrote in message
news:475d713e$1...@newsgroups.borland.com...

Rich

unread,
Dec 12, 2007, 9:31:21 AM12/12/07
to
"François GAILLARD" <fgaillard [somewhere at] wideorbit.com> wrote in
message news:475f454f$1...@newsgroups.borland.com...

> Hey Rich,
> Can you show some example of leak report you get from FastMM?
> And perhaps the FastMM options and the project options you used?
> I've never been unable to get the lines/numbers, except with 3rd party
> units where neither sources nor debug dcus were supplied (and which I
> would certainly never ever think of using).
> My guess is that some option setting is wrong somewhere.

A leak report is at the bottom of this message.

The first time I tried I used all options and settings as per the FAQ that
comes with FastMM. The second time I used all options as per the video from
CodeRage II.

So, that would mean I used FullDebugMode. Clear txt file on startup. Setting
a path spec to the FullDebugMode.dll and also tried copying that dll to the
.exe directory. Set a lib path to the source code. Added FastMM to the uses
clause. In the compiler options I set DebugInformation, Reference Info, Use
debug DCUs. In the linker options I tried Map file Off and Detailed, I set
Include TD32 debug info.

As I write that paragraph I see that this is too much to have to fiddle
with. There has got to be a better way!

--------------------------------2007/12/10
11:46:30--------------------------------
A memory block has been leaked. The size is: 20

Stack trace of when this block was allocated (return addresses):
4031DA
404733
404AFA
404768
619841
61AF91
484A87
4846DF
404B68
4846B5

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

The allocation number is: 13188

Current memory dump of 256 bytes starting at pointer address 17196F0:
1C 2B 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3D C0 AD F8 00
00 00 00 31 8F 71 01
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 05 00 00 49 32 40 00 C1
4E 42 00 28 4D 42 00
3D 4B 42 00 AB 6C 4C 00 25 63 4C 00 C5 62 4C 00 8E 9F 42 00 9F A8 42 00 C9
B3 42 00 C1 4E 42 00
71 4B 42 00 1A 4B 42 00 97 47 40 00 B6 67 4C 00 38 12 47 00 DA 84 47 00 38
12 47 00 DA 84 47 00
38 12 47 00 10 00 00 00 50 3B 66 01 61 F4 43 08 0C 9E 62 00 80 80 80 80 80
80 80 80 80 80 80 80
9E 0B BC F7 80 80 80 80 00 00 00 00 31 98 71 01 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
E9 04 00 00 DA 31 40 00 33 47 40 00 FA 4A 40 00 68 47 40 00 36 60 5C 00 C8
9C 42 00 F9 9E 42 00
9F A8 42 00 C9 B3 42 00 AA A1 42 00 51 47 40 00 45 4B 40 00 25 4B 42 00 97
47 40 00 97 60 5C 00
. + B . . . . . . . . . . . . . . . . . = À ­ ø . .
. . 1 q .
. . . . . . . . . . . . . . . . . . . . I 2 @ . Á N
B . ( M B .
= K B . « l L . % c L . Å b L . Ž Ÿ B . Ÿ ¨ B . É ³
B . Á N B .
q K B . . K B . — G @ . ¶ g L . 8 . G . Ú „ G . 8 .
G . Ú „ G .
8 . G . . . . . P ; f . a ô C . . ž b . € € € € € €
€ € € € € €
ž . ¼ ÷ € € € € . . . . 1 ˜ q . . . . . . . . . . .
. . . . . .
é . . . Ú 1 @ . 3 G @ . ú J @ . h G @ . 6 ` \ . È œ
B . ù ž B .
Ÿ ¨ B . É ³ B . ª ¡ B . Q G @ . E K @ . % K B . — G
@ . — ` \ .

--------------------------------2007/12/10
11:46:30--------------------------------
This application has leaked memory. The small block leaks are (excluding
expected leaks registered by pointer):

13 - 20 bytes: TMemoryStream x 1

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".

Rich

unread,
Dec 12, 2007, 9:19:33 AM12/12/07
to
"Markus.Humm" <marku...@freenet.de> wrote in message
news:475da715$1...@newsgroups.borland.com...

> if you look around there is a tool from JED for easier FastMM 4
> configuration...

Thx, I have Jeremey's (sp?) tool.

Andreas Dorn

unread,
Dec 12, 2007, 12:40:40 PM12/12/07
to
Rich wrote:

[FastMM FullDebugMode]

> The first time I tried I used all options and settings as per the FAQ
> that comes with FastMM. The second time I used all options as per the
> video from CodeRage II.
>
> So, that would mean I used FullDebugMode. Clear txt file on startup.
> Setting a path spec to the FullDebugMode.dll and also tried copying that
> dll to the .exe directory. Set a lib path to the source code. Added
> FastMM to the uses clause. In the compiler options I set
> DebugInformation, Reference Info, Use debug DCUs. In the linker options
> I tried Map file Off and Detailed, I set Include TD32 debug info.

Have you fully rebuild the Application? Changing the TD32-option and
hitting run isn't enough to include the Debug-Info - You have to do a
build-all.

Jan Derk

unread,
Dec 12, 2007, 1:06:39 PM12/12/07
to
Rich wrote:

> The first time I tried I used all options and settings as per the FAQ
> that comes with FastMM. The second time I used all options as per the
> video from CodeRage II.
>
> So, that would mean I used FullDebugMode. Clear txt file on startup.
> Setting a path spec to the FullDebugMode.dll and also tried copying
> that dll to the .exe directory. Set a lib path to the source code.
> Added FastMM to the uses clause. In the compiler options I set
> DebugInformation, Reference Info, Use debug DCUs. In the linker
> options I tried Map file Off and Detailed, I set Include TD32 debug
> info.
>
> As I write that paragraph I see that this is too much to have to
> fiddle with. There has got to be a better way!

in fastmm4.pas search for this line:

StackTraceDepth = 9;

and change it to something higher like 50. Things will be slower but at
least you get the full stack. It could be that the top of the stack in
your situation is for units for which there is no debug info.

Jan Derk

François GAILLARD

unread,
Dec 12, 2007, 1:45:35 PM12/12/07
to
Rich,
1. Can you reproduce this odd behavior (no lines/numbers) with a minimal
application: let's say a new vcl app with 1 button where the click event
contains a simple leak, e.g. "TButton.Create(nil);"?
2. If it's all the same (not working), can you send me this small project
(with *all* files, esp. config/options) and your FastMM4Options.inc in a
zip.
3. If it worked for this project, then compare the project options with the
other project...
++ François ++

"Rich" <n...@email.info> wrote in message

news:475f...@newsgroups.borland.com...

> = K B . « l L . % c L . Å b L . Z Y B . Y ¨ B . É

> ³ B . Á N B .

> q K B . . K B . - G @ . ¶ g L . 8 . G . Ú " G . 8

> . G . Ú " G .

> 8 . G . . . . . P ; f . a ô C . . z b . ? ? ? ? ?
> ? ? ? ? ? ? ?
> z . ¼ ÷ ? ? ? ? . . . . 1 ~ q . . . . . . . . . .

> . . . . . . .
> é . . . Ú 1 @ . 3 G @ . ú J @ . h G @ . 6 ` \ . È

> o B . ù z B .
> Y ¨ B . É ³ B . ª ¡ B . Q G @ . E K @ . % K B . -
> G @ . - ` \ .

JED

unread,
Dec 12, 2007, 6:30:53 PM12/12/07
to
Markus.Humm wrote:

> if you look around there is a tool from JED for easier FastMM 4
> configuration...

http://jedqc.blogspot.com/2007/07/new-fastmm4-options-interface.html

For christmas I think I am going to integrate it into the IDE (only
newer IDEs though)

If I have the time...

--
TJSDialog - TaskDialog for other operating systems:
http://www.jed-software.com/jsd.htm
Visual Forms IDE Add In: http://www.jed-software.com/vf.htm

Blog: http://jedqc.blogspot.com

Rich

unread,
Dec 13, 2007, 8:58:08 AM12/13/07
to
"Jan Derk" <no...@none.none> wrote in message
news:4760313f$1...@newsgroups.borland.com...

> in fastmm4.pas search for this line:
>
> StackTraceDepth = 9;
>
> and change it to something higher like 50. Things will be slower but at
> least you get the full stack. It could be that the top of the stack in
> your situation is for units for which there is no debug info.

Thx, I'll try that when I get a chance.

François GAILLARD

unread,
Dec 13, 2007, 1:28:29 PM12/13/07
to
Rich,
I just took your project with your FastMM options and ran it (from the the
IDE), got the button leak and this in the report:

--------------------------------2007/12/13
10:16:41--------------------------------
A memory block has been leaked. The size is: 612

Stack trace of when this block was allocated (return addresses):

40305E [sys\system.pas][System][@GetMem][2654]
403C1B [sys\system.pas][System][TObject.NewInstance][8807]
403F8A [sys\system.pas][System][@ClassCreate][9472]
42AA66 [StdCtrls.pas][StdCtrls][TButton.Create][3731]
403E13 [sys\system.pas][System][@IsClass][9077]
45A5CE [Unit1.pas][Unit1][TForm1.Button1Click]
43BBC2 [Controls.pas][Controls][TControl.Click][5229]
42AADF [StdCtrls.pas][StdCtrls][TButton.Click][3745]
42ABDD [StdCtrls.pas][StdCtrls][TButton.CNCommand][3797]
43B6BA [Controls.pas][Controls][TControl.WndProc][5146]

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

The allocation number is: 353
[...]

It is exactly what is expected.
So, I'm puzzled...
Dumb question, but are you sure to look at the correct report file? Each
leak block info being tagged with date and time, you should see the time
change every time you rerun it...


"François GAILLARD" <fgaillard [somewhere at] wideorbit.com> wrote in

message news:47602b94$1...@newsgroups.borland.com...

Rich

unread,
Dec 13, 2007, 3:50:55 PM12/13/07
to
"Rich" <n...@email.info> wrote in message
news:475d...@newsgroups.borland.com...

> I can't seem to get the full version of FastMM4 to show me source code
> line numbers in the output file.

It turns out to be an MSBuild issue.

This fixes the problem (I think JED posted this somewhere):

0. Shutdown Delphi 2007
1. run regedit.exe
2. HKCU\Software\Borland\BDS\5.0\Globals
3. Add a new string value named "MSBuildDelphi"
4. Set new string data value to "0"
5. Delete your dproj files for your projects
6. Restart Delphi 2007
7. Reload DPR project file
8. Build

Apparently that eliminates using MSBuild. So it would be nice to have a fix
using MSBuild or CodeGear can give us something better. If I'm not mistaken
there use to be a nice program that came with Delphi before MSBuild, hmm...
what was it called. :-)

I guy named Rod posted once ranting for the removal of MSBuild, it may turn
out he was right.

Thx to everyone for the help.

François GAILLARD

unread,
Dec 13, 2007, 4:02:12 PM12/13/07
to
Weird!
Thanks for posting the resolution.
++ François ++

"Rich" <n...@email.info> wrote in message

news:47619b32$1...@newsgroups.borland.com...

0 new messages