heroes-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Heroes] Re: Bug#169525: heroes-common: Fatal signal: Segmentation F


From: Alexandre Duret-Lutz
Subject: Re: [Heroes] Re: Bug#169525: heroes-common: Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Date: Tue, 19 Nov 2002 00:57:54 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu)

>>> "Ingo" == Ingo van Lil <address@hidden> writes:

[...]

 >> I read the debugging section of the GCC-Howto and set the core file
 >> size to unlimited. Unfortunately, there was no core dumped by the
 >> heroes-crash.

 Ingo> Strange. Did you run heroes from the same shell in which you also
 Ingo> entered the ulimit command? The command affects only the current shell.

This can happens for a few other reasons.  

The first one is that heroes has a setgid bit under Debian.

-rwxr-sr-x    1 root     games      232392 Jun 16 21:03 /usr/games/heroes-ggi
-rwxr-sr-x    1 root     games      228200 Jun 16 21:03 /usr/games/heroes-sdl

So when heroes starts it runs with EGID==games and GID==yours.
Because EGID != GID the kernel disallows coredump (and ptrace()).
Once Heroes has opened its score files, it does EGID:=GID so
that you play the rest of the game under your own identity,
however that doesn't matter to Linux: it won't grant you back the
right to coredump.

Another issue is related to threading.  When the heroes uses threads
to play music.  In this conditions I don't get coredumps.  (Actually
I've just tried to kill -SEGV the main thread, and got a coredump
for the sound thread only...)  I've never investigated this.
A workaround is to start heroes with -S (no sound).

Another one is that the SDL library intercept crashes.  That's
the "SDL parachute" message you see.  So there is no coredump there.
This parachute is disabled when Heroes is compiled with --enable-debug.

Actually in the manual I suggest to rebuild the game with 
  ./configure --enable-debug --disable-sound
to make debugging easier.
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]