Closed kloon15 closed 2 months ago
The crash appears to come from SDL mixer; more help is needed as I don't have Manjaro
How could i repro this in a test code to file it against SDL mixer?
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
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
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.
sdl2_mixer
package in arch official repository has some error. Compile your own sdl2_mixer
and link to itI 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.
TL;DR: Maybe
sdl2_mixer
package in arch official repository has some error. Compile your ownsdl2_mixer
and link to itI 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:
my
SDL2_mixer
comes from arch official repository, and I install it bysudo pacman -S sdl2_mixer
I cloned
SDL2_mixer
source code from github and compiled it, then I editedCMakeLists.txt
fromhttps://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 ofSDL2_mixer
that I compiled from sourceAfter that the program works.
Thats good to know, did u compile master branch, or latest tagged release?
TL;DR: Maybe
sdl2_mixer
package in arch official repository has some error. Compile your ownsdl2_mixer
and link to itI 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 bysudo pacman -S sdl2_mixer
I clonedSDL2_mixer
source code from github and compiled it, then I editedCMakeLists.txt
from https://github.com/cxong/cdogs-sdl/blob/fa7410e5976e669d185e7fb6060b3e1d9d1360a0/CMakeLists.txt#L72to
- 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 ofSDL2_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
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.
OS: Manjaro Stable (Kernel 6.6.19)
Happens on AMD and NVIDIA PCs both.
Coredump: https://send.cm/d/10VYH
Backtrace: