stephenjsweeney/tbftss

Crash in sdl2-mixer

Closed this issue · 1 comments

When testing tbftss-0.41 25f2204 on OpenBSD -current, I sometimes see a segmentation fault when hitting the “Start Mission” button. (This also happened with straight tbftss-0.4; I was hoping this was related to #3, but the patch hasn’t helped this crash.)

Unfortunately, the crash happens in sdl-mixer after spawning a new thread, so I’ve been unable to trace the bug to its root cause.

(gdb) bt
#0  MPEGstream::copy_byte (this=0xe072d54b400)
    at /usr/ports/pobj/smpeg2-2.0.0/smpeg2-2.0.0/MPEGstream.cpp:282
#1  0x00000e075aeeed6c in MPEGaudio::loadheader (this=0xe07b6833000)
    at /usr/ports/pobj/smpeg2-2.0.0/smpeg2-2.0.0/audio/mpegtoraw.cpp:141
#2  0x00000e075aeef228 in MPEGaudio::run (this=0xe07b6833000, frames=1,
    timestamp=0xe07bf6ad4c8)
    at /usr/ports/pobj/smpeg2-2.0.0/smpeg2-2.0.0/audio/mpegtoraw.cpp:301
#3  0x00000e075aeef421 in Decode_MPEGaudio (udata=0xe07b6833000)
    at /usr/ports/pobj/smpeg2-2.0.0/smpeg2-2.0.0/audio/mpegtoraw.cpp:372
#4  0x00000e06e6c8a41c in SDL_RunThread (data=0xe07490e3a40)
    at /usr/ports/pobj/sdl2-2.0.3/SDL2-2.0.3/src/thread/SDL_thread.c:282
#5  0x00000e06e6cd35f9 in RunThread (data=Variable "data" is not available.
)
    at /usr/ports/pobj/sdl2-2.0.3/SDL2-2.0.3/src/thread/pthread/SDL_systhread.c:72
#6  0x00000e0765b4177e in _rthread_start (v=Variable "v" is not available.
)
    at /usr/src/lib/librthread/rthread.c:145
#7  0x00000e07cfb0f4fb in __tfork_thread ()
    at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75
#8  0x0000000000000000 in ?? ()

Hmm, this is a tricky one, as I can't be sure if this is related to something I'm doing, or a problem in SDL. Will have to leave this open for the moment and see if we can get more info.