Need some help debugging engine build

Godot Version

4.6.1

Question

I am having trouble getting a godot build to run (4.6.1 on FreeBSD 15-amd64). I have godot 4.5.1 installed and running.

There is an uncaught exception of std::bad_cast. In lldb I see nothing that points to any code in godot, so I am excepting it to be related to init code before entering main(). It seems to be initialising iostream.

Any suggestions on where to start looking?

I have built with debug_symbols on and get the following in lldb. There is a single thread running. (looks same with run –verbose –test and just run) :-

lldb godot.linuxbsd.editor.x86_64.llvm
(lldb) target create "godot.linuxbsd.editor.x86_64.llvm"
Current executable set to '/tmp/workdir/home/shane/Projects/FreeBSD-Ports/sambler-ports/devel/godot-tools/work/godot-4.6.1-stable/bin/godot.linuxbsd.editor.x86_64.llvm' (x86_64).
(lldb) run --verbose --test
Process 77486 launched: '/tmp/workdir/home/shane/Projects/FreeBSD-Ports/sambler-ports/devel/godot-tools/work/godot-4.6.1-stable/bin/godot.linuxbsd.editor.x86_64.llvm' (x86_64)
Terminating due to uncaught exception 0x2fd52ac0c000 of type std::bad_cast
Process 77486 stopped
* thread #1, name = 'godot.linuxbsd.e', stop reason = signal SIGABRT
    frame #0: 0x0000000844ba09ea libsys.so.7`__sys_thr_kill at thr_kill.S:4
   1   	/* @generated by libsys/Makefile.sys */
   2   	#include "compat.h"
   3   	#include "SYS.h"
-> 4   	RSYSCALL(thr_kill)
   5   		.section .note.GNU-stack,"",%progbits
(lldb) bt
* thread #1, name = 'godot.linuxbsd.e', stop reason = signal SIGABRT
  * frame #0: 0x0000000844ba09ea libsys.so.7`__sys_thr_kill at thr_kill.S:4
    frame #1: 0x000000083f257804 libc.so.7`__raise(s=6) at raise.c:48:10
    frame #2: 0x000000083f308989 libc.so.7`abort at abort.c:61:8
    frame #3: 0x00000000095ddcf8 godot.linuxbsd.editor.x86_64.llvm`terminate_with_diagnostics() at cxxrt_exception.cc:366:2
    frame #4: 0x00000000095dbf79 godot.linuxbsd.editor.x86_64.llvm`std::terminate() at cxxrt_exception.cc:0
    frame #5: 0x00000000095dc3ee godot.linuxbsd.editor.x86_64.llvm`throw_exception(__cxxabiv1::__cxa_exception*) [inlined] report_failure(err=<unavailable>, thrown_exception=<unavailable>) at cxxrt_exception.cc:777:2
    frame #6: 0x00000000095dc3c4 godot.linuxbsd.editor.x86_64.llvm`throw_exception(ex=<unavailable>) at cxxrt_exception.cc:799:2
    frame #7: 0x00000000095dc306 godot.linuxbsd.editor.x86_64.llvm`__cxa_throw(thrown_exception=<unavailable>, tinfo=<unavailable>, dest=<unavailable>) at cxxrt_exception.cc:830:2
    frame #8: 0x000000000959b8dd godot.linuxbsd.editor.x86_64.llvm`std::__1::__throw_bad_cast[abi:se190107]() at typeinfo:377:3
    frame #9: 0x00000000095bea0b godot.linuxbsd.editor.x86_64.llvm`std::__1::locale::use_facet(std::__1::locale::id&) const [inlined] std::__1::locale::__imp::use_facet(this=0x0000000009846ae8, id=<unavailable>) const at locale.cpp:485:5
    frame #10: 0x00000000095bea06 godot.linuxbsd.editor.x86_64.llvm`std::__1::locale::use_facet(this=<unavailable>, x=0x0000000843770ef0) const at locale.cpp:579:73
    frame #11: 0x000000084371e06b libc++.so.1`std::__1::__stdinbuf<char>::imbue(std::__1::locale const&) [inlined] std::__1::codecvt<char, char, __mbstate_t> const& std::__1::use_facet[abi:se190107]<std::__1::codecvt<char, char, __mbstate_t>>(__l=<unavailable>) at __locale:168:42
    frame #12: 0x000000084371e05c libc++.so.1`std::__1::__stdinbuf<char>::imbue(this=0x00000008437706d0, __loc=<unavailable>) at std_stream.h:85:23
    frame #13: 0x000000084371d96f libc++.so.1`std::__1::DoIOSInit::DoIOSInit() [inlined] std::__1::__stdinbuf<char>::__stdinbuf(this=0x00000008437706d0, __fp=<unavailable>, __st=<unavailable>) at std_stream.h:74:3
    frame #14: 0x000000084371d909 libc++.so.1`std::__1::DoIOSInit::DoIOSInit(this=<unavailable>) at iostream.cpp:131:57
    frame #15: 0x000000084371dfcd libc++.so.1`std::__1::ios_base::Init::Init(this=<unavailable>) at iostream.cpp:166:20
    frame #16: 0x000000084371ee55 libc++.so.1`_GLOBAL__I_000100 [inlined] __cxx_global_var_init at iostream_init.h:2:31
    frame #17: 0x000000084371ee44 libc++.so.1`_GLOBAL__I_000100 at iostream.cpp:0
    frame #18: 0x000034e02af2e73d ld-elf.so.1`objlist_call_init(list=0x0000000829c71250, lockstate=0x0000000829c71030) at rtld.c:3259:6
    frame #19: 0x000034e02af2cba6 ld-elf.so.1`_rtld(sp=<unavailable>, exit_proc=0x0000000829c712c0, objp=0x0000000829c712c8) at rtld.c:1008:2
    frame #20: 0x000034e02af29ec9 ld-elf.so.1`.rtld_start at rtld_start.S:40
(lldb) thread list
Process 77486 stopped
* thread #1: tid = 450230, 0x0000000844ba09ea libsys.so.7`__sys_thr_kill at thr_kill.S:4, name = 'godot.linuxbsd.e', stop reason = signal SIGABRT
(lldb) thread backtrace all
* thread #1, name = 'godot.linuxbsd.e', stop reason = signal SIGABRT
  * frame #0: 0x0000000844ba09ea libsys.so.7`__sys_thr_kill at thr_kill.S:4
    frame #1: 0x000000083f257804 libc.so.7`__raise(s=6) at raise.c:48:10
    frame #2: 0x000000083f308989 libc.so.7`abort at abort.c:61:8
    frame #3: 0x00000000095ddcf8 godot.linuxbsd.editor.x86_64.llvm`terminate_with_diagnostics() at cxxrt_exception.cc:366:2
    frame #4: 0x00000000095dbf79 godot.linuxbsd.editor.x86_64.llvm`std::terminate() at cxxrt_exception.cc:0
    frame #5: 0x00000000095dc3ee godot.linuxbsd.editor.x86_64.llvm`throw_exception(__cxxabiv1::__cxa_exception*) [inlined] report_failure(err=<unavailable>, thrown_exception=<unavailable>) at cxxrt_exception.cc:777:2
    frame #6: 0x00000000095dc3c4 godot.linuxbsd.editor.x86_64.llvm`throw_exception(ex=<unavailable>) at cxxrt_exception.cc:799:2
    frame #7: 0x00000000095dc306 godot.linuxbsd.editor.x86_64.llvm`__cxa_throw(thrown_exception=<unavailable>, tinfo=<unavailable>, dest=<unavailable>) at cxxrt_exception.cc:830:2
    frame #8: 0x000000000959b8dd godot.linuxbsd.editor.x86_64.llvm`std::__1::__throw_bad_cast[abi:se190107]() at typeinfo:377:3
    frame #9: 0x00000000095bea0b godot.linuxbsd.editor.x86_64.llvm`std::__1::locale::use_facet(std::__1::locale::id&) const [inlined] std::__1::locale::__imp::use_facet(this=0x0000000009846ae8, id=<unavailable>) const at locale.cpp:485:5
    frame #10: 0x00000000095bea06 godot.linuxbsd.editor.x86_64.llvm`std::__1::locale::use_facet(this=<unavailable>, x=0x0000000843770ef0) const at locale.cpp:579:73
    frame #11: 0x000000084371e06b libc++.so.1`std::__1::__stdinbuf<char>::imbue(std::__1::locale const&) [inlined] std::__1::codecvt<char, char, __mbstate_t> const& std::__1::use_facet[abi:se190107]<std::__1::codecvt<char, char, __mbstate_t>>(__l=<unavailable>) at __locale:168:42
    frame #12: 0x000000084371e05c libc++.so.1`std::__1::__stdinbuf<char>::imbue(this=0x00000008437706d0, __loc=<unavailable>) at std_stream.h:85:23
    frame #13: 0x000000084371d96f libc++.so.1`std::__1::DoIOSInit::DoIOSInit() [inlined] std::__1::__stdinbuf<char>::__stdinbuf(this=0x00000008437706d0, __fp=<unavailable>, __st=<unavailable>) at std_stream.h:74:3
    frame #14: 0x000000084371d909 libc++.so.1`std::__1::DoIOSInit::DoIOSInit(this=<unavailable>) at iostream.cpp:131:57
    frame #15: 0x000000084371dfcd libc++.so.1`std::__1::ios_base::Init::Init(this=<unavailable>) at iostream.cpp:166:20
    frame #16: 0x000000084371ee55 libc++.so.1`_GLOBAL__I_000100 [inlined] __cxx_global_var_init at iostream_init.h:2:31
    frame #17: 0x000000084371ee44 libc++.so.1`_GLOBAL__I_000100 at iostream.cpp:0
    frame #18: 0x000034e02af2e73d ld-elf.so.1`objlist_call_init(list=0x0000000829c71250, lockstate=0x0000000829c71030) at rtld.c:3259:6
    frame #19: 0x000034e02af2cba6 ld-elf.so.1`_rtld(sp=<unavailable>, exit_proc=0x0000000829c712c0, objp=0x0000000829c712c8) at rtld.c:1008:2
    frame #20: 0x000034e02af29ec9 ld-elf.so.1`.rtld_start at rtld_start.S:40

I found the issue, disabling builtin_openxr caused this issue.

1 Like