cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
868 stars 115 forks source link

Segfault on startup in PlayMusic #852

Closed kloon15 closed 2 months ago

kloon15 commented 3 months ago

OS: Manjaro Stable (Kernel 6.6.19)

Happens on AMD and NVIDIA PCs both.

Coredump: https://send.cm/d/10VYH

Backtrace:

GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file ./cdogs-sdl
Reading symbols from ./cdogs-sdl...
(gdb) run
Starting program: /home/kloon/Packages/cdogs-sdl/src/cdogs-sdl 

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for /lib64/ld-linux-x86-64.so.2
Downloading separate debug info for system-supplied DSO at 0x7ffff7fc6000                                     
Downloading separate debug info for /usr/lib/libm.so.6                                                        
Downloading separate debug info for /usr/lib/libSDL2-2.0.so.0                                                 
Downloading separate debug info for /usr/lib/libSDL2_image-2.0.so.0                                           
Downloading separate debug info for /usr/lib/libSDL2_mixer-2.0.so.0                                           
Downloading separate debug info for /usr/lib/libc.so.6                                                        
[Thread debugging using libthread_db enabled]                                                                 
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Downloading separate debug info for /usr/lib/libpng16.so.16
Downloading separate debug info for /usr/lib/libjxl.so.0.10                                                   
Downloading separate debug info for /usr/lib/libjpeg.so.8                                                     
Downloading separate debug info for /usr/lib/libtiff.so.6                                                     
Downloading separate debug info for /usr/lib/libavif.so.16                                                    
Downloading separate debug info for /usr/lib/libwebpdemux.so.2                                                
Downloading separate debug info for /usr/lib/libwebp.so.7                                                     
Downloading separate debug info for /usr/lib/libz.so.1                                                        
Downloading separate debug info for /usr/lib/libjxl_cms.so.0.10                                               
Downloading separate debug info for /usr/lib/libhwy.so.1                                                      
Downloading separate debug info for /usr/lib/libbrotlidec.so.1                                                
Downloading separate debug info for /usr/lib/libbrotlienc.so.1                                                
Downloading separate debug info for /usr/lib/libzstd.so.1                                                     
Downloading separate debug info for /usr/lib/liblzma.so.5                                                     
Downloading separate debug info for /usr/lib/libjbig.so.2.1                                                   
Downloading separate debug info for /usr/lib/libdav1d.so.7                                                    
Downloading separate debug info for /usr/lib/librav1e.so.0.7                                                  
Downloading separate debug info for /usr/lib/libSvtAv1Enc.so.1                                                
Downloading separate debug info for /usr/lib/libaom.so.3                                                      
Downloading separate debug info for /usr/lib/libyuv.so                                                        
Downloading separate debug info for /usr/lib/libsharpyuv.so.0                                                 
Downloading separate debug info for /usr/lib/libbrotlicommon.so.1                                             
C-Dogs SDL v2.0.0                                                                                             
SDL version 2.30.1
SDL_image version 2.8.2
SDL_mixer version 2.8.0
20240322-101732 INFO  [MAIN ] [files.c:670] SetupConfigDir(): Creating config dir /home/kloon/.config/cdogs-sdl/... 
20240322-101732 INFO  [MAIN ] [files.c:677] SetupConfigDir(): Config dir already exists.
Error loading config '/home/kloon/.config/cdogs-sdl/options.cnf'
20240322-101732 INFO  [MAIN ] [cdogs.c:141] main(): Command line (1 args): /home/kloon/Packages/cdogs-sdl/src/cdogs-sdl
Downloading separate debug info for /usr/lib/libdbus-1.so.3
Downloading separate debug info for /usr/lib/libsystemd.so.0                                                  
Downloading separate debug info for /usr/lib/libcap.so.2                                                      
Downloading separate debug info for /usr/lib/libgcrypt.so.20                                                  
Downloading separate debug info for /usr/lib/liblz4.so.1                                                      
Downloading separate debug info for /usr/lib/libgpg-error.so.0                                                
[New Thread 0x7fffed8b66c0 (LWP 36048)]                                                                       
Downloading separate debug info for /usr/lib/libX11.so.6
Downloading separate debug info for /usr/lib/libxcb.so.1                                                      
Downloading separate debug info for /usr/lib/libXau.so.6                                                      
Downloading separate debug info for /usr/lib/libXdmcp.so.6                                                    
Downloading separate debug info for /usr/lib/libXext.so.6                                                     
Downloading separate debug info for /usr/lib/libXcursor.so.1                                                  
Downloading separate debug info for /usr/lib/libXrender.so.1                                                  
Downloading separate debug info for /usr/lib/libXfixes.so.3                                                   
Downloading separate debug info for /usr/lib/libXi.so.6                                                       
Downloading separate debug info for /usr/lib/libXrandr.so.2                                                   
Downloading separate debug info for /usr/lib/libXss.so.1                                                      
Downloading separate debug info for /usr/lib/libpulse.so.0                                                    
Downloading separate debug info for /usr/lib/pulseaudio/libpulsecommon-17.0.so                                
Downloading separate debug info for /usr/lib/libsndfile.so.1                                                  
Downloading separate debug info for /usr/lib/libasyncns.so.0                                                  
Downloading separate debug info for /usr/lib/libogg.so.0                                                      
Downloading separate debug info for /usr/lib/libvorbisenc.so.2                                                
Downloading separate debug info for /usr/lib/libFLAC.so.12                                                    
Downloading separate debug info for /usr/lib/libopus.so.0                                                     
Downloading separate debug info for /usr/lib/libmpg123.so.0                                                   
Downloading separate debug info for /usr/lib/libmp3lame.so.0                                                  
Downloading separate debug info for /usr/lib/libvorbis.so.0                                                   
[New Thread 0x7fffec12c6c0 (LWP 36049)]                                                                       
[New Thread 0x7fffeb92b6c0 (LWP 36050)]
Downloading separate debug info for /usr/lib/libusb-1.0.so.0
Downloading separate debug info for /usr/lib/libudev.so.1                                                     
[New Thread 0x7fffeb8956c0 (LWP 36051)]                                                                       
20240322-101735 INFO  [GFX  ] [grafx.c:119] GraphicsInitialize(): graphics mode(320x240 2x)
Downloading separate debug info for /usr/lib/libGL.so.1
Downloading separate debug info for /usr/lib/libGLdispatch.so.0                                               
Downloading separate debug info for /usr/lib/libGLX.so.0                                                      
Downloading separate debug info for /usr/lib/libGLX_nvidia.so.0                                               
Downloading separate debug info for /usr/lib/libnvidia-glsi.so.470.239.06                                     
Downloading separate debug info for /usr/lib/libnvidia-tls.so.470.239.06                                      
Downloading separate debug info for /usr/lib/libnvidia-glcore.so.470.239.06                                   
Downloading separate debug info for /usr/lib/libdl.so.2                                                       
Downloading separate debug info for /usr/lib/libpthread.so.0                                                  
Downloading separate debug info for /usr/lib/librt.so.1                                                       
Downloading separate debug info for /usr/lib/libX11-xcb.so.1                                                  
Downloading separate debug info for /usr/lib/libxcb-glx.so.0                                                  
Downloading separate debug info for /usr/lib/libdrm.so.2                                                      
20240322-101736 INFO  [MAIN ] [cdogs.c:192] main(): data dir(/home/kloon/Packages/cdogs-sdl)                  
20240322-101736 INFO  [MAIN ] [cdogs.c:193] main(): config dir(/home/kloon/.config/cdogs-sdl/)
20240322-101736 WARN  [MAIN ] [autosave.c:255] AutosaveLoad(): Error loading autosave '/home/kloon/.config/cdogs-sdl/autosave.json'
[New Thread 0x7fffea1ff6c0 (LWP 36053)]
Downloading separate debug info for /usr/lib/libvorbisfile.so.3
20240322-101737 INFO  [INPUT] [joystick.c:60] JoyInit(): 0 controllers found                                  
20240322-101737 WARN  [MAIN ] [player_template.c:128] PlayerTemplatesLoad(): player templates file missing 'players.cnf'
20240322-101738 INFO  [MAIN ] [campaigns.c:200] LoadAllCampaigns(): Load campaigns from system...
20240322-101738 INFO  [MAIN ] [campaigns.c:204] LoadAllCampaigns(): Load campaigns from dir /home/kloon/Packages/cdogs-sdl/missions...
20240322-101738 INFO  [MAIN ] [campaigns.c:209] LoadAllCampaigns(): Load dogfights from dir /home/kloon/Packages/cdogs-sdl/dogfights...
20240322-101738 INFO  [MAIN ] [campaigns.c:213] LoadAllCampaigns(): Load quick play...
20240322-101738 INFO  [MAIN ] [cdogs.c:294] main(): Starting game
[Thread 0x7fffea1ff6c0 (LWP 36053) exited]
[New Thread 0x7fffea1ff6c0 (LWP 36056)]

Thread 1 "cdogs-sdl" received signal SIGSEGV, Segmentation fault.
0x00007fffead424c0 in ?? ()
(gdb) bt
#0  0x00007fffead424c0 in ?? ()
#1  0x00007ffff7c928a9 in OGG_Seek (time=0, context=<optimized out>) at src/codecs/music_ogg.c:446
#2  OGG_Play (context=<optimized out>, play_count=<optimized out>) at src/codecs/music_ogg.c:357
#3  0x00007ffff7c9f708 in music_internal_play (position=0, play_count=-1, music=0x555558b42fe0)
    at src/music.c:922
#4  Mix_FadeInMusicPos (music=0x555558b42fe0, loops=-1, ms=<optimized out>, position=0) at src/music.c:978
#5  0x00005555555d3eb3 in PlayMusic (mp=0x5555556a04a0 <gSoundDevice>)
    at /home/kloon/Packages/cdogs-sdl/src/cdogs/music.c:125
#6  MusicPlayGeneral (mp=0x5555556a04a0 <gSoundDevice>, type=<optimized out>)
    at /home/kloon/Packages/cdogs-sdl/src/cdogs/music.c:176
#7  0x000055555556a5a4 in MainMenuOnEnter (data=<optimized out>)
    at /home/kloon/Packages/cdogs-sdl/src/mainmenu.c:169
#8  0x0000555555568076 in GameLoopOnEnter (data=0x55555a790db0)
    at /home/kloon/Packages/cdogs-sdl/src/game_loop.c:410
#9  LoopRunnerRunInner (ctx=ctx@entry=0x7fffffffc760) at /home/kloon/Packages/cdogs-sdl/src/game_loop.c:285
#10 0x0000555555568188 in LoopRunnerRun (l=l@entry=0x7fffffffc8b0)
    at /home/kloon/Packages/cdogs-sdl/src/game_loop.c:333
#11 0x000055555555db04 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/kloon/Packages/cdogs-sdl/src/cdogs.c:295
(gdb) 
cxong commented 3 months ago

The crash appears to come from SDL mixer; more help is needed as I don't have Manjaro

kloon15 commented 3 months ago

How could i repro this in a test code to file it against SDL mixer?

cxong commented 3 months ago

I don't know if this is an SDL mixer bug; it would be best to repro this problem in C-Dogs SDL in a debugger and examine the context to get more clues e.g. what file was it trying to load

RobLoach commented 3 months ago

If it helps, it looks like it's compiled with shared libraries? Compiling via static may fix some compatibility issues across different version. Here's what I'm getting on the 2.0 Linux release build on Ubuntu Mint.

~/.../C-Dogs.SDL-2.0.0-Linux/bin 
❯  ./cdogs-sdl
C-Dogs SDL v2.0.0
SDL version 2.30.0
SDL_image version 2.8.2
SDL_mixer version 2.8.0
20240326-133040 INFO  [MAIN ] [files.c:670] SetupConfigDir(): Creating config dir ~/.config/cdogs-sdl/... 
20240326-133040 INFO  [MAIN ] [files.c:677] SetupConfigDir(): Config dir already exists.
Error loading config '~/.config/cdogs-sdl/options.cnf'
20240326-133040 INFO  [MAIN ] [cdogs.c:141] main(): Command line (1 args): ./cdogs-sdl
20240326-133040 INFO  [GFX  ] [grafx.c:121] GraphicsInitialize(): graphics mode(320x240 2x)
20240326-133041 INFO  [MAIN ] [cdogs.c:192] main(): data dir(/C-Dogs.SDL-2.0.0-Linux)
20240326-133041 INFO  [MAIN ] [cdogs.c:193] main(): config dir(~/.config/cdogs-sdl/)
20240326-133042 WARN  [MAIN ] [autosave.c:255] AutosaveLoad(): Error loading autosave '~/.config/cdogs-sdl/autosave.json'
./cdogs-sdl: symbol lookup error: ./cdogs-sdl: undefined symbol: Mix_LoadWAV
kloon15 commented 3 months ago

If it helps, it looks like it's compiled with shared libraries? Compiling via static may fix some compatibility issues across different version. Here's what I'm getting on the 2.0 Linux release build on Ubuntu Mint.

~/.../C-Dogs.SDL-2.0.0-Linux/bin 
❯  ./cdogs-sdl
C-Dogs SDL v2.0.0
SDL version 2.30.0
SDL_image version 2.8.2
SDL_mixer version 2.8.0
20240326-133040 INFO  [MAIN ] [files.c:670] SetupConfigDir(): Creating config dir ~/.config/cdogs-sdl/... 
20240326-133040 INFO  [MAIN ] [files.c:677] SetupConfigDir(): Config dir already exists.
Error loading config '~/.config/cdogs-sdl/options.cnf'
20240326-133040 INFO  [MAIN ] [cdogs.c:141] main(): Command line (1 args): ./cdogs-sdl
20240326-133040 INFO  [GFX  ] [grafx.c:121] GraphicsInitialize(): graphics mode(320x240 2x)
20240326-133041 INFO  [MAIN ] [cdogs.c:192] main(): data dir(/C-Dogs.SDL-2.0.0-Linux)
20240326-133041 INFO  [MAIN ] [cdogs.c:193] main(): config dir(~/.config/cdogs-sdl/)
20240326-133042 WARN  [MAIN ] [autosave.c:255] AutosaveLoad(): Error loading autosave '~/.config/cdogs-sdl/autosave.json'
./cdogs-sdl: symbol lookup error: ./cdogs-sdl: undefined symbol: Mix_LoadWAV

I compiled it from source myself so thats a different issue altogether.

z2z63 commented 2 months ago

TL;DR: Maybe sdl2_mixer package in arch official repository has some error. Compile your own sdl2_mixer and link to it

I met the same error on archlinux

OS: Arch Linux x86_64
Kernel: 6.8.7-zen1-1-zen

terminal ouput:

/home/arch/Desktop/cdogs-sdl/src/cdogs-sdl
C-Dogs SDL v2.1.0
SDL version 2.30.2
SDL_image version 2.8.2
SDL_mixer version 2.8.0
20240419-174605 INFO  [MAIN ] [files.c:670] SetupConfigDir(): Creating config dir /home/arch/.config/cdogs-sdl/... 
20240419-174605 INFO  [MAIN ] [files.c:677] SetupConfigDir(): Config dir already exists.
20240419-174605 INFO  [MAIN ] [cdogs.c:141] main(): Command line (1 args): /home/arch/Desktop/cdogs-sdl/src/cdogs-sdl
20240419-174606 INFO  [GFX  ] [grafx.c:119] GraphicsInitialize(): graphics mode(320x240 2x)
20240419-174607 INFO  [MAIN ] [cdogs.c:192] main(): data dir(/home/arch/Desktop/cdogs-sdl)
20240419-174607 INFO  [MAIN ] [cdogs.c:193] main(): config dir(/home/arch/.config/cdogs-sdl/)
20240419-174608 INFO  [INPUT] [joystick.c:60] JoyInit(): 0 controllers found
20240419-174608 WARN  [MAIN ] [player_template.c:128] PlayerTemplatesLoad(): player templates file missing 'players.cnf'
20240419-174608 INFO  [MAIN ] [campaigns.c:200] LoadAllCampaigns(): Load campaigns from system...
20240419-174608 INFO  [MAIN ] [campaigns.c:204] LoadAllCampaigns(): Load campaigns from dir /home/arch/Desktop/cdogs-sdl/missions...
20240419-174608 INFO  [MAIN ] [campaigns.c:209] LoadAllCampaigns(): Load dogfights from dir /home/arch/Desktop/cdogs-sdl/dogfights...
20240419-174608 INFO  [MAIN ] [campaigns.c:213] LoadAllCampaigns(): Load quick play...
20240419-174608 INFO  [MAIN ] [cdogs.c:294] main(): Starting game

Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

where error occurs: https://github.com/cxong/cdogs-sdl/blob/e018dc4bf9f357ab66842cb0e2e695c3d4e7efe2/src/cdogs/music.c#L303

my SDL2_mixer comes from arch official repository, and I install it by sudo pacman -S sdl2_mixer

I cloned SDL2_mixer source code from github and compiled it, then I edited CMakeLists.txt from https://github.com/cxong/cdogs-sdl/blob/fa7410e5976e669d185e7fb6060b3e1d9d1360a0/CMakeLists.txt#L72 to

- find_package(SDL2_mixer REQUIRED) 
+ find_package(SDL2_mixer REQUIRED PATHS /home/arch/src/SDL_mixer/usr/lib/cmake)

/home/arch/src/SDL_mixer/usr is the install prefix of SDL2_mixer that I compiled from source

After that the program works.

kloon15 commented 2 months ago

TL;DR: Maybe sdl2_mixer package in arch official repository has some error. Compile your own sdl2_mixer and link to it

I met the same error on archlinux

OS: Arch Linux x86_64
Kernel: 6.8.7-zen1-1-zen

terminal ouput:

/home/arch/Desktop/cdogs-sdl/src/cdogs-sdl
C-Dogs SDL v2.1.0
SDL version 2.30.2
SDL_image version 2.8.2
SDL_mixer version 2.8.0
20240419-174605 INFO  [MAIN ] [files.c:670] SetupConfigDir(): Creating config dir /home/arch/.config/cdogs-sdl/... 
20240419-174605 INFO  [MAIN ] [files.c:677] SetupConfigDir(): Config dir already exists.
20240419-174605 INFO  [MAIN ] [cdogs.c:141] main(): Command line (1 args): /home/arch/Desktop/cdogs-sdl/src/cdogs-sdl
20240419-174606 INFO  [GFX  ] [grafx.c:119] GraphicsInitialize(): graphics mode(320x240 2x)
20240419-174607 INFO  [MAIN ] [cdogs.c:192] main(): data dir(/home/arch/Desktop/cdogs-sdl)
20240419-174607 INFO  [MAIN ] [cdogs.c:193] main(): config dir(/home/arch/.config/cdogs-sdl/)
20240419-174608 INFO  [INPUT] [joystick.c:60] JoyInit(): 0 controllers found
20240419-174608 WARN  [MAIN ] [player_template.c:128] PlayerTemplatesLoad(): player templates file missing 'players.cnf'
20240419-174608 INFO  [MAIN ] [campaigns.c:200] LoadAllCampaigns(): Load campaigns from system...
20240419-174608 INFO  [MAIN ] [campaigns.c:204] LoadAllCampaigns(): Load campaigns from dir /home/arch/Desktop/cdogs-sdl/missions...
20240419-174608 INFO  [MAIN ] [campaigns.c:209] LoadAllCampaigns(): Load dogfights from dir /home/arch/Desktop/cdogs-sdl/dogfights...
20240419-174608 INFO  [MAIN ] [campaigns.c:213] LoadAllCampaigns(): Load quick play...
20240419-174608 INFO  [MAIN ] [cdogs.c:294] main(): Starting game

Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

where error occurs:

https://github.com/cxong/cdogs-sdl/blob/e018dc4bf9f357ab66842cb0e2e695c3d4e7efe2/src/cdogs/music.c#L303

my SDL2_mixer comes from arch official repository, and I install it by sudo pacman -S sdl2_mixer

I cloned SDL2_mixer source code from github and compiled it, then I edited CMakeLists.txt from

https://github.com/cxong/cdogs-sdl/blob/fa7410e5976e669d185e7fb6060b3e1d9d1360a0/CMakeLists.txt#L72

to

- find_package(SDL2_mixer REQUIRED) 
+ find_package(SDL2_mixer REQUIRED PATHS /home/arch/src/SDL_mixer/usr/lib/cmake)

/home/arch/src/SDL_mixer/usr is the install prefix of SDL2_mixer that I compiled from source

After that the program works.

Thats good to know, did u compile master branch, or latest tagged release?

z2z63 commented 2 months ago

TL;DR: Maybe sdl2_mixer package in arch official repository has some error. Compile your own sdl2_mixer and link to it

I met the same error on archlinux

OS: Arch Linux x86_64
Kernel: 6.8.7-zen1-1-zen

terminal ouput:

/home/arch/Desktop/cdogs-sdl/src/cdogs-sdl
C-Dogs SDL v2.1.0
SDL version 2.30.2
SDL_image version 2.8.2
SDL_mixer version 2.8.0
20240419-174605 INFO  [MAIN ] [files.c:670] SetupConfigDir(): Creating config dir /home/arch/.config/cdogs-sdl/... 
20240419-174605 INFO  [MAIN ] [files.c:677] SetupConfigDir(): Config dir already exists.
20240419-174605 INFO  [MAIN ] [cdogs.c:141] main(): Command line (1 args): /home/arch/Desktop/cdogs-sdl/src/cdogs-sdl
20240419-174606 INFO  [GFX  ] [grafx.c:119] GraphicsInitialize(): graphics mode(320x240 2x)
20240419-174607 INFO  [MAIN ] [cdogs.c:192] main(): data dir(/home/arch/Desktop/cdogs-sdl)
20240419-174607 INFO  [MAIN ] [cdogs.c:193] main(): config dir(/home/arch/.config/cdogs-sdl/)
20240419-174608 INFO  [INPUT] [joystick.c:60] JoyInit(): 0 controllers found
20240419-174608 WARN  [MAIN ] [player_template.c:128] PlayerTemplatesLoad(): player templates file missing 'players.cnf'
20240419-174608 INFO  [MAIN ] [campaigns.c:200] LoadAllCampaigns(): Load campaigns from system...
20240419-174608 INFO  [MAIN ] [campaigns.c:204] LoadAllCampaigns(): Load campaigns from dir /home/arch/Desktop/cdogs-sdl/missions...
20240419-174608 INFO  [MAIN ] [campaigns.c:209] LoadAllCampaigns(): Load dogfights from dir /home/arch/Desktop/cdogs-sdl/dogfights...
20240419-174608 INFO  [MAIN ] [campaigns.c:213] LoadAllCampaigns(): Load quick play...
20240419-174608 INFO  [MAIN ] [cdogs.c:294] main(): Starting game

Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

where error occurs: https://github.com/cxong/cdogs-sdl/blob/e018dc4bf9f357ab66842cb0e2e695c3d4e7efe2/src/cdogs/music.c#L303

my SDL2_mixer comes from arch official repository, and I install it by sudo pacman -S sdl2_mixer I cloned SDL2_mixer source code from github and compiled it, then I edited CMakeLists.txt from https://github.com/cxong/cdogs-sdl/blob/fa7410e5976e669d185e7fb6060b3e1d9d1360a0/CMakeLists.txt#L72

to

- find_package(SDL2_mixer REQUIRED) 
+ find_package(SDL2_mixer REQUIRED PATHS /home/arch/src/SDL_mixer/usr/lib/cmake)

/home/arch/src/SDL_mixer/usr is the install prefix of SDL2_mixer that I compiled from source After that the program works.

Thats good to know, did u compile master branch, or latest tagged release?

yes, main branch, release-2.8.0, hash a37e09f8, which is the same version with arch's package

➜  SDL_mixer git:(release-2.8.0) ✗ git status            
HEAD detached at a37e09f8
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        sdl2_mixer-config-version.cmake
        sdl2_mixer-config.cmake
        usr/

nothing added to commit but untracked files present (use "git add" to track)
➜  SDL_mixer git:(release-2.8.0) ✗ pacman -Qi sdl2_mixer 
Name            : sdl2_mixer
Version         : 2.8.0-1
Description     : A simple multi-channel audio mixer (Version 2)
Architecture    : x86_64
URL             : https://github.com/libsdl-org/SDL_mixer
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : sdl2  libvorbis  libmodplug  mpg123  flac  opusfile
Optional Deps   : fluidsynth: MIDI software synth, replaces built-in timidity [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 311.09 KiB
Packager        : Sven-Hendrik Haase <svenstaro@archlinux.org>
Build Date      : Wed 24 Jan 2024 03:07:39 AM CST
Install Date    : Fri 19 Apr 2024 07:49:43 PM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
kloon15 commented 2 months ago

The crash is introduced by compiling sdl2-mixer with ogg-vorbis instead of ogg-stb which is the default on arch based distros. So confirmed not a cdogs related issue.