Bug 4381 - Segmentation fault on x86_64
Status: ASSIGNED
Alias: None
Product: Aquaria
Classification: Unclassified
Component: Everything
Version: unspecified
Hardware: PC Linux
: P3 normal
Assignee: Ryan C. Gordon
QA Contact: Ryan C. Gordon
URL:
Depends on:
Blocks:
 
Reported: 2009-12-14 13:19 EST by Arcanox
Modified: 2010-06-01 09:30:16 EDT
4 users (show)

See Also:


Attachments
Output of: $ LD_DEBUG=libs ./aquaria 2> aquaria-nocompiz.log (27.35 KB, text/plain)
2009-12-14 13:19 EST, Arcanox
Log on x86 (24.86 KB, text/plain)
2009-12-14 16:33 EST, Michael Monreal

Description Arcanox 2009-12-14 13:19:12 EST
Created attachment 2220 [details]
Output of: $ LD_DEBUG=libs ./aquaria 2> aquaria-nocompiz.log

Starting the game results in a segmentation fault.
Attached a log in hope that it would help.
Comment 1 Michael Monreal 2009-12-14 16:33:34 EST
Created attachment 2221 [details]
Log on x86

I get a similar segfault on Fedora 12, i686 (x86)
Comment 2 Ryan C. Gordon 2010-01-05 00:12:24 EST
It looks like it failed to load OpenGL support, from those logs, but I don't really know if this is the specific issue...it would be more useful to see this thing running in the debugger.

If you could start the game from the command line:

   gdb ./aquaria
   r
   *wait for it to crash*
   bt
   q

The output from the "bt" command could be more useful to me.

--ryan.
Comment 3 Aissen 2010-01-06 17:27:51 EST
Here is the backtrace from the core dump:
#0  0x0834b6e6 in FMOD::ChannelGroup::getPaused(bool*) ()
#1  0x08323da6 in SoundManager::update(float) ()
#2  0x082cf849 in Core::main(float) ()
#3  0x08110127 in DSQ::init() ()
#4  0x081c2753 in main ()

I bet you can do much more since you have debug symbols and sources:

http://rapidshare.com/files/331409115/core.5408.bz2.html
Comment 4 Aissen 2010-01-07 05:24:43 EST
I forgot to add that this is on F12 x86_64 as well.
Comment 5 Arcanox 2010-01-07 19:55:29 EST
Ok, so now, 99 updated packages later, it suddenly works!

I can't find any ways to use gdb to figure out what solved it, are there any? But running LD_DEBUG again there are two differences.

libxcb is loaded (or initialized or something):
> calling init: /usr/lib32/libxcb.so.1
> calling fini: /usr/lib32/libxcb.so.1 [0]

Instead of complaining about busy /dev/dsp it complains about lacking vorbis support:
< AL lib: oss.c:168: Could not open /dev/dsp: Device or resource busy
---
> WARNING: no AL_EXT_vorbis support. We'll use more RAM.

Things that never happened before, due to crashing:
> calling fini: ./aquaria [0]
> calling fini: /home/arcanox/aquaria/libSDL-1.2.so.0 [0]
> calling fini: /home/arcanox/aquaria/libopenal.so.1 [0]
> calling fini: /home/arcanox/aquaria/libstdc++.so.6 [0]
> calling fini: /lib32/libm.so.6 [0]
> calling fini: /home/arcanox/aquaria/libgcc_s.so.1 [0]
> calling fini: /usr/lib32/libXcursor.so.1 [0]
> calling fini: /usr/lib32/libXrender.so.1 [0]
> calling fini: /usr/lib32/libXfixes.so.3 [0]
> calling fini: /usr/lib32/libX11.so.6 [0]
> calling fini: /lib32/libdl.so.2 [0]
> calling fini: /lib32/librt.so.1 [0]
> calling fini: /lib32/libpthread.so.0 [0]
> calling fini: /usr/lib32/libxcb.so.1 [0]
> calling fini: /usr/lib32/libXau.so.6 [0]
> calling fini: /usr/lib32/libXdmcp.so.6 [0]
> calling fini: /lib32/libc.so.6 [0]
Comment 6 Aissen 2010-01-08 03:54:31 EST
No luck of F12 after upgrading.

Arcanox: you didn't say what distribution you were using.
Comment 7 Arcanox 2010-01-08 09:58:00 EST
(In reply to comment #6)
> No luck of F12 after upgrading.
> 
> Arcanox: you didn't say what distribution you were using.

Sorry, I never thought of that.

I'm running Gentoo with a couple of overlays.
Some package versions that might be relevant to the question:

Linux 2.6.31-gentoo-r3 #1 SMP Fri Oct 16 17:57:40 CEST 2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ GNU/Linux

app-emulation/emul-linux-x86-xlibs-20091231
x11-drivers/nvidia-drivers-190.53
sys-libs/glibc-2.11-r1
x11-base/xorg-server-1.7.3.902
Comment 8 Serg Kovrov 2010-02-05 10:29:48 EST
Starting program: /usr/local/games/aquaria/aquaria 
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0xf7f772e2 in SDL_ListModes () from /usr/local/games/aquaria/libSDL-1.2.so.0

(gdb) bt
#0  0xf7f772e2 in SDL_ListModes () from /usr/local/games/aquaria/libSDL-1.2.so.0
#1  0xf7f77c33 in SDL_VideoModeOK () from /usr/local/games/aquaria/libSDL-1.2.so.0
#2  0x0810e612 in DSQ::init() ()
#3  0x081be852 in main ()
Comment 9 Alex 2010-05-06 15:31:53 EDT
Could you devs pleasy say something about required libraries?

Segfault here on an up-to-date x86_64 Arch Linux. ldd shows no missing libs:

$ ldd32 aquaria
        linux-gate.so.1 =>  (0xf77db000)
        libSDL-1.2.so.0 => /home/alex/games/aquaria/libSDL-1.2.so.0 (0xf7743000)
        libopenal.so.1 => /home/alex/games/aquaria/libopenal.so.1 (0xf76f5000)
        libstdc++.so.6 => /home/alex/games/aquaria/libstdc++.so.6 (0xf7609000)
        libm.so.6 => /opt/lib32/lib/libm.so.6 (0xf75bd000)
        libgcc_s.so.1 => /home/alex/games/aquaria/libgcc_s.so.1 (0xf75b1000)
        libc.so.6 => /opt/lib32/lib/libc.so.6 (0xf7465000)
        libdl.so.2 => /opt/lib32/lib/libdl.so.2 (0xf7461000)
        libpthread.so.0 => /opt/lib32/lib/libpthread.so.0 (0xf7448000)
        librt.so.1 => /opt/lib32/lib/librt.so.1 (0xf743f000)
        /lib/ld-linux.so.2 (0xf77dc000)
Comment 10 Ryan C. Gordon 2010-05-07 01:11:06 EDT
The crash in Comment #3 was fixed during the beta (I think Beta 3 had that fix).

As for libraries: it only talks to SDL and OpenAL, but both will dlopen() lots of things. If you're getting an actual crash in-game, I need a backtrace to understand why it's happening (see Comment #2 for details).

Thanks,
--ryan.
Comment 11 Alex 2010-05-07 02:52:50 EDT
I get that segfault on launch. gdb says:

Starting program: /home/alex/games/aquaria/aquaria 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xf7f772e2 in SDL_ListModes () from /home/alex/games/aquaria/libSDL-1.2.so.0

The trace with LD_DEBUG=libs can be found here: http://pastebin.com/Dpzt82Wb


Thanks

lynix
Comment 12 admin 2010-05-11 16:31:41 EDT
(In reply to comment #10)
> The crash in Comment #3 was fixed during the beta (I think Beta 3 had that
> fix).
> 
> As for libraries: it only talks to SDL and OpenAL, but both will dlopen() lots
> of things. If you're getting an actual crash in-game, I need a backtrace to
> understand why it's happening (see Comment #2 for details).
> 
> Thanks,
> --ryan.

I have this Bug too without a fix. I bought the Humble Indie Bundle and the trace from Comment 3 is the same problem i got on Arch Linux x86_64. Is there a solution? I use a Intel Graphics Card

Thanks in advance
Comment 13 Alex 2010-06-01 09:30:16 EDT
Finally got it working here on x86_64 Arch by installing 'lib32-openal', 'lib32-gcc-libs' and 'lib32-sdl'.
Thanks to "Thalic", who made an AUR package out of it (http://aur.archlinux.org/packages.php?ID=37013) :)