Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Jim

[SVN revision 107] Eternity Crash on Linux

Recommended Posts

Eternity crashes exit the menu after setting the resolution. Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1078891168 (LWP 31382)]
R_DrawMaskedColumn (column=0x431329bc) at r_things.c:442
442        while(column->topdelta != 0xff)
(gdb) bt
#0  R_DrawMaskedColumn (column=0x431329bc) at r_things.c:442
#1  0x080bc681 in R_DrawVisSprite (vis=0xbfffbf80, x1=386, x2=632)
    at r_things.c:610
#2  0x080bd381 in R_DrawPSprite (psp=0x815850c) at r_things.c:1013
#3  0x080bd51e in R_DrawPlayerSprites () at r_things.c:1062
#4  0x080b71a6 in R_RenderPlayerView (player=0x81583c0, camerapoint=0x0)
    at r_main.c:704
#5  0x0805bb24 in D_Display () at d_main.c:257
#6  0x0805cf67 in D_DoomMain () at d_main.c:2483
#7  0x080ca61f in main (argc=-2011536, argv=0xffe14e70) at i_main.c:74
As you can see, a Segmentation Fault was caused when trying to access memory at the address 0x431329bc.

Share this post


Link to post

It's odd, this doesn't happen for me. I'm using revision 107 (albeit slightly modified) on linux. I just sat here changing resolutions for about 3 minutes too.

Share this post


Link to post

I should have also mentioned this was on my very first run of eternity and it crashed as the demo started playing when I left the menu. The resolution change may very well have been irralivant.

FYI, I compiled with GCC 3.3.3, glibc 2.3.3, Xorg 6.8.2, SDL 1.2.10, and SDL_mixer 1.2.6.

Edit: I confirmed that the resolution change has nothing to do with the crash. The game crashes during demo playback or during gameplay. I get a crash shortly after I leave the start area in the Eternity start map.

Share this post


Link to post

Extremely valuable information good sir. The latest version of Eternity requires SDL_mixer 1.2.7. This could well be the cause of the problem. I'd suggest running with -nosound and seeing if that fixes things. I'm amazed it compiled if you are using 1.2.6 as it lacks one of the necessary load functions used in eternity to remove the need for a temporary file for music. IIRC it laods the song ito memory with rwops so you can play it from there instead of relying on this temp file.

Share this post


Link to post

Nope, neither disabling sound nor updating SDL_mixer fixed anything, even with a recompile. It still crashes every time in the exact same place.

Share this post


Link to post

Okay, I decided to look into this a little bit more. The crash occurs when r_things.c is compiled with optimization level 2 (-O2) on GCC 3.3.3. However, it doesn't occur when it is compiled with -O0, -O1, or -O3.

For the time being, I guess I'll just compile r_things.c with an optimization level other than 2.

Share this post


Link to post

Sounds like one of those classic GCC compiler bugs. I found it very suspicious that those garbage pointer values were on the call stack.

Without being able to run on linux with GDB attached, I can't really make progress in any direction against it anyways, so my best advice is to see if it goes away with a newer revision :) I've had to make some changes to r_things.c during the past couple of days to upgrade the clipping arrays to 32-bit width. Cache performance will probably suffer, but at least you can jump down holes now without worrying about a SEGV ^_^

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×