Linux: crash on startup when display cannot be opened

Author: fafok29Created Oct 1, 2026Updated Oct 1, 2026
LabelsBugDebuggerLinux

https://github.com/EpicGames/raddebugger/blob/cd41ba199bbe091d348a9b2be5a3528cb8acbff0/src/linux/window_manager/linux_window_manager.c#L343

XOpenDisplay can return null, which leads to crash; it's worth adding a log here, imo. In my case, the issue was that I tried to run it in a shell without $DISPLAY, which I didn't notice at first.

(gdb) bt
#0  0x00007ffff7d49db4 in XDefaultRootWindow () from /lib64/libX11.so.6
#1  0x000000000043d250 in wm_init () at ../src/linux/window_manager/linux_window_manager.c:347
#2  0x000000000042b5af in entry_point (cmd_line=0x7fffffffde18) at ../src/raddbg/raddbg_main.c:670
#3  0x000000000040356c in main_thread_base_entry_point (arguments_count=1, arguments=0x7fffffffe348) at ../src/base/base_entry_point.c:141
#4  0x0000000000401c6a in main (argc=1, argv=0x7fffffffe348) at ../src/linux/base/linux_base.c:2048
(gdb) p lnx_wm_state->display
$1 = (Display *) 0x0