Code Monkey home page Code Monkey logo

Comments (9)

kloon15 avatar kloon15 commented on July 21, 2024 1

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.

from cdogs-sdl.

cxong avatar cxong commented on July 21, 2024

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

from cdogs-sdl.

kloon15 avatar kloon15 commented on July 21, 2024

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

from cdogs-sdl.

cxong avatar cxong commented on July 21, 2024

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

from cdogs-sdl.

RobLoach avatar RobLoach commented on July 21, 2024

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

from cdogs-sdl.

z2z63 avatar z2z63 commented on July 21, 2024

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:

Mix_PlayMusic(mp->u.dynamic, -1);

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

find_package(SDL2_mixer REQUIRED)

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.

from cdogs-sdl.

kloon15 avatar kloon15 commented on July 21, 2024

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:

Mix_PlayMusic(mp->u.dynamic, -1);

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

find_package(SDL2_mixer REQUIRED)

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?

from cdogs-sdl.

z2z63 avatar z2z63 commented on July 21, 2024

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:

Mix_PlayMusic(mp->u.dynamic, -1);

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

find_package(SDL2_mixer REQUIRED)

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 <[email protected]>
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

from cdogs-sdl.

kloon15 avatar kloon15 commented on July 21, 2024

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.

from cdogs-sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.