Closed smcv closed 1 year ago
This one is using glfw to create a window (and is failing because it's trying to use glX...?) ... maybe it only uses SDL for audio?
I think I was getting a segfault whether I used SDL_VIDEODRIVER=wayland
or not, although possibly not exactly the same backtrace.
maybe it only uses SDL for audio?
Looks that way. I wonder why real SDL 1.2 vs. sdl12-compat even matters here?
Looks like SDL is corrupting memory right near what glfw is using:
==489511== Invalid write of size 8
==489511== at 0x5D7F18A: _mm_store_ps (xmmintrin.h:976)
==489511== by 0x5D7F18A: SDL_Convert_S16_to_F32_SSE2 (SDL_audiotypecvt.c:444)
==489511== by 0x5D7B21F: SDL_ConvertAudio_REAL (SDL_audiocvt.c:275)
==489511== by 0x5D91A35: SDL_ConvertAudio (SDL_dynapi_procs.h:123)
==489511== by 0x4E73CB7: SDL_ConvertAudio (SDL12_compat.c:9355)
==489511== by 0x4E10884: mad_getSamples (in /usr/lib/x86_64-linux-gnu/libSDL_mixer-1.2.so.0.12.0)
==489511== by 0x4E09C2D: music_mixer (in /usr/lib/x86_64-linux-gnu/libSDL_mixer-1.2.so.0.12.0)
==489511== by 0x4E03097: ??? (in /usr/lib/x86_64-linux-gnu/libSDL_mixer-1.2.so.0.12.0)
==489511== by 0x4E72D97: AudioCallbackWrapper (SDL12_compat.c:9005)
==489511== by 0x5D71001: SDL_RunAudio (SDL_audio.c:755)
==489511== by 0x5E224B7: SDL_RunThread (SDL_thread.c:305)
==489511== by 0x5FFDDBB: RunThread (SDL_systhread.c:77)
==489511== by 0x5270B42: start_thread (pthread_create.c:442)
==489511== Address 0x70281f0 is 16 bytes before a block of size 2,968 alloc'd
==489511== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==489511== by 0x4D64506: glfwCreateWindow (in /usr/lib/x86_64-linux-gnu/libglfw.so.3.3)
==489511== by 0x115D97: main (in /usr/lib/pink-pony/pink-pony.bin)
(and several more of those.)
I'll need to look at this more closely, but that's the likely culprit.
We have an audio conversion corruption on the list to look at for 2.26, right @icculus? I think we should probably look at this soon and get it out for 2.24.2 if we can.
Agreed.
Confirmed fixed in 1.2.64.
Prerequisites:
pipewire-pulse
emulating PulseAudioapt install phlipple
(Debian package version0.8.5-5.1+b1
)libsdl1.2-compat
either 1.2.58-1 (packaged in Debian experimental) or commit 63e4393 (locally built)libsdl2-2.0-0
version2.24.1+dfsg-1
libsdl-image1.2
version1.2.12-13+b1
libsdl-mixer1.2
version1.2.12-17+b2
libsdl1.2debian
(real SDL 1.2) version1.2.15+dfsg2-8
To reproduce:
pink-pony
LD_LIBRARY_PATH=.../sdl12-compat/_build pink-pony
SDL_VIDEODRIVER=wayland LD_LIBRARY_PATH=.../sdl12-compat/_build pink-pony
Expected result: it runs
Actual result: Real SDL 1.2 works. With sdl12-compat it segfaults during startup: