Open illwieckz opened 11 months ago
A simple way to reproduce the crash is to set SDL_VIDEODRIVER=wayland
in environment while being on X11, this way the game finds no display, so we can reproduce the crash that happens when there is no display.
Using SDL version 2.28.3
SDL_Init( SDL_INIT_VIDEO ) failed: wayland not available
]
Thread 1 "daemon" received signal SIGSEGV, Segmentation fault.
0x000055555561e71a in IN_SetMouseMode (newMode=newMode@entry=MouseMode::SystemCursor) at Unvanquished/daemon/src/engine/sys/sdl_input.cpp:437
437 if ( in_nograb->integer && newMode == MouseMode::Deltas )
It it's crashing by dereferencing in_nograb
I guess we can fix it by migrating the cvar to Cvar::Cvar<bool>
.
The engine crashes in input code if no display is available
This is not a big issue because the game can't run anyway, but the engine should shutdown properly instead of crashing.
I reproduce it in a chroot without display set, I guess an easier way to reproduce it is to try to run the game over SSH without X fowarding.