SIGSEGV in CleanupChannel (channel=1) at sfx.cpp:934

Bug #2009960 reported by Paul Dufresne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
freedink (Ubuntu)
New
Undecided
Unassigned

Bug Description

Not long after new game, if with sound, it stopped.

When ran in gdb:
[New Thread 0x7fffda13e6c0 (LWP 2322)]
ERROR: Audio music decoder: no Ogg support
[New Thread 0x7fffd886c6c0 (LWP 2324)]
[New Thread 0x7fffbffff6c0 (LWP 2325)]
[New Thread 0x7fffbf7fe6c0 (LWP 2326)]

Thread 1 "freedink" received signal SIGSEGV, Segmentation fault.
0x0000555555573907 in CleanupChannel (channel=1) at sfx.cpp:934
Download failed: Invalid argument. Continuing without source file ./src/sfx.cpp.
934 sfx.cpp: No such file or directory.
(gdb) bt
#0 0x0000555555573907 in CleanupChannel(int) (channel=1) at sfx.cpp:934
#1 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#2 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#3 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#4 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#5 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#6 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#7 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#8 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#9 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#10 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#11 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#12 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#13 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#14 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#15 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#16 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#17 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#18 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#19 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#20 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#21 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#22 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#23 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#24 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#25 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#26 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
--Type <RET> for more, q to quit, c to continue without paging--
#27 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#28 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#29 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#30 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#31 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#32 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#33 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#34 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#35 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
#36 0x00007ffff7f2ef50 in _Mix_channel_done_playing (channel=1) at src/mixer.c:285
#37 Mix_HaltChannel_locked (which=which@entry=1) at src/mixer.c:921
#38 0x00007ffff7f2efe4 in Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:943
#39 Mix_FreeChunk (chunk=0x555556876330) at src/mixer.c:932
#40 0x0000555555573919 in CleanupChannel(int) (channel=1) at sfx.cpp:940
(gdb)

summary: - when sound: sfx.cpp: No such file or directory
+ SIGSEGV in CleanupChannel (channel=1) at sfx.cpp:934
Revision history for this message
Paul Dufresne (dufresnep) wrote :

I think it might be linked to sfml library.
paul@rafulos:~$ apt list --installed |grep sfml

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

paul@rafulos:~$

Did:
paul@rafulos:~$ sudo apt install libsfml-audio
[sudo] password for paul:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libsfml-audio
paul@rafulos:~$

But it did not fixed the problem.

Revision history for this message
Paul Dufresne (dufresnep) wrote :

On Kubuntu 22.10:
paul@rafulos:~$ apt list --installed |grep freedink

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

freedink-data/kinetic,kinetic,now 1.08.20190120-2 all [installed,automatic]
freedink-dfarc/kinetic,now 3.14-4 amd64 [installed,automatic]
freedink-engine/kinetic,now 109.6-3 amd64 [installed]
freedink/kinetic,kinetic,now 109.6-3 all [installed,automatic]
paul@rafulos:~$

Revision history for this message
Paul Dufresne (dufresnep) wrote :

The file is part of FreeDink...
https://github.com/gitGNU/gnu_freedink/blob/master/src/sfx.cpp
Sound effects (not music) management

More precisely:
/**
 * Free chunk once it's played (through Mix_ChannelFinished()
 * callback)
 */
static void CleanupChannel(int channel)
{
  /* SDL_mixer won't try to free the actual audio buffer (fake_buf) if
     the Chunk was loaded via Mix_QuickLoad_RAW() - which is a good
     thing since fake_buf is shared by all Chunks. We still need to
     free the Chunk when it's done playing. */
  Mix_Chunk *chunk = Mix_GetChunk(channel);
  if (chunk == NULL)
    {
      log_fatal("Internal error: cannot free channel %d's chunk (where did it disappear?)", channel);
      exit(1);
    }
  Mix_FreeChunk(chunk);
  channelinfo[channel].finished = 0;
  channelinfo[channel].looping = 0;
  channelinfo[channel].cur_sound = -1;

  /* Revert SetVolume and SetPan effects */
  Mix_UnregisterAllEffects(channel);
  Mix_Volume(channel, MIX_MAX_VOLUME);
}

Latest seems: http://ftp.gnu.org/gnu/freedink/freedink-109.6.tar.gz in 2019.
So it seems to be latest version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.