Dungeoneer: A Beautiful Escape causes a segmentation fault + audio issues #677

Closed
qptain-Nemo opened this Issue Dec 16, 2015 · 9 comments

Projects

None yet

4 participants

@qptain-Nemo

I'm using the version 0.3.2 from this AUR package https://aur.archlinux.org/packages/easyrpg-player/
When playing Dungeoneer: A Beautiful Escape everything works more or less (the audio playback appears sped up though, most likely because the music tracks have rates under 44100 hz) but when entering the torture dungeon the engine crashes with a segmentation fault.

I tried to check the nightly build from Jenkins, but there the audio issues manifested in the form of horrifying stuttering noise and the direction keys didn't work on the global map so I couldn't change my location.

The game in question is available for free from the following page: http://rpgmaker.net/games/2068/

@fdelapena fdelapena added the Hang label Dec 16, 2015
@fdelapena
Member

Thanks @qptain-Nemo for the report.

(...) the audio playback appears sped up though, most likely because the music tracks have rates under 44100 hz (...)

The audio playback speed issue might be related with the SDL_mixer version used. This problem is well known in SDL_mixer 1.2, because SDL 1.2 does not support other resampling frequencies different than non-power-of-2, e.g. if the opened audio is 44100 Hz, it only allows 44100, 22050 and 11025 without changing the frequency. If the app used 48000 Hz mixing it would allow 24000 and 12000. When a frequency is not valid, it plays faster to fit to the existing mixing frequency (44100). EasyRPG Player can be built with SDL 1.2 yet, maybe your build from AUR is using 1.2.

I tried to check the nightly build from Jenkins, but there the audio issues manifested in the form of horrifying stuttering noise

SDL 2.0 added a new mixer intended to support arbitrary frequencies, however it does not work properly, specially with SDL_mixer 2.0. This game contains some MP3 and all frequencies used are 24000, which generates the noisy output you mentioned. If you downloaded a nightly build from Jenkins, it depends on SDL and SDL_mixer 2.0, which have this issue.

A workaround for this issue is modifying the project frequency with Audacity for each MP3 file and export them, or use another tool like sox or ffmpeg:
captura de pantalla de 2015-12-16 07-20-35
I use this instead of Audacity: ls -1 *.mp3 | parallel ffmpeg -i '{}' -y -ar 44100 '{.}.ogg'

The solution for this particular audio issue is to wait for a fix (there is an opened bug in SDL tracker since years) or make use of a third party resampler (e.g. the speexdsp library) in the EasyRPG Player code or build Player with the OpenAL backend, which is not fully tested yet (and needs better support in the build configuration).

(...) the direction keys didn't work on the global map so I couldn't change my location.

Confirmed the hang here, it fails in the current master code.

(...) when entering the torture dungeon the engine crashes with a segmentation fault.

I can't reach the issue with current master code because of the direction keys issue mentioned bedore.
Could you provide a savegame just before entering the dungeon to check the crash? (zipped attachment here)

@fdelapena
Member

After testing a bit more, the dungeon engine works for me with current master after modifying audio files. Maybe the hang is related with audio issues in SDL_mixer: There are known issues which are fixed already in the SDL Hg repository, e.g. floating point exceptions.

@fdelapena fdelapena removed the Crash label Dec 16, 2015
@Ghabry
Member
Ghabry commented Dec 16, 2015

As fdelepena says we are waiting for a new SDL2 and SDL2_mixer release because the current stable version is unusable for our purposes :(

@fdelapena
Member

Test case for the blocking issue:

easyrpg-player window --start-map-id 10 --test-play --start-position 8 7

The purpose of the test play mode is to bypass the blocked actor by holding the Ctrl key when using arrow keys.

@Ghabry Ghabry added this to the 0.4.1 milestone Dec 16, 2015
@Ghabry
Member
Ghabry commented Dec 16, 2015

Here the music is broken because it uses MP3. Same as Monigote Fantasy.

@qptain-Nemo

Hm, yes, even simply removing the music files makes the dungeon work in the version I have installed.

The global map blocking issue indeed still manifests in the latest build from Jenkins though.

@Ghabry
Member
Ghabry commented Dec 17, 2015

Confirmed that it works in 0.3.2. Probably introduced with the improvements in Parallel Interpreter handling.

issue677.zip

https://easy-rpg.org/play/index-pr.html?game=issue_677

How it works:
A parallel process toggles variable 1 quickly between 0 and 1.

The actor above the player has start condition "variable 1 is 0". The page is detected as valid because the actor is displayed but the event does not execute when you press ENTER (but does in RPG_RT)

@fdelapena fdelapena removed the Audio label Feb 8, 2016
@fdelapena
Member

@qptain-Nemo the audio crash (floating point exception) has been fixed in SDL_mixer 2.0.1, it shouldn't crash anymore when using this version. The audio garbage issue is still a known issue in SDL, the audio conversion or changing files into ogg is still recommended in the meanwhile. The SDL2_mixer package update has been included already in Arch Linux and Fedora 23.

The character blocking issue has been fixed in #753 and will be included in the next Player release. You can try with the latest pull request build in jenkins (player-linux-pr).

@Ghabry Ghabry closed this Feb 8, 2016
@fdelapena
Member

@qptain-nemo the MP3 resampling issue (noise) has been fixed in the master version (Jenkins build) and will be included in the upcoming release.

@carstene1ns carstene1ns added Events and removed Events Interpreter labels Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment