I think I found workaround for this problem - (non-standard) build fuse-
sdl but without sdlsound.c and use alsasound.c instead.

I spent some time debugging fuse code. It looks like it got stuck in
infinite loop in sound_lowlevel_frame() because sfifo_write() returns 0,
so loop doesn't progress. It returns 0 because nobody doing sfifo_read()
on the other side. That's why buffer is full and sfifo_write() can't
write anymore. I suspect in SDL_RunAudio() it doesn't call callback
(i.e. sfifo_read()) because mutex audio->mixer_lock wasn't unlocked
somewhere but I didn't go further with my analysis because I had
difficulty to build libsdl1.2.

Here is my workaround:

1. Download source code of fuse-1.5.7 and libspectrum-1.4.4;
2. Build libspectrum (no need to install it into system);
3. Set environment variables:

export LIBSPECTRUM_LIBS=../libspectrum-1.4.4/.libs/libspectrum.so
export LIBSPECTRUM_CFLAGS="-I ../libspectrum-1.4.4/"

4. In fuse-1.5.7 folder open file configure and find this section on
line 16886:

if test "$UI" = sdl; then

In this IF section replace:

SOUND_LIBADD='sound/sdlsound.$(OBJEXT)' SOUND_LIBS='' sound_fifo=yes
audio_driver="SDL"

With:

SOUND_LIBADD='sound/alsasound.$(OBJEXT)' SOUND_LIBS='-lasound'
audio_driver="ALSA"

5. Build fuse using commands:

./configure --with-sdl
make

6. Now you have binary ./fuse no need to install it into system, you can
already use it;

Side note, I think libsdl1.2 is way too outdated and it's not supported
anymore. I think fuse should be migrated to libsdl2 although I'm not
sure how hard it is.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775089

Title:
  fuse (sdl) freezes after a period running, taking 100% of a CPU core,
  and requires 'kill'ing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fuse-emulator/+bug/1775089/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to