[fpc-pascal] Re: TProcess.Free - three exceptions in ntdll.dll - only *sometimes*

Bernd Kreuss prof7bit at googlemail.com
Tue Oct 5 15:21:05 CEST 2010


On 04.10.2010 19:23, Bernd Kreuss wrote:
> Hi,
> 
> has anybody ever had the problem of TProcess.Free causing
> three exceptions in in ntdll.dll?
> 
> C0000005 at 7C928FEA in C:\WINDOWS\system32\ntdll.dll

Just for the record: It was not TProcess and also not the streams, at
least not directly: After further experimenting and simplifying the dll
until it finally consisted of nothing more than only two functions that
would create and destroy some dummy object without any functionality I
still saw this exception immediately when freeing the object and the
same exception again *after* the host app had unloaded my dll.

I have now put the cmem unit into my uses (I always only saw this
mentioned in combination with the cthreads for *ix, never thought that
it was usable on win32 too) and the exceptions while freeing obects seem
to have all gone away. However I still see exactly one such exception
*after* unloading the dll but the host app seems to be able to catch it
without crashing.

(the host app is unfortunately a commercial closed source application
and probably written in C++ [at least it is definitely not from any
borland or compatible compiler since FPU exceptions are masked])

Bernd



More information about the fpc-pascal mailing list