Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


OALWrapper goes sigsegv when trying to load boat_level/boat_horn1.ogg
erolmatei Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2020
Reputation: 0
#1
OALWrapper goes sigsegv when trying to load boat_level/boat_horn1.ogg

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 (libvorbis.so, libvorbisfile.so, libogg.so), 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 (https://drive.google.com/open?id=1KNoJ07...TEiGZhYfts , 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.
05-22-2020, 02:44 PM
Find
erolmatei Offline
Junior Member

Posts: 4
Threads: 1
Joined: May 2020
Reputation: 0
#2
RE: OALWrapper goes sigsegv when trying to load boat_level/boat_horn1.ogg

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!).
05-26-2020, 06:46 PM
Find




Users browsing this thread: 1 Guest(s)