Crashes when using sdlmixer and vorbisfile


ivanovic

Active Member
Joined
Aug 4, 2006
Messages
784
Hi folks!

As some of you might know there was no Wesnoth dev release available for the Pandora for quite some time. The reason is/was a nasty crash. It basically happened after the introduction of a new dependency against libvorbisfile.so. Last week I was able to do some testing and came to a strange result:

State 1) Playback of ogg vorbis files works nicely via sdl-mixer. Code related to libvorbisfile is not included (masked via ifdefs) and the lib is not linked in.

State 2) The game crashes as soon as music (format: ogg vorbis) is played, normal uncompressed audiofiles work nicely. This happens as soon as libvorbisfile is linked in during building. The codepath itself is still commented out using ifdef! The crash is a plain segfault.

Of course I am building using my crosscompiler toolchain.

Does anyone of you have an idea what the reason for this could be? If you want to see this happen for yourself follow these steps:

1) Download a Wesnoth git checkout () or the 1.11.8 release tarball.

2) Make sure the crosscompiler toolchain is installed.

3) Create a build dir and run this cmake command for setup (adjust the paths so that they match your system!):

PATH=/home/nils/pandora-dev/arm-2011.09/usr/bin:$PATH CFLAGS="-DPANDORA -O3 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp" CXXFLAGS="-DPANDORA -O3 -pipe -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp" cmake -DCMAKE_BUILD_TYPE=release -DENABLE_STRICT_COMPILATION=off -DCMAKE_TOOLCHAIN_FILE=/home/nils/pandora-dev/sdk_utils/PandoraToolchain.cmake -DPKG_CONFIG_EXECUTABLE=/home/nils/pandora-dev/arm-2011.09/bin/arm-none-linux-gnueabi-pkg-config -DSDL_CONFIG=/home/nils/pandora-dev/arm-2011.09/usr/bin/sdl-config -DLIBINTL_INCLUDE_DIR=/home/nils/pandora-dev/arm-2011.09/arm-none-linux-gnueabi/libc/usr/include/ -DPREFERENCES_DIR=wesnoth-1.11_userdata ../wesnoth-1.11.8

4) Build wesnoth using a call to "make" (or use make -j6 to run it with more threads).

5) Download the pnd of the 1.11.8 release from repo.openpandora.org

6) Put the pnd on your sdcard. In the pandora/appdata/wesnoth-1.11 folder create a bin/ folder

7) Please the created "wesnoth" binary into the bin folder

Now the game should use your selfcompiled version of the game. It should crash when starting after the loadscreen is shown.

If you rerun cmake adding "-DENABLE_PANDORA=on" the created binary will start the game. Since the CFLAGS and CXXFLAGS already include the PANDORA define the code itself is not used. The only difference between the two builds is that libvorbisfile is linked in.

Can someone help me find out what is broken here? Was sdlmixer from our system compiled against a different vorbis version? I can't understand this segfault so am looking for your help to find the reason and maybe fix it. Sorry that I have not created a very simplified testcase. But since libvorbisfile is not called from the code I am really puzzled by this segfault...
 
If this is related to libvirbis you could try to compile a newer version of it and include it in the pnd.


I think I had something like this once, too.
 
If this is a general libvorbis problem I would prefer to see a version bump of the lib for the whole OS! Has anyone made similar experiences?
 
I had the same problem while attempting to update SDL_mixer in the OS. After some digging in xiph/vorbis svn I've found that they changed all the structures (which means ABI) and did not not change the lib version. We can't update now as it will break unknown number of PNDs that link to the old lib. So you have to include the newer lib or compile against the headers that were used for OS, which are somewhere in http://openpandora.org/firmware/sources/ or DjWillis old toolchain.
 
Back
Top