1

Topic: segmentation fault

hi.

i'm using neverball on zenwalk (slackware linux). however, i created a package and the game works fine, except for me and some others get a segmentation fault when putting Options -> Audio to Low. any ideas what the problem might be?

thx,

hennes.

2

Re: segmentation fault

I have had this problem with Windows builds.  It seems that the access error occurs in SDL_mixer while trying to read some kind of a Timidity configuration file.  I solved it by rebuilding SDL_mixer without any Timidity support.  (Another option would probably be to install this library.)

3

Re: segmentation fault

thx, for the reply. i'll try it.

4

Re: segmentation fault

Welcome to the forums, hennes!

(I'm moving this to the Neverball tech support forum, as it is not related to the Nevertable.)

5

Re: segmentation fault

sorry, i didn't notice this subsection of the forum. but actually the problem keeps on struggling us. i contacted some of our admins about our sdl-package and it indeed has been build with support. he replicated the segfault. here is what he posted

Hi,

I've rebuilt it locally and replicated the segfault. Here is the GDB output:

Neverball
Quote
root[neverball-1.4.0]# gdb neverball
GNU gdb 6.6
Copyright (C) 2006 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 "i486-slackware-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /root/WORK/neverball/neverball-1.4.0/neverball
[Thread debugging using libthread_db enabled]
[New Thread -1215001952 (LWP 1828)]
[New Thread -1216267376 (LWP 1831)]
[Thread -1216267376 (LWP 1831) exited]
[New Thread -1216267376 (LWP 1833)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1215001952 (LWP 1828)]
0xb7c14253 in strlen () from /lib/libc.so.6
(gdb) backtrace
#0  0xb7c14253 in strlen () from /lib/libc.so.6
#1  0xb7e18711 in open_file () from /usr/lib/libSDL_mixer-1.2.so.0
#2  0xb7e22b08 in ?? () from /usr/lib/libSDL_mixer-1.2.so.0
#3  0xb7e281ff in ?? () from /usr/lib/libSDL_mixer-1.2.so.0
#4  0x00000001 in ?? ()
#5  0x00000002 in ?? ()
#6  0x00000000 in ?? ()

Neverputt
Quote
root[neverball-1.4.0]# gdb neverputt
GNU gdb 6.6
Copyright (C) 2006 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 "i486-slackware-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /root/WORK/neverball/neverball-1.4.0/neverputt
[Thread debugging using libthread_db enabled]
[New Thread -1214838112 (LWP 1839)]
[New Thread -1216103536 (LWP 1842)]
[Thread -1216103536 (LWP 1842) exited]
[New Thread -1216103536 (LWP 1843)]
[Thread -1216103536 (LWP 1843) exited]

Program exited normally.
(gdb) backtrace
No stack.
(gdb)

Dynamic Executables: Neverball
Quote
ldd neverball
        linux-gate.so.1 =>  (0xb7f93000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7f00000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7edb000)
        libSDL_image-1.2.so.0 => /usr/lib/libSDL_image-1.2.so.0 (0xb7ec0000)
        libSDL_ttf-2.0.so.0 => /usr/lib/libSDL_ttf-2.0.so.0 (0xb7ebb000)
        libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0xb7e53000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7de6000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7dd2000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0xb7d73000)
        libm.so.6 => /lib/libm.so.6 (0xb7d4c000)
        libc.so.6 => /lib/libc.so.6 (0xb7c0a000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7b21000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7b13000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7b10000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7b08000)
        libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0xb7aaa000)
        libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0xb7aa2000)
        libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0xb7a90000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7a8c000)
        /lib/ld-linux.so.2 (0xb7f94000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0xb7a51000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7a31000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0xb79dd000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb79d7000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb79ce000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb79cc000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb79b6000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb79b3000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb79ad000)

Dynamics: Neverputt
Quote
ldd neverputt
        linux-gate.so.1 =>  (0xb7f9d000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7f0a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7ee5000)
        libSDL_image-1.2.so.0 => /usr/lib/libSDL_image-1.2.so.0 (0xb7eca000)
        libSDL_ttf-2.0.so.0 => /usr/lib/libSDL_ttf-2.0.so.0 (0xb7ec5000)
        libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0xb7e5d000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7df0000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7ddc000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0xb7d7d000)
        libm.so.6 => /lib/libm.so.6 (0xb7d56000)
        libc.so.6 => /lib/libc.so.6 (0xb7c14000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7b2b000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7b1d000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7b1a000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7b12000)
        libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0xb7ab4000)
        libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0xb7aac000)
        libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0xb7a9a000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7a96000)
        /lib/ld-linux.so.2 (0xb7f9e000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0xb7a5b000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7a3b000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0xb79e7000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb79e1000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb79d8000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb79d6000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb79c0000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb79bd000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb79b7000)

SDL Versions:
SDL-1.2.11.tar.bz2
SDL_image-1.2.5.tar.bz2
SDL_mixer-1.2.7.tar.bz2
SDL_net-1.2.6.tar.bz2
SDL_ttf-2.0.8.tar.bz2


The fact Neverball segfaults but Neverputt keeps on running with the SAME options is suspicious to me. Please send these GDB backtraces, SDL versions and LDD outputs to your Neverball contacts for a solution. They need to fix this problem. At this time I don't want to remove timidity support from SDL_mixer and risk ruining someone else's packages.

They are coders, they can fix their code.

Smiley

Michael

i know you actually don't "need" to change your code, but you could share a thought on this problem.

regards

hennes.

6

Re: segmentation fault

hi.

here you can see the output of make with debugging enabled, perhaps it's useful too.

7

Re: segmentation fault

hi.

another thing i discovered:

i can change the sound-settings in the file neverballrc in the .neverball-folder of my home-directory. it's recognized by the game when i enter

audio_rate           22050

or

audio_rate           44100

in this file. but when i do this from inside the game by selecting audio->high/low i get the segfault. i hope this helps somehow.

regards

hennes.

8

Re: segmentation fault

Take a look at this e-mail:  patch for SDL_mixer-1.2.7.  That is all I could find about this problem, but I am pretty sure that this is a bug in SDL_mixer, not Neverball.  Note that the poster mentions "opening SDL_mixer twice", which explains why it works if you change the settings in the configuration file, but fails in-game where SDL_mixer is in fact opened twice.  The fact that Neverball does not segfault if SDL_mixer does not include support for Timidity also suggests that the problem is not in Neverball.  Neverball doesn't even use MIDI.

9

Re: segmentation fault

thx for your help. i'll look into this.

10

Re: segmentation fault

By the way, it seems that this bug is already fixed in the latest SDL_mixer release.

11

Re: segmentation fault

thank you so much! that cracked it down. no more segfaults.