www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/08/06:39:42

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Wed, 8 May 2002 13:11:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Peter Cassidy <peter DOT cassidy AT rocksoft DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Hacking long file names from pure DOS
In-Reply-To: <3cd8e54a$1@duster.adelaide.on.net>
Message-ID: <Pine.SUN.3.91.1020508130513.23608A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019