Author Topic: pb2 segfaults on linux after pressing a key when resolution was changed  (Read 1778 times)

psychon

  • Guest
First of all: this game is great.

Every time i change anything in the Video Settings tab, pb2 segfaults after pressing any key.
I use gentoo linux and here is a backtrace produced via gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1478019408 (LWP 1322)]
0xa7fef896 in do_lookup_x () from /lib/ld-linux.so.2
(gdb) bt
#0  0xa7fef896 in do_lookup_x () from /lib/ld-linux.so.2
#1  0xa7fefe3d in _dl_lookup_symbol_x () from /lib/ld-linux.so.2
#2  0xa7ff2f09 in fixup () from /lib/ld-linux.so.2
#3  0xa7ff30e0 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#4  0xa7bb1af2 in XLookupString () from /usr/lib/libX11.so.6
#5  0xaf8f981c in ?? ()
#6  0x00000000 in ?? ()

On start it says: Paintball 2 -- Version 3.21+r0.16

Hope this can be fixed...

psychon

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #1 on: January 31, 2006, 02:58:50 PM »
Thanks for the report.  I may not be able to reproduce it.  Is there any chance you could compile the source and run the debug version to find out exactly where it crashed?

Also, aside from crashing after changing resolutions, does everything else run OK?  Lots of people have had problems with the sound and mouse input.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #2 on: February 01, 2006, 01:52:28 AM »
I think I had the same problem, but I had fluxbox launch pb2 and never thought to run it from console to grab the seg fault info.

psychon

  • Guest
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #3 on: February 01, 2006, 05:41:40 AM »
if you give me the link, i would like to test it (i newer saw that link) and no, my sounds doesnt workd either:

Paintball 2 -- Version 3.21+r0.16
execing configs/config.cfg
Console initialized.

------- sound initialization -------
/dev/dsp: Input/output error
SNDDMA_Init: Could not mmap /dev/dsp.
------- Loading ref_glx.so -------
LoadLibrary("./ref_glx.so")
ref_gl version: PB2GL 0.14
Using libGL.so for OpenGL...Initializing OpenGL display
...setting mode 3: 640 480
Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".
I: got 5 bits of red
I: got 5 bits of blue
I: got 6 bits of green
I: got 24 bits of depth
I: got 0 bits of alpha
I: got 8 bits of stencil
------------------------------------
====== Paintball II Initialized ======

recursive shutdown

sound newer worked and i dont know why. and it is not just changing resolution, it's after changing ANYthing on the cideo tab.
mouse problem are there too, they come and disappear. didn't anoy me so far ;).
and no, i dont know how to enable XFree86-VidModeExtension, i just managed to enable the dga thing ;)

psychon

  • PGP
  • Posts: 2
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #4 on: February 01, 2006, 05:48:56 AM »
so the next one...(now finally i registered):
i found the source zip-file and this is the result:
psycho@LiNuX ~/Eigene Downloads/paintball2 $ make
make targets BUILDDIR=debugi386 CFLAGS="-Wall -pipe -Dstricmp=strcasecmp -D_inline= -DSleep=usleep -pg -g -DLINUX_VERSION='\"3.21+r0.16 Debug\"'"
make[1]: Entering directory `/home/psycho/Eigene Downloads/paintball2'
gcc -Wall -pipe -Dstricmp=strcasecmp -D_inline= -DSleep=usleep -pg -g -DLINUX_VERSION='"3.21+r0.16 Debug"' -o debugi386/a3d/q2a3d.o -c a3d/q2a3d.c
Assembler messages:
FATAL: can't create debugi386/a3d/q2a3d.o: No such file or directory
make[1]: *** [debugi386/a3d/q2a3d.o] Fehler 2
make[1]: Leaving directory `/home/psycho/Eigene Downloads/paintball2'
make: *** [build_debug] Fehler 2
psycho@LiNuX ~/Eigene Downloads/paintball2 $ ls debugi386/
client/ ded/    game/   ref_gl/

anything i have to know? the readme.txt didnt help so far...

EDIT:
 mkdir debugi386/a3d
make build_debug

that works for a while but then:
gcc -Wall -pipe -Dstricmp=strcasecmp -D_inline= -DSleep=usleep -pg -I/usr/kde/3.5/include/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -DLINUX_VERSION='"3.21+r0.16 Debug"' -o debugi386/client/snd_alsa.o -c linux/snd_alsa.c
linux/snd_alsa.c: In function `SNDDMA_Init':
linux/snd_alsa.c:159: Fehler: »buffer_size« not declared (first use of this function)
linux/snd_alsa.c:159: Fehler: not enough arguments for »snd_pcm_hw_params_get_buffer_size«
linux/snd_alsa.c:160: Fehler: »frame_size« not declared
make[1]: *** [debugi386/client/snd_alsa.o] Fehler 1
make[1]: Leaving directory `/home/psycho/Eigene Downloads/paintball2'
make: *** [build_debug] Fehler 2

i cut off the warnings and translated from german to english...

EDIT2:
so i disabled alsa (sound doesnt work with this version, too) and here is the output:

(gdb) run
Starting program: /home/psycho/Eigene Downloads/paintball2/debugi386/paintball2
[Thread debugging using libthread_db enabled]
[New Thread -1479333232 (LWP 10942)]
Paintball 2 -- Version 3.21+r0.16 Debug
execing configs/config.cfg
Console initialized.

------- sound initialization -------
/dev/dsp: Input/output error
SNDDMA_Init: Could not mmap /dev/dsp.
------- Loading ref_glx.so -------
LoadLibrary("./ref_glx.so")
ref_gl version: PB2GL 0.14
Using libGL.so for OpenGL...Initializing OpenGL display
...setting mode 3: 640 480
Xlib:  extension "XFree86-VidModeExtension" missing on display ":1.0".
I: got 5 bits of red
I: got 5 bits of blue
I: got 6 bits of green
I: got 24 bits of depth
I: got 0 bits of alpha
I: got 8 bits of stencil
------------------------------------
====== Paintball II Initialized ======

execing configs/default.cfg
execing configs/default.cfg
execing configs/default.cfg
------- Loading ref_glx.so -------
LoadLibrary("./ref_glx.so")
ref_gl version: PB2GL 0.14
Using libGL.so for OpenGL...Initializing OpenGL display
...setting mode 6: 1024 768
Xlib:  extension "XFree86-VidModeExtension" missing on display ":1.0".
I: got 5 bits of red
I: got 5 bits of blue
I: got 6 bits of green
I: got 24 bits of depth
I: got 0 bits of alpha
I: got 8 bits of stencil
------------------------------------
------- Loading ref_glx.so -------
LoadLibrary("./ref_glx.so")
ref_gl version: PB2GL 0.14
Using libGL.so for OpenGL...Initializing OpenGL display
...setting mode 6: 1024 768
Xlib:  extension "XFree86-VidModeExtension" missing on display ":1.0".
I: got 5 bits of red
I: got 5 bits of blue
I: got 6 bits of green
I: got 24 bits of depth
I: got 0 bits of alpha
I: got 8 bits of stencil
------------------------------------
------- Loading gamei386.so -------
LoadLibrary(./pball/gamei386.so)
-------------------------
47 CMDlist entrys found.
-------------------------
==== PB2 InitGame ====
autojoin on, normal
=== Rotation Init ===
13 maps added to rotation.
------- Server Initialization -------
mapname: midnight2
==== PB2 InitMatch ====
== Map Loaded: midnight2 ==
=== Team Flag CTF ===
0 entities inhibited
0 teams with 0 entities
-------------------------------------
psychon connected [0.0.0.0:0]
0.0.0.0:0: client_connect


 \uffff;

\uffff]Midnight \uffff\uffff - The Inversion

By jitspoe

Downloading models\plants\bigleaf2.md2
Server does not have this file.
psychon entered the game (build 14).




            Paintball 2 v1.81
            by Digital Paint
      http://www.digitalpaint.org/
   #Paintball on Irc.EnterTheGame.Com


           Message of the Day
           \uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff

    Man cannot live on bread alone.
   He also needs high-speed internet.

  [Edit this MOTD file as you see fit]




==== ShutdownGame ====
------- Loading gamei386.so -------
LoadLibrary(./pball/gamei386.so)
-------------------------
47 CMDlist entrys found.
-------------------------
==== PB2 InitGame ====
autojoin on, normal
=== Rotation Init ===
13 maps added to rotation.
------- Server Initialization -------
mapname: midnight2
==== PB2 InitMatch ====
== Map Loaded: midnight2 ==
=== Team Flag CTF ===
0 entities inhibited
0 teams with 0 entities
-------------------------------------
Server restarted
Server disconnected, reconnecting
Connecting to localhost...
0.0.0.0:0: challenge
psychon connected [0.0.0.0:0]
0.0.0.0:0: client_connect


 \uffff;

\uffff]Midnight \uffff\uffff - The Inversion

By jitspoe

==== ShutdownGame ====
------- Loading gamei386.so -------
LoadLibrary(./pball/gamei386.so)
-------------------------
47 CMDlist entrys found.
-------------------------
==== PB2 InitGame ====
autojoin on, normal
=== Rotation Init ===
13 maps added to rotation.
------- Server Initialization -------
mapname: midnight2
==== PB2 InitMatch ====
== Map Loaded: midnight2 ==
=== Team Flag CTF ===
0 entities inhibited
0 teams with 0 entities
-------------------------------------
psychon entered the game (build 14).




            Paintball 2 v1.81
            by Digital Paint
      http://www.digitalpaint.org/
   #Paintball on Irc.EnterTheGame.Com


           Message of the Day
           \uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff

    Man cannot live on bread alone.
   He also needs high-speed internet.

  [Edit this MOTD file as you see fit]




Server restarted
Server disconnected, reconnecting
Can't "cmd", not connected
Connecting to localhost...
0.0.0.0:0: challenge
psychon connected [0.0.0.0:0]
0.0.0.0:0: client_connect


 \uffff;

\uffff]Midnight \uffff\uffff - The Inversion

By jitspoe

psychon entered the game (build 14).




            Paintball 2 v1.81
            by Digital Paint
      http://www.digitalpaint.org/
   #Paintball on Irc.EnterTheGame.Com


           Message of the Day
           \uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff

    Man cannot live on bread alone.
   He also needs high-speed internet.

  [Edit this MOTD file as you see fit]





Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1479333232 (LWP 10942)]
0xa7f3c896 in do_lookup_x () from /lib/ld-linux.so.2
(gdb) bt
#0  0xa7f3c896 in do_lookup_x () from /lib/ld-linux.so.2
#1  0xa7f3ce3d in _dl_lookup_symbol_x () from /lib/ld-linux.so.2
#2  0xa7f3ff09 in fixup () from /lib/ld-linux.so.2
#3  0xa7f400e0 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#4  0xa7a7fe92 in _XlcCurrentLC () from /usr/lib/libX11.so.6
#5  0x089cb8a0 in ?? ()
#6  0xa7af2c88 in ?? () from /usr/lib/libX11.so.6
#7  0x089f2738 in ?? ()
#8  0xa7a8a385 in _XkbGetCharset () from /usr/lib/libX11.so.6
#9  0xa7abadf2 in MASK () from /usr/lib/libX11.so.6
#10 0x00000000 in ?? ()
(gdb)

i changed the resolution, started a game (only once) and tried to walk (press w)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #5 on: February 01, 2006, 11:10:55 AM »
Hm, it looks like all that stuff is within libX, not within paintball2.

Well, I think I have a general idea of what's causing the problem.  The linux code is a real mess.  The input is tied in with the video library.  When you change video settings, it completely reloads that library.  Something must not be loading properly.  What distro are you using?

psychon

  • PGP
  • Posts: 2
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #6 on: February 02, 2006, 09:10:38 AM »
im using gentoo linux, pretty much the stable version.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: pb2 segfaults on linux after pressing a key when resolution was changed
« Reply #7 on: February 02, 2006, 07:05:38 PM »
I was using gentoo as well, on a 2.6 kernel.