Frictional Games Forum (read-only)

Full Version: OALWrapper goes sigsegv when trying to load boat_level/boat_horn1.ogg
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there.

Yesterday I tried to compile Penumbra Overture on my machine (Arch Linux) and had to fight against some compiling errors. Eventually I managed to get it to compile and run (on either modern GCC and Clang), and maybe I'll make another post explaining in detail what my changes are so that they can be integrated.

But coming to OALWrapper, so far I found three bugs with the current state of art:

- the OALWrapper I recently compiled ended up getting segmentation faults with some of the libraries provided (,,, so I LD_PRELOAD'd the ones in my system.
- When queried what my audio card preference is, the HPL1 configuration manager returned a "NULL" as card name. Yes, a string "NULL" rather than a NULL value, causing OpenAL to reject all my sink devices (I have PulseAudio). Patched Smile

Now we come to the big deal: when entering the first level (the boat map) OALWrapper gets a segmentation fault when trying to open sounds/boat_level/boat_horn1.ogg . In particular, if I replace that file with *anything* (let it be a tone impulse generated with Audacity or anything else) it still crashes. It never crashes earlier, only exactly when it tries to load an OGG at that file.

After some debugging it turns out the problem is not even in OpenAL or OALWrapper but in libogg. Basically the file header parsing causes a stack overflow, and I still have no clue why this happens.

I tried playing around and compiled my versions of libogg and libvorbis to have libraries with debug symbols to work on and... they have the same issue, and I was not able to find out why.

Ok I could just remove that file, but I don't want to break the "Penumbra" experience.

I am attaching this dump ( , be wary of its size!), so that you can inspect it with gdb. It does only contain the debug symbols for the game, not libvorbis or libogg.
As I mentioned somewhere else the problem was that AngelScript did not preserve stack alignment, causing issues as libogg in my system is optimized to use SSE instructions.

To fix this, one can define AS_MAX_COMPATIBILITY when compiling AngelScript 2.7 source code (do not use the predistributed version!).