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 X-Sender: eliz AT is To: Peter Cassidy 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.