Coder Social home page Coder Social logo

Comments (14)

mikeday0 avatar mikeday0 commented on September 23, 2024 1

I'm thinking the chocpkg script ought to pull down a newer version of SDL_mixer. Your only sin was that you followed the instructions as written. :)

from chocolate-doom.

mikeday0 avatar mikeday0 commented on September 23, 2024

What versions of SDL, SDL_mixer and FluidSynth are you using?

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

All of them are the most recent versions of the packages for Arch Linux:

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

Here, I'll post the GDB backtrace in case it helps anything:

gdb -ex r --args ./chocolate-doom -iwad ./DOOM2.WAD
GNU gdb (GDB) 12.1
Copyright (C) 2022 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"...
Reading symbols from ./chocolate-doom...
Starting program: /home/hugazo/.local/share/chocolate-doom/chocolate-doom -iwad ./DOOM2.WAD
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
                         Chocolate Doom 3.0.0
Z_Init: Init zone memory allocation daemon. 
zone memory: 0x7ffff6819010, 1000000 allocated for zone
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
saving config in /home/hugazo/.local/share/chocolate-doom/default.cfg
W_Init: Init WADfiles.
 adding ./DOOM2.WAD
===========================================================================
                         DOOM 2: Hell on Earth
===========================================================================
 Chocolate Doom is free software, covered by the GNU General Public
 License.  There is NO warranty; not even for MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE. You are welcome to change and distribute
 copies under certain conditions. See the source for more information.
===========================================================================
I_Init: Setting up machine state.
[New Thread 0x7ffff645c6c0 (LWP 7003)]
[New Thread 0x7ffff19b26c0 (LWP 7004)]
[New Thread 0x7ffff19716c0 (LWP 7005)]
I_SDL_InitMusic: Using FluidSynth.
NET_Init: Init network subsystem.
M_Init: Init miscellaneous info.
R_Init: Init DOOM refresh daemon - [......................................]
P_Init: Init Playloop state.
S_Init: Setting up sound.
I_SDL_PrecacheSounds: Precaching all sound effects.....................
D_CheckNetGame: Checking network game status.
startskill 2  deathmatch: 0  startmap: 1  startepisode: 1
player 1 of 1 (1 nodes)
Emulating the behavior of the 'Doom 1.9' executable.
HU_Init: Setting up heads up display.
ST_Init: Init status bar.
[New Thread 0x7fffe4abe6c0 (LWP 7008)]
[New Thread 0x7fffd6fff6c0 (LWP 7009)]
[New Thread 0x7fffd67fe6c0 (LWP 7010)]
[New Thread 0x7fffd5ffd6c0 (LWP 7011)]
[New Thread 0x7fffd57fc6c0 (LWP 7012)]
[New Thread 0x7fffd4ffb6c0 (LWP 7013)]
[New Thread 0x7fffbffff6c0 (LWP 7014)]
[New Thread 0x7fffbf7fe6c0 (LWP 7015)]
[Thread 0x7fffbf7fe6c0 (LWP 7015) exited]
[New Thread 0x7fffbf7fe6c0 (LWP 7016)]
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
[New Thread 0x7fffbe3ff6c0 (LWP 7017)]
[Thread 0x7fffbe3ff6c0 (LWP 7017) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7019)]
[Thread 0x7fffbe3ff6c0 (LWP 7019) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7022)]
[Thread 0x7fffbe3ff6c0 (LWP 7022) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7024)]
[Thread 0x7fffbe3ff6c0 (LWP 7024) exited]
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
[New Thread 0x7fffbe3ff6c0 (LWP 7025)]
[New Thread 0x7fffbdbfe6c0 (LWP 7027)]
[Thread 0x7fffbdbfe6c0 (LWP 7027) exited]
[Thread 0x7fffbe3ff6c0 (LWP 7025) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7028)]
[New Thread 0x7fffbdbfe6c0 (LWP 7030)]
[Thread 0x7fffbdbfe6c0 (LWP 7030) exited]
[Thread 0x7fffbe3ff6c0 (LWP 7028) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7031)]
[Thread 0x7fffbe3ff6c0 (LWP 7031) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7032)]
[Thread 0x7fffbe3ff6c0 (LWP 7032) exited]
ALSA lib pcm_a52.c:1001:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
[New Thread 0x7fffbe3ff6c0 (LWP 7033)]
[Thread 0x7fffbe3ff6c0 (LWP 7033) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7034)]
[Thread 0x7fffbe3ff6c0 (LWP 7034) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7035)]
[Thread 0x7fffbe3ff6c0 (LWP 7035) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7037)]
[New Thread 0x7fffbdbfe6c0 (LWP 7038)]
[Thread 0x7fffbdbfe6c0 (LWP 7038) exited]
[Thread 0x7fffbe3ff6c0 (LWP 7037) exited]
[New Thread 0x7fffbe3ff6c0 (LWP 7040)]
[New Thread 0x7fffbdbfe6c0 (LWP 7041)]
[New Thread 0x7fffbd3fd6c0 (LWP 7042)]
[New Thread 0x7fffaffff6c0 (LWP 7043)]
[New Thread 0x7fffaf7fe6c0 (LWP 7044)]
[New Thread 0x7fffae9c66c0 (LWP 7045)]
[New Thread 0x7fffae1c56c0 (LWP 7046)]

Thread 1 "chocolate-doom" received signal SIGSEGV, Segmentation fault.
0x00007ffff10b4d12 in ?? () from /usr/lib/libfluidsynth.so.3
(gdb) bt full
#0  0x00007ffff10b4d12 in  () at /usr/lib/libfluidsynth.so.3
#1  0x00007ffff10e3c11 in  () at /usr/lib/libfluidsynth.so.3
#2  0x00007ffff10cfca8 in delete_fluid_synth () at /usr/lib/libfluidsynth.so.3
#3  0x00007ffff7c041e1 in FLUIDSYNTH_Delete (context=0x555556384250) at music_fluidsynth.c:278
        music = 0x555556384250
#4  0x00007ffff7c02989 in Mix_FreeMusic (music=0x555556495470) at music.c:647
#5  0x00005555555ab85d in S_StopMusic () at s_sound.c:718
#6  0x00005555555ab908 in S_ChangeMusic (musicnum=<optimized out>, looping=looping@entry=1) at s_sound.c:685
        music = 0x5555556221c0 <S_music+1056>
        namebuf = "\000\000\243bUUU\000"
        handle = <optimized out>
#7  0x00005555555abadc in S_Start () at s_sound.c:263
        cnum = <optimized out>
        mnum = <optimized out>
#8  0x00005555555a2aaa in P_SetupLevel (episode=1, map=1, playermask=playermask@entry=0, skill=<optimized out>)
    at p_setup.c:794
        i = <optimized out>
        lumpname = "\000\305rbUUU\000"
        lumpnum = <optimized out>
#9  0x000055555558e620 in G_DoLoadLevel () at g_game.c:660
        i = <optimized out>
#10 0x000055555558fe70 in G_DoNewGame () at g_game.c:1752
#11 0x0000555555590b85 in G_Ticker () at g_game.c:879
        i = <optimized out>
        cmd = <optimized out>
#12 0x000055555556dd1d in TryRunTics () at d_loop.c:784
        set = 0x555555627240 <ticdata+10560>
        i = 0
        lowtic = 67
        entertic = <optimized out>
        oldentertics = 82
--Type <RET> for more, q to quit, c to continue without paging--c
        realtics = <optimized out>
        availabletics = <optimized out>
        counts = 0
#13 0x000055555558a652 in D_RunFrame () at d_main.c:436
        nowtime = <optimized out>
        tics = <optimized out>
        wipestart = 0
        wipe = false
#14 0x000055555558a777 in D_DoomLoop () at d_main.c:496
#15 0x000055555558ba74 in D_DoomMain () at d_main.c:1998
        p = <optimized out>
        file = "demo1\000\000\000\220\002", '\000' <repeats 14 times>, "v\f\233\367\377\177\000\000\377\265\360\000\000\000\000\000\361\034\233\367\377\177\000\000\000\\\257\367\377\177\000\000\376,\233\367\377\177\000\000\200CnUUU\000\000\002\000\000\000\000\000\000\000\000\020\002\000\000\000\000\000\376,\233\367\377\177\000\000\020DnUUU\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\376,\233\367\377\177\000\000\300CnUUU\000\000\240[\257\367\377\177\000\000\000\000\000\000\000\000\000\000\270\377\377\377\377\377\377\377\001\000\000\000\000\000\000\000ح`UUU\000\000\000\320\377\367\377\177\000\000\062\067\233\367\377\177\000\000\001\000\000\000\000\000\000\000ح"...
        demolumpname = "\000\265\233\241\367\377\177\000"
        numiwadlumps = 2919
#16 0x0000555555569df7 in main (argc=<optimized out>, argv=0x7fffffffddb8) at i_main.c:77
        __PRETTY_FUNCTION__ = "main"

from chocolate-doom.

mikeday0 avatar mikeday0 commented on September 23, 2024

This is an old SDL_mixer bug that was fixed a while back. (Specifically, the one addressed here: libsdl-org/SDL_mixer@6160668) Is there any chance you have multiple versions of SDL_mixer still present on your machine? I suspect that you do, and Chocolate for some reason is linking with that older version instead of the newer.

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

I don't know if it could be linking with SDL 1.2, because that's the only other version of SDL Mixer that I have installed, and it was installed by Steam Runtime, so I can't just delete it. The only SDL packages that pacman -Qe reports are these:

sdl2_gfx 1:1.0.4-2
sdl2_image 2.6.2-2
sdl2_mixer 2.6.2-1
sdl2_net 1:2.2.0-1
sdl2_ttf 2.20.1-1
sdl_mixer 1.2.12-12

from chocolate-doom.

mikeday0 avatar mikeday0 commented on September 23, 2024

Try running sudo find / -name libSDL2_mixer-2.0.so*. That will tell us for sure if there are any non-usr/lib copies hanging out somewhere.

EDIT: Actually I bet the linking is fine. It's probably at runtime that it's loading a down-level shared library.

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

The output only shows this as for system libraries:

/usr/lib/libSDL2_mixer-2.0.so.0.600.2
/usr/lib/libSDL2_mixer-2.0.so.0
/usr/lib32/libSDL2_mixer-2.0.so.0.600.2
/usr/lib32/libSDL2_mixer-2.0.so.0

The rest are lots of lines of this sort from things that came with Steam, or Lutris. However, all of them are under ~/.local/share, so I don't think they should cause problems? They don't in other distros:

/home/hugazo/.local/share/Steam/ubuntu12_32/steam-runtime.old/usr/lib/i386-linux-gnu/libSDL2_mixer-2.0.so.0.600.1
/home/hugazo/.local/share/Steam/ubuntu12_32/steam-runtime.old/usr/lib/i386-linux-gnu/libSDL2_mixer-2.0.so.0
/home/hugazo/.local/share/Steam/ubuntu12_32/steam-runtime.old/usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so.0.600.1
/home/hugazo/.local/share/Steam/ubuntu12_32/steam-runtime.old/usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so.0
/home/hugazo/.local/share/lutris/runners/wine/lutris-GE-Proton7-16-x86_64/lib/libSDL2_mixer-2.0.so.0
/home/hugazo/.local/share/lutris/runners/wine/lutris-5.7-11-x86_64/lib64/libSDL2_mixer-2.0.so.0.2.2

... etc

There's a couple ones that are present in the chocpkg folder:

/home/hugazo/build/chocpkg/install/lib/libSDL2_mixer-2.0.so.0.2.2
/home/hugazo/build/chocpkg/install/lib/libSDL2_mixer-2.0.so.0

I don't think these last ones be causing problems either? I could be wrong..

from chocolate-doom.

fabiangreffrath avatar fabiangreffrath commented on September 23, 2024

This is an old SDL_mixer bug that was fixed a while back.

Nothing we can fix from the Chocolate side.

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

Except that bug doesn't seem to be the cause, since it doesn't affect Crispy Doom. Besides, the bug was marked as fixed in January 20, 2021 in the libSDL repository, but the latest Arch Linux SDL2_Mixer package is from August 19, 2022.

from chocolate-doom.

fabiangreffrath avatar fabiangreffrath commented on September 23, 2024

What does ldd chocolate-doom say, where "chocolate-doom" is the exact same binary that does the crash.

from chocolate-doom.

mikeday0 avatar mikeday0 commented on September 23, 2024

There's a couple ones that are present in the chocpkg folder:

/home/hugazo/build/chocpkg/install/lib/libSDL2_mixer-2.0.so.0.2.2
/home/hugazo/build/chocpkg/install/lib/libSDL2_mixer-2.0.so.0

I don't think these last ones be causing problems either? I could be wrong..

Ah, are you also running the build script from chocpkg? If so, are you running the binaries out of there? I think that would explain it. The version of SDL2_mixer that the chocpkg script downloads is 2.0.4, which has the FluidSynth bug.

FYI it is not necessary to run any of the chocpkg stuff. After installing the prerequisites, building is as simple as:

autoreconf -fi
./configure
make
sudo make install (if desired)

If you don't make install then you can just run the chocolate-doom binary in the src folder.

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

What does ldd chocolate-doom say, where "chocolate-doom" is the exact same binary that does the crash.

Oh, wow, would you look at that:

        linux-vdso.so.1 (0x00007fff25548000)
        libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x00007fa0bc404000)
        libsamplerate.so.0 => /usr/lib/libsamplerate.so.0 (0x00007fa0bc294000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007fa0bc25b000)
        libSDL2_mixer-2.0.so.0 => /home/hugazo/build/chocpkg/install/lib/libSDL2_mixer-2.0.so.0 (0x00007f564ce2e000)
        libSDL2_net-2.0.so.0 => /home/hugazo/build/chocpkg/install/lib/libSDL2_net-2.0.so.0 (0x00007f564ce27000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fa0bc122000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fa0bbf3b000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fa0bbf21000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fa0bc799000)

I think what happened in this case is that I think I compiled the executables before installing the SDL2_Mixer package (and SDL2_net apparently) for Arch, so the executables became permanently linked with the ones in that folder, which I think were built by chocpkg. Deleting those fixed the issue. No wonder it doesn't happen in Crispy, since it forces you to install the native package for your distro before compiling.

My bad. I'm gonna edit the title to make it clear it was my mistake.

I don't think these last ones be causing problems either? I could be wrong..

And turns out I was lol.

from chocolate-doom.

hfc2x avatar hfc2x commented on September 23, 2024

I'm thinking the chocpkg script ought to pull down a newer version of SDL_mixer.

This made me think.. wouldn't it be more convenient to list all the SDL2 packages as requirements in the wiki instead of letting chocpkg pick a specific version? Or have chocpkg stop the build process if it detects SDL2 libraries are not installed instead of building them itself.

from chocolate-doom.

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.