About 3 times in the last couple of weeks I have seen Custom freeze when quitting, while using gfx_sdl/music_sdl on GNU/Linux (Slackware64-current), with FB 0.23 (32 bit), SDL 1.2.15, SDL_mixer 1.2.12. I think in all cases I had been resizing the window (since I've been testing that a lot lately). I can't easily reproduce it, it happens rarely. I haven't seen Game freeze in the same way. At least twice I attached gdb, and saw that the freeze was in a pthread_join in SDL_CloseAudio:
(gdb) bt #0 0xf76ed93b in pthread_join () from /lib/libpthread.so.0 #1 0xf767f864 in ?? () from /usr/lib/libSDL-1.2.so.0 #2 0xf763703e in SDL_WaitThread () from /usr/lib/libSDL-1.2.so.0 #3 0xf762eb1a in SDL_AudioQuit () from /usr/lib/libSDL-1.2.so.0 #4 0xf762d92d in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0 #5 0xf762e50b in SDL_CloseAudio () from /usr/lib/libSDL-1.2.so.0 #6 0xf75958b8 in Mix_CloseAudio () from /usr/lib/libSDL_mixer-1.2.so.0 #7 0x08210021 in MUSIC_CLOSE () at music_sdl.bas:187 #8 0x082175fb in CLOSEMUSIC () at allmodex.bas:836 #9 0x0812c17a in CLEANUP_AND_TERMINATE (SHOW_QUIT_MSG=<error reading="" variable="">) at custom.bas:733 #10 0x0812ae09 in CHOOSE_RPG_TO_OPEN (RPG_BROWSE_DEFAULT=...) at custom.bas:582 #11 0x0813a45d in main (__FB_ARGC__=<error reading="" variable="">, __FB_ARGV__=<error reading="" variable="">) at custom.bas:263 (gdb) info threads Id Target Id Frame * 1 Thread 0xf77a8700 (LWP 13600) "ohrrpgce-custom" 0xf76ed93b in pthread_join () from /lib/libpthread.so.0 2 Thread 0xf200db40 (LWP 13605) "ohrrpgce-custom" 0xf76f5ac1 in read () from /lib/libpthread.so.0 3 Thread 0xf6f95b40 (LWP 13601) "ohrrpgce-custom" 0xf711c28c in nanosleep () from /lib/libc.so.6 (gdb) thread 2 [Switching to thread 2 (Thread 0xf200db40 (LWP 13605))] #0 0xf76f5ac1 in read () from /lib/libpthread.so.0 (gdb) bt #0 0xf76f5ac1 in read () from /lib/libpthread.so.0 #1 0xf62bc86a in pa_read () from /usr/lib/pulseaudio/libpulsecommon-7.1.so #2 0xf634ff5a in ?? () from /usr/lib/libpulse.so.0 #3 0xf6350060 in pa_mainloop_prepare () from /usr/lib/libpulse.so.0 #4 0xf6350801 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0 #5 0xf765e6b7 in ?? () from /usr/lib/libSDL-1.2.so.0 #6 0xf762e267 in ?? () from /usr/lib/libSDL-1.2.so.0 #7 0xf7636e11 in ?? () from /usr/lib/libSDL-1.2.so.0 #8 0xf767f6eb in ?? () from /usr/lib/libSDL-1.2.so.0 #9 0xf76ec696 in start_thread () from /lib/libpthread.so.0 #10 0xf715f25e in clone () from /lib/libc.so.6 (gdb) thread 3 [Switching to thread 3 (Thread 0xf6f95b40 (LWP 13601))] #0 0xf711c28c in nanosleep () from /lib/libc.so.6 (gdb) bt #0 0xf711c28c in nanosleep () from /lib/libc.so.6 #1 0xf7155e3b in usleep () from /lib/libc.so.6 #2 0x082da25a in bg_thread () #3 0xf76ec696 in start_thread () from /lib/libpthread.so.0 #4 0xf715f25e in clone () from /lib/libc.so.6 </error></error></error>
Notice /usr/lib/libpulse.so in the backtrace. I think what has changed is that Slackware recently switched to PulseAudio, and I see that I installed those upgrades on Jan 23. I don't remember having this problem before the last few weeks.
I didn't look far, but I notice a thread discussing pretty much the same problem in SDL2.
http://comments.gmane.org/gmane.comp.lib.sdl/61923
A patch containing a "don't join the audio thread" workaround was posted but I don't know whether it was applied.
I think these sort of problems are going to keep building up on SDL 1.2, which isn't actively maintained, while SDL 2.0 gets fixes.
I've also seen once or twice another bug in pulseaudio: when starting ohrrpgce-game it immediately died with the message:
Assertion 't = find_next_time_event(m)' failed at pulse/mainloop.c:719, function calc_next_timeout(). Aborting.
Searching the web I see a number of reports of this, eg https://sourceforge.net/p/openmsx/bugs/555/, but no mention of a fix. What they all have in common is using SDL 1.2 with pulseaudio.
This bug has been migrated to our new issue tracker on Github: https://github.com/ohrrpgce/ohrrpgce/issues/1079