[fpc-pascal]Heaptrace problem?

paradice lawrence at paradicesoftware.com
Sun Sep 21 11:27:47 CEST 2003


Hi -

Just wondering if anyone else had has problems with the "heaptrace" option
on 1.0.10?
(This only applies to Win32, and for me, only appears on WinME and not
WinXP...)

I have created a 60-line example program that illustrates the problem:
 http://www.paradicesoftware.com/exceptz.pas

(the program above doesn't actually do much, I chopped it down to the
minimum that gave the error)

With heaptrace disabled, the program executes normally (just pops up
"Program End" window).
But if I switch heaptrace on, an "Access Violation" exception is triggered
inside "CreateWindowEx".

By playing around I discovered that it it is caused by the GetMem inside
window_proc.
Obviously heaptrace catches this and does something extra with it, but
Windows ME doesn't like it!

If you comment out GetMem/Freemem, it works fine. Compiled for Go32, or
without heaptrace, or on WinXP, and it all works ok. Moving GetMem/Freemem
to somewhere else in the program, works fine.

Has anyone else experienced anything with heaptrace doing stuff like this?


Cheers,
Lawrence.





More information about the fpc-pascal mailing list