www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/22/19:15:28

From: Jose Manuel Lopez-Cepero <sigma AT ctv DOT es>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What does SIGSEGV means?
Date: Sat, 22 Mar 1997 22:44:50 +0100
Organization: Unisource Espana NEWS SERVER
Lines: 45
Message-ID: <333452D2.5159@ctv.es>
References: <01bc3543$36405d00$2206a6c2 AT stefabiz DOT vol DOT it>
Reply-To: sigma AT ctv DOT es
NNTP-Posting-Host: macarena.ctv.es
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Stex wrote:
> 
> Hi everybody!
> 
> I experienced a problem developing my very first game, and maybe somebody
> out there knows how to solve.
> I compiled my program using DJGPP v. 2 and Allegro 2.1, it ran like a dream
> until... it exit with the following message :
> 
> Shutting down Allegro
> Exiting due to signal SIGSEGV
> General Protection fault at eip=0000f678
> ....
> 
> Anybody may tell me what can cause that and how may I solve my problem. I
> would like to know also where can I find documentation on error messages
> like the above...

What cause: If you are doing it on C++ don't trust me too much (plain
vanilla C writer :-)) but it may be caused by a pointer going crazy or
similar (NULL references, memory matters...) SIGSEGV is a "signal" - you
can think on them as errorcodes that your program's code uses to
communicate with the program stub (ie. changing from-to realmode, 387
emulation, errors... are all handled by this code).
Sollution: Trace back with SYMYFY or, even better, debug. If you can't
get to the right line of code, you can try using FSDB and going directly
to the value it has given for eip. The instruction *above* it is the one
causing the trouble, find what line causes it. It might be a good idea
to use Rhide because it does source-level debug. Of course you should
compile with -g.
To use Symify, run your game, and *right after* when it dies with the
fault, execute SYMIFY name_of_the_program.exe. You will magically see
how the numbers are turned into function names and even code lines! With
that it should be easy to know *which* line is causing the problem. If
you still can't find it, try posting the program (but for god's sake
*keep it short*)

Documentation: no idea, but hey, that's what a newsgroup is for... :-)

Good luck!

-- 
 _*                        
\ |/_|\/||\                                 sigma AT ctv DOT es      
_\|\/|  ||_\  (formerly Sigmatech)      Jerez / Cadiz / Spain

- Raw text -


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