Segmentation fault when starting a game

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Phoenix946
Greenhorn
Posts: 9
Joined: 02 Jun 2009, 16:13

Segmentation fault when starting a game

Post by Phoenix946 »

Hello everyone, I've been trying to compile the game from source on Ubuntu using the latest SVN revision, and this goes ok until I click on any of the menu items that actually starts a game (tutorial, start new campaign etc.), then I get thrown out with a segmentation fault. I'm trying this on two different laptops, specifications:

1:
CPU: Intel Core 2 T7200
Video card: ATI Mobility Radeon X1600

2;
CPU: Intel Pentium M
Video card: ATI Mobility Radeon X700

The weird thing is that before the weekend (29th of May) it did not work on laptop 2, but it did on 1. Now after the weekend it doesn't work on either, both giving a segmentation fault. I saw on the main page that on May 31st a new version was released, and I was wondering if it might have to do with that? I have no clue otherwise how it did work previously and does not anymore now.

This is the complete dump file created by the error:

Code: Select all

Program: /usr/local/bin/warzone2100(warzone2100)
Command line: "warzone2100" 
Version: Version TRUNK r7640 - Built Jun  2 2009 - DEBUG
Distributor: UNKNOWN
Compiled on: Jun  2 2009 15:39:52
Compiled by: GCC 4.3.3
Executed on: Tue Jun  2 16:42:09 2009
Operating system: Linux
Node name: Ubuntu
Release: 2.6.28-11-generic
Version: #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
Machine: i686

Pointers: 32bit

Compiled against PhysicsFS version: 1.0.0
Running with PhysicsFS version: 1.0.0

Dump caused by signal: SIGSEGV: Invalid memory reference: Address not mapped to object

Log message: error   |04:42:13: [rebuildSearchPath] Failed to remove path /usr/local/data/ again

GLIBC raw backtrace:
warzone2100[0x82a1508]
[0xb7fb9410]
/usr/lib/dri/r300_dri.so(_tnl_draw_prims+0x8f9)[0xb6790df9]
/usr/lib/dri/r300_dri.so[0xb6788bcf]
warzone2100[0x8205fec]
warzone2100[0x820620b]
warzone2100(drawTerrain+0xcbf)[0x820bf68]
warzone2100[0x80debf6]
warzone2100[0x80de2cc]
warzone2100(draw3DScene+0xf1)[0x80dd905]
warzone2100(displayWorld+0x3f0)[0x80e9eac]
warzone2100(gameLoop+0xeba)[0x815944a]
warzone2100[0x815b4bd]
warzone2100[0x815b8be]
warzone2100(main+0x7ae)[0x815c07f]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb771c775]
warzone2100[0x80b4221]

GDB extended backtrace:
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Attaching to program: /usr/local/bin/warzone2100, process 3680
Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /usr/lib/libphysfs-1.0.so.0...done.
Loaded symbols for /usr/lib/libphysfs-1.0.so.0
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libvorbisfile.so.3...done.
Loaded symbols for /usr/lib/libvorbisfile.so.3
Reading symbols from /usr/lib/libvorbis.so.0...done.
Loaded symbols for /usr/lib/libvorbis.so.0
Reading symbols from /usr/lib/libogg.so.0...done.
Loaded symbols for /usr/lib/libogg.so.0
Reading symbols from /usr/lib/libtheora.so.0...done.
Loaded symbols for /usr/lib/libtheora.so.0
Reading symbols from /usr/lib/libopenal.so.1...done.
Loaded symbols for /usr/lib/libopenal.so.1
Reading symbols from /usr/lib/libGLC.so.0...done.
Loaded symbols for /usr/lib/libGLC.so.0
Reading symbols from /usr/lib/libGL.so.1...done.
Loaded symbols for /usr/lib/libGL.so.1
Reading symbols from /usr/lib/libGLU.so.1...done.
Loaded symbols for /usr/lib/libGLU.so.1
Reading symbols from /lib/libpopt.so.0...done.
Loaded symbols for /lib/libpopt.so.0
Reading symbols from /usr/lib/libsqlite3.so.0...done.
Loaded symbols for /usr/lib/libsqlite3.so.0
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb73646f0 (LWP 3680)]
[New Thread 0x9ed6ab90 (LWP 3690)]
[New Thread 0x9f56bb90 (LWP 3689)]
[New Thread 0x9fd6cb90 (LWP 3688)]
[New Thread 0xb7102b90 (LWP 3687)]
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libdirectfb-1.0.so.0...done.
Loaded symbols for /usr/lib/libdirectfb-1.0.so.0
Reading symbols from /usr/lib/libfusion-1.0.so.0...done.
Loaded symbols for /usr/lib/libfusion-1.0.so.0
Reading symbols from /usr/lib/libdirect-1.0.so.0...done.
Loaded symbols for /usr/lib/libdirect-1.0.so.0
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /usr/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/lib/libfontconfig.so.1
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libfribidi.so.0...done.
Loaded symbols for /usr/lib/libfribidi.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libXext.so.6...done.
Loaded symbols for /usr/lib/libXext.so.6
Reading symbols from /usr/lib/libXxf86vm.so.1...done.
Loaded symbols for /usr/lib/libXxf86vm.so.1
Reading symbols from /usr/lib/libXdamage.so.1...done.
Loaded symbols for /usr/lib/libXdamage.so.1
Reading symbols from /usr/lib/libXfixes.so.3...done.
Loaded symbols for /usr/lib/libXfixes.so.3
Reading symbols from /usr/lib/libdrm.so.2...done.
Loaded symbols for /usr/lib/libdrm.so.2
Reading symbols from /usr/lib/libxcb.so.1...done.
Loaded symbols for /usr/lib/libxcb.so.1
Reading symbols from /lib/tls/i686/cmov/librt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /usr/lib/libexpat.so.1...done.
Loaded symbols for /usr/lib/libexpat.so.1
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/lib/libXdmcp.so.6
Reading symbols from /usr/lib/libXcursor.so.1...done.
Loaded symbols for /usr/lib/libXcursor.so.1
Reading symbols from /usr/lib/libXrender.so.1...done.
Loaded symbols for /usr/lib/libXrender.so.1
Reading symbols from /usr/lib/dri/r300_dri.so...done.
Loaded symbols for /usr/lib/dri/r300_dri.so
Reading symbols from /usr/lib/alsa-lib/libasound_module_pcm_pulse.so...done.
Loaded symbols for /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
Reading symbols from /usr/lib/libpulse.so.0...done.
Loaded symbols for /usr/lib/libpulse.so.0
Reading symbols from /usr/lib/libSM.so.6...done.
Loaded symbols for /usr/lib/libSM.so.6
Reading symbols from /usr/lib/libICE.so.6...done.
Loaded symbols for /usr/lib/libICE.so.6
Reading symbols from /lib/libcap.so.2...done.
Loaded symbols for /lib/libcap.so.2
Reading symbols from /usr/lib/libgdbm.so.3...done.
Loaded symbols for /usr/lib/libgdbm.so.3
Reading symbols from /lib/libuuid.so.1...done.
Loaded symbols for /lib/libuuid.so.1
Reading symbols from /lib/libattr.so.1...done.
Loaded symbols for /lib/libattr.so.1
0xb7fb9430 in __kernel_vsyscall ()
(gdb) #0  0xb7fb9430 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb77a52cb in waitpid () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2  0x082a13a3 in gdbExtendedBacktrace (dumpFile=12) at exceptionhandler.c:483
	gdbPipe = 14
	pid = 3691
	status = -1078113208
	wpid = 2
	gdbCommands = "backtrace full\nframe 4\ndisassemble\ninfo registers\nquit\n"
	__PRETTY_FUNCTION__ = "gdbExtendedBacktrace"
#3  0x082a1647 in posixExceptionHandler (signum=11, siginfo=0xbfbd4c5c, 
    sigcontext=0xbfbd4cdc) at exceptionhandler.c:588
	btBuffer = {0x82a1508, 0xb7fb9410, 0xb6790df9, 0xb6788bcf, 0x8205fec, 
  0x820620b, 0x820bf68, 0x80debf6, 0x80de2cc, 0x80dd905, 0x80e9eac, 
  0x815944a, 0x815b4bd, 0x815b8be, 0x815c07f, 0xb771c775, 0x80b4221, 0x0, 
  0x0, 0x0}
	btSize = 17
	dumpFilename = "/tmp/warzone2100.gdmp-igYNde"
	dumpFile = 12
	signal = 0x8319c94 "SIGSEGV: Invalid memory reference: Address not mapped to object"
	allreadyRunning = 1
	gdmpPath = "/tmp/warzone2100.gdmp-XXXXXX"
	__PRETTY_FUNCTION__ = "posixExceptionHandler"
#4  <signal handler called>
No symbol table info available.
#5  0xb6857320 in vbo_rebase_prims () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#6  0xb6790df9 in _tnl_draw_prims () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#7  0xb6788bcf in ?? () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#8  0x08205fec in finishDrawRangeElements () at terrain.c:148
	__FUNCTION__ = "finishDrawRangeElements"
	__PRETTY_FUNCTION__ = "finishDrawRangeElements"
#9  0x0820620b in addDrawRangeElements (mode=4, start=1024, end=1536, 
    count=2700, type=5125, offset=5400) at terrain.c:197
	__FUNCTION__ = "addDrawRangeElements"
	__PRETTY_FUNCTION__ = "addDrawRangeElements"
#10 0x0820bf68 in drawTerrain () at terrain.c:1191
	i = 128
	j = 128
	x = 0
	y = 2
	texPage = 166040888
	colour = {byte = {r = 1 '\001', g = 1 '\001', b = 1 '\001', 
    a = 255 'ÿ'}, rgba = 4278255873, vector = "\001\001\001ÿ"}
	layer = -1233838734
	offset = -1078110248
	size = 165886080
	xPos = 8576
	yPos = 8576
	distance = 43767368
	paramsX = {0, 0, -6.10351562e-05, 0}
	paramsY = {6.10351562e-05, 0, 0, 0}
	__FUNCTION__ = "drawTerrain"
#11 0x080debf6 in drawTiles (player=0x86e8860) at display3d.c:817
	i = 65
	j = 65
	rx = 57
	rz = 59
#12 0x080de2cc in displayTerrain () at display3d.c:612
No locals.
#13 0x080dd905 in draw3DScene () at display3d.c:397
	bPlayerHasHQ = 0
	sFormInit = {formID = 0, majorID = 0, minorID = 0, id = 0, style = 0, 
  x = 0, y = 0, width = 0, height = 0, pDisplay = 0, pCallback = 0, 
  pUserData = 0x0, UserData = 0, disableChildren = 0, majorPos = 0, 
  minorPos = 0, majorSize = 0, minorSize = 0, majorOffset = 0, 
  minorOffset = 0, tabVertOffset = 0, tabHorzOffset = 0, 
  tabMajorThickness = 0, tabMinorThickness = 0, tabMajorGap = 0, 
  tabMinorGap = 0, numStats = 0, numButtons = 0, numMajor = 0, aNumMinors = {
    0 <repeats 40 times>}, TabMultiplier = 0, pTip = 0x0, apMajorTips = {
    0x0 <repeats 40 times>}, apMinorTips = {{0x0, 0x0, 0x0, 0x0, 
      0x0} <repeats 40 times>}, pTabDisplay = 0, pFormDisplay = 0}
	sButInit = {formID = 0, majorID = 0, minorID = 0, id = 0, style = 0, 
  x = 0, y = 0, width = 0, height = 0, pDisplay = 0, pCallback = 0, 
  pUserData = 0x0, UserData = 0, pText = 0x0, pTip = 0x0, 
  FontID = font_regular}
	formUP = false
	flashtimer = 0
#14 0x080e9eac in displayWorld () at display.c:1358
	pos = {x = 0, y = 23, z = 13}
#15 0x0815944a in gameLoop () at loop.c:570
	psCurr = (DROID *) 0x0
	psNext = (DROID *) 0x0
	psCBuilding = (STRUCTURE *) 0x0
	psNBuilding = (STRUCTURE *) 0x0
	psCFeat = (FEATURE *) 0x0
	psNFeat = (FEATURE *) 0x0
	i = 8
	widgval = 3076784505
	quitting = 0
	intRetVal = INT_NONE
	clearMode = 4
	__FUNCTION__ = "gameLoop"
	__PRETTY_FUNCTION__ = "gameLoop"
#16 0x0815b4bd in runGameLoop () at main.c:653
	__FUNCTION__ = "runGameLoop"
#17 0x0815b8be in mainLoop () at main.c:841
	event = {type = 4 '\004', active = {type = 4 '\004', gain = 0 '\0', 
    state = 0 '\0'}, key = {type = 4 '\004', which = 0 '\0', state = 0 '\0', 
    keysym = {scancode = 166 'Š', sym = 4294705154, mod = KMOD_NONE, 
      unicode = 0}}, motion = {type = 4 '\004', which = 0 '\0', 
    state = 0 '\0', x = 678, y = 310, xrel = 2, yrel = -4}, button = {
    type = 4 '\004', which = 0 '\0', button = 0 '\0', state = 0 '\0', 
    x = 678, y = 310}, jaxis = {type = 4 '\004', which = 0 '\0', 
    axis = 0 '\0', value = 678}, jball = {type = 4 '\004', which = 0 '\0', 
    ball = 0 '\0', xrel = 678, yrel = 310}, jhat = {type = 4 '\004', 
    which = 0 '\0', hat = 0 '\0', value = 0 '\0'}, jbutton = {
    type = 4 '\004', which = 0 '\0', button = 0 '\0', state = 0 '\0'}, 
  resize = {type = 4 '\004', w = 20316838, h = -262142}, expose = {
    type = 4 '\004'}, quit = {type = 4 '\004'}, user = {type = 4 '\004', 
    code = 20316838, data1 = 0xfffc0002, data2 = 0x0}, syswm = {
    type = 4 '\004', msg = 0x13602a6}}
#18 0x0815c07f in main (argc=1, argv=0xbfbd5e34) at main.c:1069
	__FUNCTION__ = "main"
	__PRETTY_FUNCTION__ = "main"
(gdb) #4  <signal handler called>
(gdb) Dump of assembler code for function __kernel_rt_sigreturn:
0xb7fb9410 <__kernel_rt_sigreturn+0>:	mov    $0xad,%eax
0xb7fb9415 <__kernel_rt_sigreturn+5>:	int    $0x80
0xb7fb9417 <__kernel_rt_sigreturn+7>:	nop    
End of assembler dump.
(gdb) eax            0xfffffe00	-512
ecx            0xbfbd4b8c	-1078113396
edx            0x0	0
ebx            0xb68e6ff4	-1232179212
esp            0xbfbd4c50	0xbfbd4c50
ebp            0xbfbd54a8	0xbfbd54a8
esi            0xa8c	2700
edi            0x2a30	10800
eip            0xb7fb9410	0xb7fb9410 <__kernel_rt_sigreturn>
eflags         0x246	[ PF ZF IF ]
cs             0x73	115
ss             0x7b	123
ds             0x7b	123
es             0x7b	123
fs             0x0	0
gs             0x33	51
(gdb) The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /usr/local/bin/warzone2100, process 3680
I hope someone can help me out, sorry if it has already been asked but I could not find it with the search option. Thanks a lot in advance.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Segmentation fault when starting a game

Post by stiv »

/usr/lib/dri/r300_dri.so
Your graphics driver is crashing. OpenGL support for the various Radeon Mobility chipsets is often problematic, and being a laptop means there is no way to replace a low-end video chipset with a real graphics card.

Things to try:

Turn off compiz or KDE desktop effects

Update your video driver

Use the manufacturer's driver rather than the open source one.

If you are compiling from svn, you might try using the 2.2.0 branch which has lower graphics requirements, rather than trunk.
Phoenix946
Greenhorn
Posts: 9
Joined: 02 Jun 2009, 16:13

Re: Segmentation fault when starting a game

Post by Phoenix946 »

Taking the 2.2 branch version did the trick, it's up and working now. Thank you very much :)
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Segmentation fault when starting a game

Post by Buginator »

Phoenix946 wrote:Taking the 2.2 branch version did the trick, it's up and working now. Thank you very much :)
It looks like the drivers you are using with the Trunk, don't like each other.

Which gfx drivers are you using?
and it ends here.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Segmentation fault when starting a game

Post by cybersphinx »

Phoenix946
Greenhorn
Posts: 9
Joined: 02 Jun 2009, 16:13

Re: Segmentation fault when starting a game

Post by Phoenix946 »

Buginator wrote: It looks like the drivers you are using with the Trunk, don't like each other.

Which gfx drivers are you using?
How do I check that under Ubuntu? :$

I got it working with that older version instead of the Trunk indeed, but when I started playing with the code I got kicked out again, presumably due to the same problem. So perhaps changing something in the drivers will solve that problem, but I can hardly find some proper information concerning how to fix drivers in Ubuntu on the internet.
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Segmentation fault when starting a game

Post by Buginator »

Phoenix946 wrote:quote="Buginator"
It looks like the drivers you are using with the Trunk, don't like each other.

Which gfx drivers are you using?/quote

How do I check that under Ubuntu? :$

I got it working with that older version instead of the Trunk indeed, but when I started playing with the code I got kicked out again, presumably due to the same problem. So perhaps changing something in the drivers will solve that problem, but I can hardly find some proper information concerning how to fix drivers in Ubuntu on the internet.
No idea really, I don't use ubuntu.

I take it the drivers you are using are not fglrx though, (official AMD/ATI drivers), and you are using the open source version instead.
and it ends here.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Segmentation fault when starting a game

Post by cybersphinx »

Should be fixed now.