Lots of segmentation faults with 0.73b1
Moderator: Moderators
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
Lots of segmentation faults with 0.73b1
I installed spring 0.73b1 on linux (ubuntu 6.06).
Spring regularly crashes, the console reports everytime "segmentation fault", it happens with nanoblobs 0.63, aa 2.21 and xta. It just happens randomly no returning pattern or crashes with one type of unit.
Are these bugs or can this occur with a bad compilation or something like that?
Spring regularly crashes, the console reports everytime "segmentation fault", it happens with nanoblobs 0.63, aa 2.21 and xta. It just happens randomly no returning pattern or crashes with one type of unit.
Are these bugs or can this occur with a bad compilation or something like that?
A segmentation fault means the program tried to access memory that it didn't have access to.
For example it tried to write to a read-only "page" (chunk of memory) or tried to read from a page of another process.
It usually happens because of uninitialized variables, particularly pointers, writing outside array bounds, or using NULL pointers.
To fix a segmentation fault the most important thing is to be able to reproduce it, preferably as easy as possible. Then you'd usually (re)compile the sourcecode of the program with debugging enabled so you can run it inside the debugger (gdb). Then if you get the segmentation fault again while running in debugger, you can create a stacktrace and look at that place in the source.
If you're lucky the bug is pretty obvious but usually only then the detective work starts to figure out why that certain pointer was uninitialized, why it was NULL, etc. A good knowledge of the language the program is written in definitely helps in that case, but the developers will be very happy already if you can supply them with a unambiguous instructions "how to reproduce" the bug, the stacktrace, and any data files needed to reproduce it.
Also make sure to only debug the recentmost version of a program, preferably a version from CVS/SVN/bazaar/etc. otherwise you might be spilling your time if the bug has already been fixed upstream.
For example it tried to write to a read-only "page" (chunk of memory) or tried to read from a page of another process.
It usually happens because of uninitialized variables, particularly pointers, writing outside array bounds, or using NULL pointers.
To fix a segmentation fault the most important thing is to be able to reproduce it, preferably as easy as possible. Then you'd usually (re)compile the sourcecode of the program with debugging enabled so you can run it inside the debugger (gdb). Then if you get the segmentation fault again while running in debugger, you can create a stacktrace and look at that place in the source.
If you're lucky the bug is pretty obvious but usually only then the detective work starts to figure out why that certain pointer was uninitialized, why it was NULL, etc. A good knowledge of the language the program is written in definitely helps in that case, but the developers will be very happy already if you can supply them with a unambiguous instructions "how to reproduce" the bug, the stacktrace, and any data files needed to reproduce it.
Also make sure to only debug the recentmost version of a program, preferably a version from CVS/SVN/bazaar/etc. otherwise you might be spilling your time if the bug has already been fixed upstream.
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
I'd like to try to reproduce the segmentation fault, but how do i recompile spring with debugging enabled?
And gdb would work like "gdb ./spring" right? because i am not going to read all this: http://sources.redhat.com/gdb/current/o ... b_toc.html
And gdb would work like "gdb ./spring" right? because i am not going to read all this: http://sources.redhat.com/gdb/current/o ... b_toc.html
Ultraquick debugging on linux help
Compiling spring
Running spring in gdb and making a backtrace after it crashes
Compiling spring
Code: Select all
scons configure debug=yes
scons
Code: Select all
gdb ./spring
r
<<<Wait until it segfaults>>>
bt
q
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
Thanks, i made a backtrace but it looks absurdly long. Another question were does it save the backtrace? And will i have to paste it in pastebin or something like that?
Last edited by architeuthis on 08 Oct 2006, 12:56, edited 1 time in total.
The backtrace isn't saved, you should just copy paste it. A pastebin is fine yeah.architeuthis wrote:Thanks, i made a backtrace but it looks absurdly long. Another question were does it save the backtrace? And will i have to paste it in pastebin or something like that?
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
Ok here is it:
The enitire bt is more then 20000 lines long, i hope this is what you need?
Do you need more info (map, mod etc)?
Code: Select all
(gdb) r
Starting program: /home/architeuthis/spring/taspring_0.73b1/game/spring
[Thread debugging using libthread_db enabled]
[New Thread -1231337792 (LWP 13319)]
warning: Lowest section in /usr/lib/libicudata.so.34 is .hash at 00000094
[New Thread -1231426640 (LWP 13322)]
[New Thread -1410233424 (LWP 13324)]
[New Thread -1419928656 (LWP 13361)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1231337792 (LWP 13319)]
0xb5cc01d3 in __glim_R200TCLDrawArrays () from /usr/lib/dri/atiogl_a_dri.so
Do you need more info (map, mod etc)?
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
I got another one, this one is pracitcally the same:
Are these the same or is this just the same bug but on another moment?
Code: Select all
Starting program: /home/architeuthis/spring/taspring_0.73b1/game/spring
[Thread debugging using libthread_db enabled]
[New Thread -1231354176 (LWP 13921)]
warning: Lowest section in /usr/lib/libicudata.so.34 is .hash at 00000094
[New Thread -1231443024 (LWP 13924)]
[New Thread -1410249808 (LWP 13927)]
[New Thread -1419945040 (LWP 13933)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1231354176 (LWP 13921)]
0xb5cbc1d3 in __glim_R200TCLDrawArrays () from /usr/lib/dri/atiogl_a_dri.so
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
The backtrace is extremly long (+2000 lines), i have to press enter to continue every 20 lines, and my console remembers only 100 lines, so i have to copy them seperatly and i really dont have the time to copy thousands of lines. But i came this far: http://pastebin.com/802452
If its a driver issue, i have a big problem, ati stopped supporting my ati9250 pro, damned ati.
I hope i helped you and contributed to spring.
If its a driver issue, i have a big problem, ati stopped supporting my ati9250 pro, damned ati.
I hope i helped you and contributed to spring.
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
Yep the crash is in a fire gl driver component.
You can try the open drivers, they are slower but dont have such short lifetimes. (r200 series could be too slow for spring with open drivers)
I'm running spring on the open r300 driver (x700 64bit mem) and it's just doable. But svn is crashing there more often for me too, with a lockup of the hardware. It's unlikely it's springs fault though, too many incriminating other factors.
You can try the open drivers, they are slower but dont have such short lifetimes. (r200 series could be too slow for spring with open drivers)
I'm running spring on the open r300 driver (x700 64bit mem) and it's just doable. But svn is crashing there more often for me too, with a lockup of the hardware. It's unlikely it's springs fault though, too many incriminating other factors.
- architeuthis
- Posts: 86
- Joined: 15 Dec 2005, 20:47
If the debug information is sent to stdOUT, you could use redirecting...architeuthis wrote:The backtrace is extremly long (+2000 lines), i have to press enter to continue every 20 lines, and my console remembers only 100 lines, so i have to copy them seperatly and i really dont have the time to copy thousands of lines.
Code: Select all
gdb ./spring > ~/debugfile.txt
r
<<<Wait until it segfaults>>>
bt
q please correct me if I´m wrong
anyway, I´ve an SEGFault as well...
I used Spring for a week or so on Ubuntu Feisty and suddenly during a AiSkirmish Spring segfaulted. Since then neither the Ubuntu .deb-packet nor the self-compiled version would run...
Last edited by pattex on 10 Jun 2007, 17:25, edited 1 time in total.
