benmbrennan / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

jttl_audio when closing rom #269

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe your system:
 - Linux distribution: Debian
 - Machine type: 64-bit
 - Mupen64Plus version: debian/1.5+dfsg1-4-10-g22c27c5
 - Plugins used: jttl_audio

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff43bb950 (LWP 7437)]
_wordcopy_bwd_aligned (dstp=17992, srcp=<value optimized out>, len=<value
optimized out>) at wordcopy.c:277
277     wordcopy.c: No such file or directory.
        in wordcopy.c
(gdb) bt
#0  _wordcopy_bwd_aligned (dstp=17992, srcp=<value optimized out>,
len=<value optimized out>) at wordcopy.c:277
#1  0x00000039eac7ae82 in *__GI_memmove (dest=<value optimized out>,
src=<value optimized out>, len=<value optimized out>) at memmove.c:99
#2  0x00007ffff797625d in my_audio_callback (userdata=0x0, stream=0x2d2d370
"", len=8192) at main.c:548
#3  0x00000039ff40a21b in ?? () from /usr/lib/libSDL-1.2.so.0
#4  0x00000039ff411a67 in ?? () from /usr/lib/libSDL-1.2.so.0
#5  0x00000039ff458c69 in ?? () from /usr/lib/libSDL-1.2.so.0
#6  0x00000039eb806f9a in start_thread (arg=<value optimized out>) at
pthread_create.c:300
#7  0x00000039eaccc56d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

This crash happens not always, but VolumeControlType should be set to SDL
so that SDL_MixAudio is called which takes a "long" time to resample and
thus is a good way to create a race condition. The problem is that we still
running SDL_MixAudio and RomClosed called SDL_PauseAudio and starts to free
buffers right away. This means doesn't mean that my_audio_callback has
stopped yet. It seems that SDL_CloseAudio has to be called first so the
buffer isn't used anymore. Afterwards everything can be freed without care
anymore about the audio processing thread.

Original issue reported on code.google.com by sven@narfation.org on 21 Sep 2009 at 10:30

GoogleCodeExporter commented 9 years ago
Fix can be found at
http://git.debian.org/?p=collab-maint/mupen64plus.git;a=tree;f=debian/patches;hb
=master

Original comment by sven@narfation.org on 21 Sep 2009 at 10:41

Attachments:

GoogleCodeExporter commented 9 years ago
Can somebody please rename the bug to "jttl_audio segfaults when closing rom" - 
was a
little bit late when I posted the bug report.

Original comment by sven@narfation.org on 22 Sep 2009 at 8:47

GoogleCodeExporter commented 9 years ago
Thanks, fixed in rev 1405.

Original comment by richard...@gmail.com on 29 Sep 2009 at 1:41