[fpc-pascal]Heaptrace problem?
Vincent Snijders
vslist at zonnet.nl
Wed Sep 24 22:28:24 CEST 2003
On Sun, 21 Sep 2003 21:27:47 +1200
"paradice" <lawrence at paradicesoftware.com> wrote:
> 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.
I have. See
http://www.nl.freepascal.org/lists/fpc-devel/2003-September/003057.html
and the rest of the thread.
Peter fixed it in the 1.1 rtl, but not in the 1.0.10 rtl. You could do
it yourself and recompile the rtl.
HTH,
Vincent Snijders.
More information about the fpc-pascal
mailing list