clementgallet / libTAS

GNU/Linux software to (hopefully) give TAS tools to games
GNU General Public License v3.0
496 stars 57 forks source link

Godot `get_real_window_size()` SIGSEGV when desktop environment is not running. #448

Open R30hedron opened 3 years ago

R30hedron commented 3 years ago

Game: Citadel of Celestial Cascades libTAS version: Release 1.4.2

On game startup, Citadel of Celestial Cascades appears to uses a Godot function, OS_X11::get_real_window_size(), to center the window in the display. However, when run under WSL, which does not have a desktop environment installed by default, the game segfaults:

Thread 1 "Citadel of Cele" received signal SIGSEGV, Segmentation fault.
0x0000000000592eae in OS_X11::get_real_window_size() const ()
R30hedron commented 3 years ago

The current preferred method for displaying libTAS related windows from within WSL is to use VcXsrv with the "Multiple windows" option, effectively using Windows' desktop environment for WSL's windows. Changing this setting to "One large window" is insufficient to prevent the segfault.

A complete workaround is to installing a DE onto the WSL guest (such as xfce4) and use the "One large window" setting with VcXsrv to give the game a display size with which to pull display information from.

clementgallet commented 2 years ago

I think this is a crash that was fixed since: https://github.com/godotengine/godot/commit/2684e816823ef3911143e630f92bc969adece1b5