How to find "invalid pointer operation" errors?

From: Christian Kaufmann (christian.kaufmann_at_gmx.net)
Date: 11/30/03


Date: Sun, 30 Nov 2003 17:34:47 +0100

Hi,

I fight with some memory errors. It's always "invalid pointer
operation" and it only apears on application termination.

It always happens in the internal destroy routines, but not everytime
and what I found out, that the problem is not in the object, where it
happens, it is probably from somewhere else.

The call stack always looks this:

0040285f logoData.exe System 2480 @FreeMem
00404ef0 logoData.exe System 11327 @LStrClr
00405ba2 logoData.exe System 13947 @FinalizeArray
00405b44 logoData.exe System 13827 @FinalizeRecord
00404036 logoData.exe System 8417 TObject.CleanupInstance
00403f79 logoData.exe System 8293 TObject.FreeInstance
00404376 logoData.exe System 8989 @ClassDestroy
005ae3e7 logoData.exe SqlExpr 1549 <anyclass>.Destroy
00403fc8 logoData.exe System 8313 TObject.Free
....
004dcc1e logoData.exe Forms 1325 DoneApplication
00428e57 logoData.exe SysUtils 3248 DoExitProc
00404d68 logoData.exe System 11023 @Halt0

What is the best way, to trap this kind of error?

cu Christian