From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Error 0004 Date: Sat, 30 May 1998 23:00:40 -0400 Organization: Two pounds of chaos and a pinch of salt. Lines: 38 Message-ID: <3570C7D8.278E@cs.com> References: <1998053021004300 DOT RAA02304 AT ladder01 DOT news DOT aol DOT com> NNTP-Posting-Host: ppp143.cs.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk KillFerFun wrote: > > What is this? Is there a list of error codes (runtime) anywhere? Any help is > appreciated... I assume that you're referring to a crash traceback that you received when you ran a DJGPP program, and that it said something like "Program received signal SIGSEGV", followed by "Page fault at
" and the aforementioned error code. It then listed a dump of all registers and a complete traceback of your program's stack at the moment of the crash. All this information is useful; simply saying "error 0004" is pretty meaningless. However, a page fault usually means an invalid memory access in your program. So look for uninitialized pointers, NULL pointers, pointers that point to places they aren't allowed to point, etc. Read chapter 12 of the DJGPP Frequently Asked Questions list to learn how to turn the traceback into something human-readable that will help you pinpoint the location in your program where the crash occurred. DJGPP also comes with various powerful debugging tools such as gdb (v2gnu/gdb416b.zip) that can solve nearly any problem if you use them properly. If you want specific advice on a specific problem, please post a symified crash traceback along with the code from your program around the point of the crash location. Generally, the whole function where the crash occurred (or the highest function on the stack frame that's part of your code, in the event that the crash occurred in a library function) is best. hth -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | ICQ UIN#: 7406319 | http://www.cs.com/fighteer/ | | ObJoke: If Bill Gates were a robber, not only would he | | shoot you, but he'd send you a bill for the bullets. | ---------------------------------------------------------------------