If I enable music, switching between the main exult menu and the serpent isle menu (I don't have BG) sometimes (pretty often though) hits segfaults.
As they are only sometimes, those aren't 100% reproducable and might depend on timing, and also I get different backtraces, so they might be different bugs:
Digital SFX's file specified: ... but file not found, and fallbacks are missing
Resetting AudioMixer...
played intro
Thread 1 "exult" received signal SIGSEGV, Segmentation fault.
0x000055555588679a in Shape::reset (this=0x5555575cf920) at vgafile.cc:979
979 delete frames[i];
(gdb) bt full
#0 0x000055555588679a in Shape::reset (this=0x5555575cf920) at vgafile.cc:979
i = 61
i = <optimized out>
#1 0x000055555586a5d9 in Shape_file::~Shape_file (this=0x5555575cf920, __in_chrg=<optimized out>)
at vgafile.h:269
No locals.
#2 Shape_file::~Shape_file (this=0x5555575cf920, __in_chrg=<optimized out>) at vgafile.h:269
No locals.
#3 Font::clean_up (this=this@entry=0x5555575ce3e0) at font.cc:695
No locals.
#4 0x000055555586bb21 in Font::~Font (this=0x5555575ce3e0, __in_chrg=<optimized out>) at font.cc:691
No locals.
#5 FontManager::reset (this=0x55555598e0e0 <fontManager>) at font.cc:876
i = {<std::__detail::_Node_iterator_base<std::pair<char const* const, Font*>, true>> = {
_M_cur = 0x5555575ce3b0}, <No data fields>}
#6 0x00005555555e0bdd in Init () at exult.cc:905
skip_splash = false
basegame = <optimized out>
newgame = <optimized out>
audio = <optimized out>
midi = <optimized out>
info = {version = {major = 2 '\002', minor = 0 '\000', patch = 9 '\t'}, subsystem = <optimized out>,
info = {x11 = {display = <optimized out>, window = <optimized out>}, wl = {
display = <optimized out>, surface = <optimized out>, shell_surface = <optimized out>},
dummy = {<optimized out> <repeats 64 times>}}}
audio = <optimized out>
midi = <optimized out>
#7 0x00005555555e21b9 in exult_main (runpath=0x7fffffffe5e8 "/usr/games/exult") at exult.cc:699
music_path = "/usr/share/games/exult/music"
data_path = "/usr/share/games/exult"
default_music = "/usr/share/games/exult/music"
crc_ok = <optimized out>
flexname = 0x555555901e68 "<DATA>/exult_si.flx"
crc = <optimized out>
config_ignore_crc = false
vs = std::vector of length 2, capacity 2 = {"blackgate", "serpentisle"}
uctrace = "NO"
result = <optimized out>
#8 0x00005555555a73a9 in main (argc=1, argv=0x7fffffffe328) at exult.cc:409
needhelp = false
showversion = false
result = <optimized out>
parameters = {options = std::vector of length 21, capacity 32 = {{option = "-h", {
bval = 0x7fffffffe1ce, sval = 0x7fffffffe1ce, ival = 0x7fffffffe1ce, uval = 0x7fffffffe1ce},
{dbval = true, dsval = 0x1 <error: Cannot access memory at address 0x1>, dival = 1,
duval = 1}, valuetype = Args::Opts::type_bool}, {option = "--help", {bval = 0x7fffffffe1ce,
sval = 0x7fffffffe1ce, ival = 0x7fffffffe1ce, uval = 0x7fffffffe1ce}, {dbval = true,
dsval = 0x1 <error: Cannot access memory at address 0x1>, dival = 1, duval = 1},
valuetype = Args::Opts::type_bool}, {option = "/?", {bval = 0x7fffffffe1ce,
sval = 0x7fffffffe1ce, ival = 0x7fffffffe1ce, uval = 0x7fffffffe1ce}, {dbval = true,
dsval = 0x1 <error: Cannot access memory at address 0x1>, dival = 1, duval = 1},
[...]
Digital SFX's file specified: ... but file not found, and fallbacks are missing
free(): invalid next size (fast)
Thread 1 "exult" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff767c535 in __GI_abort () at abort.c:79
#2 0x00007ffff76d3508 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff77de28d "%s\n")
at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff76d9c1a in malloc_printerr (str=str@entry=0x7ffff77dff88 "free(): invalid next size (fast)")
at malloc.c:5341
#4 0x00007ffff76db4d6 in _int_free (av=0x7ffff7815c40 <main_arena>, p=0x5555575d93c0,
have_lock=<optimized out>) at malloc.c:4241
#5 0x000055555586cfc1 in __gnu_cxx::new_allocator<char>::deallocate (this=0x5555575e32d0,
__p=<optimized out>) at /usr/include/c++/8/ext/new_allocator.h:116
#6 std::allocator_traits<std::allocator<char> >::deallocate (__a=..., __n=<optimized out>,
__p=<optimized out>) at /usr/include/c++/8/bits/alloc_traits.h:462
#7 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy (
__size=<optimized out>, this=0x5555575e32d0) at /usr/include/c++/8/bits/basic_string.h:226
#8 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (
this=0x5555575e32d0) at /usr/include/c++/8/bits/basic_string.h:221
#9 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string (
this=0x5555575e32d0, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/basic_string.h:657
#10 std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (
__pointer=0x5555575e32d0) at /usr/include/c++/8/bits/stl_construct.h:98
#11 std::_Destroy_aux<false>::__destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (__last=<optimized out>, __first=0x5555575e32d0) at /usr/include/c++/8/bits/stl_construct.h:108
#12 std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*> (
__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/8/bits/stl_construct.h:137
#13 std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (__last=<optimized out>,
__first=<optimized out>) at /usr/include/c++/8/bits/stl_construct.h:206
#14 std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_erase_at_end (
this=0x55555598e160 <item_names[abi:cxx11]>, __pos=0x5555575dd7b0)
at /usr/include/c++/8/bits/stl_vector.h:1658
#15 std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::clear (
this=0x55555598e160 <item_names[abi:cxx11]>) at /usr/include/c++/8/bits/stl_vector.h:1386
#16 Free_text_list (items=std::vector of length 1024, capacity 1024 = {...}) at items.cc:357
#17 Free_text () at items.cc:362
#18 0x000055555586d806 in Setup_text (si=true, expansion=<optimized out>, sibeta=false) at items.cc:308
#19 0x00005555555e0a38 in Init () at game.h:99
#20 0x00005555555e21b9 in exult_main (runpath=0x7fffffffe5e8 "/usr/games/exult") at exult.cc:699
#21 0x00005555555a73a9 in main (argc=1, argv=0x7fffffffe328) at exult.cc:409
Digital SFX's file specified: ... but file not found, and fallbacks are missing
free(): invalid next size (fast)
Thread 5 "SDLAudioP1" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff2d83700 (LWP 4183)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {234975239, 140737329893672, 93824996964176, 93824996964208, 0, 140737345046524, 2,
9223372036854775822, 0, 0, 0, 0, 0, 0, 0, 0}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007ffff767c535 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x1729c, sa_sigaction = 0x1729c}, sa_mask = {__val = {
847482504, 32, 12951514634538332160, 102, 93824993224145, 2305843146956083265,
7595430041490911824, 8242270567191832430, 140699741746021, 140737267640848, 93824996965520,
140737267640864, 140737329773697, 0, 140737267640928, 140737267641184}},
sa_flags = -220714400, sa_restorer = 0x1000}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff76d3508 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff77de28d "%s\n")
at ../sysdeps/posix/libc_fatal.c:181
ap = {{gp_offset = 24, fp_offset = 21845, overflow_arg_area = 0x7ffff2d82b70,
reg_save_area = 0x7ffff2d82b00}}
fd = 2
list = <optimized out>
nlist = <optimized out>
cp = <optimized out>
written = <optimized out>
#3 0x00007ffff76d9c1a in malloc_printerr (str=str@entry=0x7ffff77dff88 "free(): invalid next size (fast)")
at malloc.c:5341
No locals.
#4 0x00007ffff76db4d6 in _int_free (av=0x7ffff7815c40 <main_arena>, p=0x5555575cadd0,
have_lock=<optimized out>) at malloc.c:4241
fail = <optimized out>
idx = <optimized out>
old = <optimized out>
old2 = <optimized out>
size = 64
fb = <optimized out>
nextchunk = <optimized out>
nextsize = <optimized out>
nextinuse = <optimized out>
prevsize = <optimized out>
bck = <optimized out>
fwd = <optimized out>
__PRETTY_FUNCTION__ = "_int_free"
#5 0x000055555565161b in XMidiEvent::FreeThis (this=0x5555575c49c0) at XMidiEvent.h:151
e = <optimized out>
e = <optimized out>
e = <optimized out>
#6 XMidiEventList::decrementCounter (this=0x555557158b80) at XMidiEventList.cpp:221
No locals.
#7 0x000055555564710f in LowLevelMidiDriver::playSequences (this=0x55555710ea10)
at LowLevelMidiDriver.cpp:757
message = {type = LowLevelMidiDriver::LLMD_MSG_FINISH, sequence = 0, data = {play = {
list = 0x5555575ef370, repeat = 96, volume = 21845, branch = 1432383654}, pause = {
paused = 112}, volume = {level = 1465840496}, speed = {percentage = 1465840496},
init_failed = {code = 1465840496}, precache = {list = 0x5555575ef370}}}
i = <optimized out>
#8 0x0000555555647608 in LowLevelMidiDriver::produceSamples (bytes=<optimized out>, samples=0x555555bbfcd0,
this=0x55555710ea10) at LowLevelMidiDriver.cpp:691
samples_to_produce = 98
stereo_mult = 2
num_samples = 512
stereo_mult = <optimized out>
num_samples = <optimized out>
samples_to_produce = <optimized out>
#9 LowLevelMidiDriver::produceSamples (this=0x55555710ea10, samples=<optimized out>, bytes=<optimized out>)
at LowLevelMidiDriver.cpp:663
stereo_mult = <optimized out>
num_samples = <optimized out>
samples_to_produce = <optimized out>
#10 0x00005555556415b3 in Pentagram::AudioMixer::MixAudio (this=0x555556e89bf0, stream=0x555555bbfcd0,
bytes=2048) at AudioMixer.cc:383
i = <optimized out>
#11 0x00007ffff7e8b929 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#12 0x00007ffff7ed4e8c in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#13 0x00007ffff7f48119 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#14 0x00007ffff6bdbfa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
ret = <optimized out>
pd = <optimized out>
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737267644160, -6219027106396189317, 140737488344494,
140737488344495, 140737267644160, 93824998960704, 6219038409163984251, 6219047432310279547},
mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0,
canceltype = 0}}}
not_first_call = <optimized out>
#15 0x00007ffff77534cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.