Solved OpenMSX issue

  • Thread starter Deleted member 56028
  • Start date
D

Deleted member 56028

Guest
I'm the maintainer of emulators/openmsx. I've adopted this port some time ago (I don't remember) and 0.17 was working fine. But as the lack of time that pests all of us, it was some time I've didn't run openmsx, turns out I had that time and I realized that the openmsx can't run anymore. Said that, I'm not sure when it stopped working.
Funny thing is: It builds just fine from ports, no errors, nothing. But the binary segfaults. Here's the gdb backtrace:
Code:
 0x0000000802429938 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
#1  0x00000008014629ea in __dynamic_cast () from /usr/local/lib/gcc10/libstdc++.so.6
#2  0x00000008014e8d36 in bool std::has_facet<std::ctype<char> >(std::locale const&) () from /usr/local/lib/gcc10/libstdc++.so.6
#3  0x00000008014daac5 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) () from /usr/local/lib/gcc10/libstdc++.so.6
#4  0x00000008014daf71 in std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) () from /usr/local/lib/gcc10/libstdc++.so.6
#5  0x000000080147707b in std::ios_base::Init::Init() () from /usr/local/lib/gcc10/libstdc++.so.6
#6  0x000000000043ab9e in ?? ()
#7  0x0000000800c4503d in ?? () from /libexec/ld-elf.so.1
#8  0x0000000000000114 in ?? ()
#9  0x00000008025e42e0 in ?? () from /lib/libutil.so.9
#10 0x00007fffffffdb38 in ?? ()
#11 0x0000000800c6d408 in ?? ()
#12 0x0000000000000000 in ?? ()
So I have a port in my hands that compiles just fine, generates the proper binary, no errors, nothing, but is unable to work as expected. How nice is that? 😄
The port is live if you want to give a shot, I'm really out of ideas.
 
in __dynamic_cast ()
From https://stackoverflow.com/questions...-even-when-the-object-that-is-casted-is-not-n
Reasons which can cause a crash when using dynamic_cast
  • pointer points to a free memory block.
  • pointer points to a non-polymorphic type.
  • pointer points to an object with a polymorphic type but present in an external library compiled with RTTI disabled.
  • pointer points to a memory accessing which can cause protection exception (such as a guard page or inaccessible page).
Could you compile it with -O0 -g to get a better backtrace?
 
yeah, thats the problem
build sdl2_ttf without harfbuzz and will work (will not dump core)
harfbuzz brings in clangs lc++ which conflicts with libstdc++ (or its rt libcxxrt conflicts with libstdc++)
Code:
$./work/openMSX-RELEASE_17_0/derived/x86_64-freebsd-opt/bin/openmsx
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
error: Could not open sequencer: No such file or directory
error: XDG_RUNTIME_DIR not set in the environment.
warning: Couldn't activate renderer SDLGL-PP: SDL init failed (32): No available video device
Trying to switch to SDL renderer instead...
error: XDG_RUNTIME_DIR not set in the environment.
warning: Couldn't activate renderer SDL: SDL init failed (32): No available video device
Trying to decrease scale_factor setting from 2 to 1...
error: XDG_RUNTIME_DIR not set in the environment.
terminate called after throwing an instance of 'openmsx::MSXException'
 
yeah, thats the problem
build sdl2_ttf without harfbuzz and will work (will not dump core)
harfbuzz brings in clangs lc++ which conflicts with libstdc++ (or its rt libcxxrt conflicts with libstdc++)
Code:
$./work/openMSX-RELEASE_17_0/derived/x86_64-freebsd-opt/bin/openmsx
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
error: Could not open sequencer: No such file or directory
error: XDG_RUNTIME_DIR not set in the environment.
warning: Couldn't activate renderer SDLGL-PP: SDL init failed (32): No available video device
Trying to switch to SDL renderer instead...
error: XDG_RUNTIME_DIR not set in the environment.
warning: Couldn't activate renderer SDL: SDL init failed (32): No available video device
Trying to decrease scale_factor setting from 2 to 1...
error: XDG_RUNTIME_DIR not set in the environment.
terminate called after throwing an instance of 'openmsx::MSXException'
That worked. I have a PR created for some clues. But now my question is, how this can be fixed port-wise? I will mention this thread in my PR.
 
I will mark as solved since the 18.0 is already on ports with the upstream fix...
 
Back
Top