Mail Archives: djgpp/2002/05/08/06:39:42
On Wed, 8 May 2002, Peter Cassidy wrote:
> I have more information: it _only_ crashes in the presence of a file with a
> long file name. In that case, when looking at the C: (hard disk) and A:
> (floppy) it will _always_ crash, but when looking at R: (ram disk), its
> behaviour is more complex. On the ram disk it will run if it ran
> successfully the _previous_ time.
It's not useful to debug a problem like this. You have the full sources
to the library functions, so simply step with a debugger into readdir and
find out why does it return a NULL pointer.
In cases like this one, I normally copy the source of the offending
function into one of my program's source files, then compile the result,
and look around with a debugger. This avoids having to rebuild the
library with debugging switches.
If, after stepping through readdir, you have some questions about why it
behaves in a certain manner, by all means come back here, describe what
you saw, and ask for advice.
In case you didn't know, the sources of the library functions are in
djlsr203.zip.
> Call frame traceback EIPs:
> 0x0000357a _readdir+18
> 0x0000165b _main+59, line 12 of mickey.c
> 0x00002f78 ___crt1_startup+176
Note that this crash is inside readdir, which probably means opendir
returned a NULL pointer. Or it might mean something else--the debugger
will tell you. Without knowing what exactly causes the crash, you are
debugging the problem half-blind.
- Raw text -