Mail Archives: djgpp/2001/03/16/18:47:01
On Sat, 10 Mar 2001 21:53:16 -0500, Sahab Yazdani
<sahaby AT operamail DOT com> wrote:
>Hello everybody, i'm having a whole string of strange problems which
>seem to be very loosely interconnected. The first is that my program is
>crashing with a call to fclose. I've checked the pointers and they seem
>to be fine (as far as I can tell). ...
[snip]
A useful little trick I've found to checking pointers is to examine
the DWORD values 4 bytes and 8 bytes immediately before the pointer
itself. These values contain allocation information. If they're
corrupted from being overwritten, that could easily cause a crash.
Try running your program under GDB and setting a watchpoint on these
two locations. Then take a look at the code which triggers the
watchpoint.
Good luck. :-)
Damon Casale, damon AT WRONG DOT redshift DOT com (remove the obvious)
Didn't your mother ever tell you it's not nice to point? ;-)
- Raw text -