[SOLVED] Game Segfaults on Startup - This is TOO a bug

Bugs that have been fixed for or in a later version
Locked
POLAX
Greenhorn
Posts: 7
Joined: 22 Oct 2006, 18:33

[SOLVED] Game Segfaults on Startup - This is TOO a bug

Post by POLAX »

(Note: Changed yellow hilight to blue... easier on the eyes. - lav_coyote25)

My post on the game segfaulting at startup appears to have been moved to the not a bug thread due to a delay in my response.  Be reassured that this was (and still is a bug) but when you get married and have a fulltime job you'd be surprised how low on the priority totem-pole game bugreporting can go (and I hear it only gets worse once you have kids).

Anyways I've got another clue:  The game does not segfault when I run it on an identical PC (same OS+config too) except with a Radeon 9250 (AGP, 128 MB).  My Radeon 9800 Pro (AGP, 128 MB) looks to be the guilty variable resulting in game crashes.

So below you will find the gdb backtrace (from warzone2100-2.05_rc1 recompiled with debugging symbols intact) that was requested sometime ago:

Code: Select all

user@host ~ $ gdb warzone2100
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r --window --viewport 1024x768
Starting program: /usr/games/bin/warzone2100 --window --viewport 1024x768
Failed to read a valid object file image from memory.
libGL warning: 3D driver claims to not support visual 0x4c

Program received signal SIGSEGV, Segmentation fault.
0xb7395616 in ?? ()
(gdb) bt full
#0  0xb7395616 in ?? ()
No symbol table info available.
#1  0x80a0c720 in ?? ()
No symbol table info available.
#2  0x00406004 in STRSTACK ()
No symbol table info available.
#3  0xbfd9c240 in ?? ()
No symbol table info available.
#4  0xbfd9c220 in ?? ()
No symbol table info available.
#5  0x0010893c in intUpdateTransCapacity ()
No symbol table info available.
#6  0xb728037e in ?? ()
No symbol table info available.
#7  0x80a0db38 in ?? ()
No symbol table info available.
#8  0x80e566b8 in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#9  0x00d10000 in ?? ()
No symbol table info available.
#10 0x80fafd20 in ?? ()
No symbol table info available.
#11 0x80a03c30 in ?? ()
No symbol table info available.
#12 0xb7bb9108 in ?? ()
No symbol table info available.
#13 0x80fafd20 in ?? ()
No symbol table info available.
#14 0x000001b9 in ?? ()
No symbol table info available.
#15 0xa31f655c in ?? ()
No symbol table info available.
#16 0x80a0c710 in ?? ()
No symbol table info available.
#17 0x80fd2850 in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#18 0x80f990fc in ?? ()
No symbol table info available.
#19 0xa31f655c in ?? ()
No symbol table info available.
#20 0x40106450 in ?? ()
No symbol table info available.
#21 0xbfd9c300 in ?? ()
No symbol table info available.
#22 0xb74ea29c in ?? ()
No symbol table info available.
#23 0x80faf8e0 in ?? ()
No symbol table info available.
#24 0x00000000 in ?? ()
No symbol table info available.
It looks to be missing a pile of symbols.  It has a crapload of dependencies, any recommendations on which dependencies are the best candidates to rebuild w/ debug info?  Here is a full list below:

Code: Select all

        linux-gate.so.1 =>  (0xffffe000)
        libphysfs-1.0.so.1 => /usr/lib/libphysfs-1.0.so.1 (0xb7f93000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7f66000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7f3c000)
        libz.so.1 => /lib/libz.so.1 (0xb7f27000)
        libm.so.6 => /lib/libm.so.6 (0xb7f05000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e5f000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7e4c000)
        libSDL_net-1.2.so.0 => /usr/lib/libSDL_net-1.2.so.0 (0xb7e47000)
        libGL.so.1 => //usr//lib/opengl/xorg-x11/lib/libGL.so.1 (0xb7dbe000)
        libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb7d1f000)
        libopenal.so.0 => /usr/lib/libopenal.so.0 (0xb7cdd000)
        libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7cd3000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7ca4000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0xb7c9d000)
        libmad.so.0 => /usr/lib/libmad.so.0 (0xb7c83000)
        libc.so.6 => /lib/libc.so.6 (0xb7b6b000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7a40000)
        /lib/ld-linux.so.2 (0xb7fda000)
        libaudio.so.2 => /usr/lib/libaudio.so.2 (0xb7a26000)
        libXt.so.6 => /usr/lib/libXt.so.6 (0xb79bf000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb79aa000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb79a5000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb799a000)
        libdirectfb-0.9.so.25 => /usr/lib/libdirectfb-0.9.so.25 (0xb7932000)
        libfusion-0.9.so.25 => /usr/lib/libfusion-0.9.so.25 (0xb792a000)
        libdirect-0.9.so.25 => /usr/lib/libdirect-0.9.so.25 (0xb7918000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7914000)
        libggi.so.2 => /usr/lib/libggi.so.2 (0xb7905000)
        libgii.so.0 => /usr/lib/libgii.so.0 (0xb78fc000)
        libgg.so.0 => /usr/lib/libgg.so.0 (0xb78f5000)
        libaa.so.1 => /usr/lib/libaa.so.1 (0xb78d5000)
        libcaca.so.0 => /usr/lib/libcaca.so.0 (0xb78c7000)
        libcucul.so.0 => /usr/lib/libcucul.so.0 (0xb7846000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb783f000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb7835000)
        libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6 (0xb7707000)
        libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc_s.so.1 (0xb76fc000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb76f8000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb76f1000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xb76e6000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xb76ca000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb767a000)
        libgpm.so.1 => /lib/libgpm.so.1 (0xb7673000)
        libncursesw.so.5 => /lib/libncursesw.so.5 (0xb761b000)
        libglut.so.3 => /usr/lib/libglut.so.3 (0xb75e5000)
BTW -> Any progress on removing the file extension filtering on attachments?  That's still a hindrance for posting helpful files in the future...
Last edited by lav_coyote25 on 10 Dec 2006, 05:24, edited 1 time in total.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Game Segfaults on Startup - This is TOO a bug

Post by cybersphinx »

Hm, your backtrace is missing all important information, ie. function names. Are you sure you have actually run your compiled version, and it is not stripped? Even the libraries (if any are involved, and by the depth of the backtrace I guess some are) seem to be stripped. Gentoo optimization at its best... Anyway, since the graphics card is the only variable here (have you tried exchanging the cards, to exclude any differing configuration of the two PCs?), my guess is a problem in the graphics drivers, possibly due to an overoptimized compile.

First get a useful backtrace: Go into the source directory, do a "./autogen.sh; ./configure --enable-debug; make", run "gdb src/warzone2100", and get a backtrace with "bt". Now hopefully you get the location of the crash with function names. If there are still missing names, the crash is in the drivers, then you might want to recompile those (the mesa3d package) with fewer optimizations and possibly debug symbols as well. If not, get a full backtrace ("bt full") and post it here.
We want information... information... information.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Game Segfaults on Startup - This is TOO a bug

Post by DevUrandom »

1. Probably the location of the crash in the WZ sourcecode would be enough. (Do what cybersphinx said.) With that location we also know whether the crash happened inside or outside of Warzone, so we know whether it is in the graphics driver or not.
2. There was some problem with the ATI drivers crashing on our shadow code, even though I thought I fixed this for 2.0.5_rc1. Try running WZ with --nodshadows (will only work in 2.0.5_rc1).
maacruz
Greenhorn
Posts: 12
Joined: 05 Dec 2006, 17:19

Re: Game Segfaults on Startup - This is TOO a bug

Post by maacruz »

DevUrandom wrote: 1. Probably the location of the crash in the WZ sourcecode would be enough. (Do what cybersphinx said.) With that location we also know whether the crash happened inside or outside of Warzone, so we know whether it is in the graphics driver or not.
2. There was some problem with the ATI drivers crashing on our shadow code, even though I thought I fixed this for 2.0.5_rc1. Try running WZ with --nodshadows (will only work in 2.0.5_rc1).
Hi,
Which drivers are you referring to, DRI or propietary?
Thats because I have an ATI 9200SE using DRI (Mesa 6.4.2) and it causes lockups every now and then, which is quite uncomfortable.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Game Segfaults on Startup - This is TOO a bug

Post by cybersphinx »

The lockup in the r200 driver is another issue, quite old actually, but not fixed yet (I don't know why, perhaps it only happens on certain hardware combinations or something). The shadow code used to trigger an exception in the r200 driver (X.org, XFree86 was fine), but that is fixed now (our code, not X.org).
We want information... information... information.
POLAX
Greenhorn
Posts: 7
Joined: 22 Oct 2006, 18:33

Re: Game Segfaults on Startup - This is TOO a bug

Post by POLAX »

maacruz wrote: Hi,
Which drivers are you referring to, DRI or propietary?
Thats because I have an ATI 9200SE using DRI (Mesa 6.4.2) and it causes lockups every now and then, which is quite uncomfortable.
It's the free (as in speech, not beer) driver...
POLAX
Greenhorn
Posts: 7
Joined: 22 Oct 2006, 18:33

Re: Game Segfaults on Startup - This is TOO a bug

Post by POLAX »

cybersphinx wrote: Hm, your backtrace is missing all important information, ie. function names. Are you sure you have actually run your compiled version, and it is not stripped? Even the libraries (if any are involved, and by the depth of the backtrace I guess some are) seem to be stripped. Gentoo optimization at its best...
Yes...the distro is very Fast and Furious.
cybersphinx wrote: First get a useful backtrace: Go into the source directory, do a "./autogen.sh; ./configure --enable-debug; make", run "gdb src/warzone2100", and get a backtrace with "bt". Now hopefully you get the location of the crash with function names. If there are still missing names, the crash is in the drivers, then you might want to recompile those (the mesa3d package) with fewer optimizations and possibly debug symbols as well. If not, get a full backtrace ("bt full") and post it here.
Well, I tried that and BT isn't much more helpful.  Also it still crashes with --noshadows.

Code: Select all

user@host ~/tmp/warzone-2.0.5_rc1 $ gdb src/warzone2100
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r --window --viewport 1024x768
Starting program: /home/kaboosh/tmp/warzone-2.0.5_rc1/src/warzone2100 --window --viewport 1024x768
Failed to read a valid object file image from memory.
libGL warning: 3D driver claims to not support visual 0x4c

Program received signal SIGSEGV, Segmentation fault.
0xb7462616 in ?? ()
(gdb) bt full
#0  0xb7462616 in ?? ()
No symbol table info available.
#1  0x80a26cb8 in ?? ()
No symbol table info available.
#2  0x00406004 in STRSTACK ()
No symbol table info available.
#3  0xbfb24070 in ?? ()
No symbol table info available.
#4  0xbfb24050 in ?? ()
No symbol table info available.
#5  0x000e323c in scrSetDroidSecondary () at scriptai.c:649
        psDroid = (DROID *) 0xb75b729c
        sec = -1221242454
        state = -1218912257
        __FUNCTION__ = "scrSetDroidSecondary"
        __PRETTY_FUNCTION__ = "scrSetDroidSecondary"
#6  0xb734d37e in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#7  0x80a280d0 in ?? ()
No symbol table info available.
#8  0x80a538d8 in ?? ()
No symbol table info available.
#9  0x00000000 in ?? ()
No symbol table info available.
I guess I'll have to find the time to rebuild some dependencies with debug info and do this right...
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Game Segfaults on Startup - This is TOO a bug

Post by DevUrandom »

Interesting backtrace... Did you "make distclean" before doing the rest? I don't know if this is needed, but your callstack seems to be literally non-existant...
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Game Segfaults on Startup - This is TOO a bug

Post by cybersphinx »

POLAX wrote: Yes...the distro is very Fast and Furious.
Haha, yeah, some of those quotes are hilarious (though some do make sense to me). Especially this one: "To me, an extra 0.1% performance increase, even if I am only imagining it to be faster, is certainly worth one day a week recompiling all of the latest packages from source code." Sounds like the kind of person that uses an overclocked Pentium D 805 that needs so much power he could have bought a decent CPU for the money.

Anyway, I digress. I once tried to build an optimized mesa, and that didn't work well (also the r300 driver), so that could be your problem as well. But first we need (yet another) backtrace... I forgot the "make clean" (should be enough, but you can also "make distclean" to be safe) first, sorry for that. So please do that and rebuild Warzone, then the backtrace should actually contain some information.
We want information... information... information.
POLAX
Greenhorn
Posts: 7
Joined: 22 Oct 2006, 18:33

Re: Game Segfaults on Startup - This is TOO a bug

Post by POLAX »

DevUrandom wrote: Interesting backtrace... Did you "make distclean" before doing the rest? I don't know if this is needed, but your callstack seems to be literally non-existant...
Well, I just tried the new 2.07-r1 release and it would seem that somewhere along the lines the problem was addressed.  I just wanted to send a big thanks to the dev or devs responsible even though I wasn't much help here.    :-[

Once again - thanks a bunch!!  :)

BTW -> The new site looks and works great!!
Locked