Unclickable fatal error message (Windows and macOS)
When I got an error starting the cgame VM on startup (Error during initialization: VM: Could not create child process: Access is denied), the fatal error dialog box was created "in" the full-screen window (where nothing was drawn yet). The full-screen window was not yet focused, so the dialog was initially not visible. By clicking on Unvanquished in the taskbar it was possible to focus the window and see the dialog drawn over a black screen, but it was not possible to interact with it using mouse or keyboard. Normal methods for closing also do not work during the fatal error dialog, so it had to be closed using the Task Manager. This is on Windows 10.
An easy way to produce the error is to pass -set vm.cgame.type 2 but don't actually build the native exe.
Ah yes I reproduced it last time I tried Windows but forgot to report it! Clicking the icon in the taskbar brings the fullscreen game up but cycling to the error message brings the fullscreen game down and the error messages goes down with it… 🙃️
We may also have to check if such bad behavior happens on GNOME when modal attachment is enabled (I always disable this bad feature because of this kind of bad behavior with all apps).
This started happening sometime this year, at the start of the year it was still working fine. I haven't seen black screen with it, rather just the window getting minimised and mouse position being reset to the top left of the screen when trying to click on it.
This may even be something having changed in SDL2 or in Windows.
0.54.1 still works fine in this regard, so I don't think it's an OS change.
I rebooted and now I can't reproduce it anymore... the difference is that the full-screen window is focused right away. The bug happened when the dialog came up while the application was in a minimized and full-screen state
Never mind just forgot to set r_fullscreen 1
There may be a way to fix the focusing issue, but I believe a better solution would be to entirely destroy the game window on Sys::Error (if that's possible).
There may be a way to fix the focusing issue, but I believe a better solution would be to entirely destroy the game window on
Sys::Error(if that's possible).
Not really. Sys::Error is used for things like segfaults so we don't want to do a lot of stuff.
If it turns out this bug can only happen in a narrow window of the loading phase, maybe we could reduce that window by doing a miminal initialization of the cgame (like just the CGAME_STATIC_INIT call) before starting the renderer.
I've found this: https://github.com/libsdl-org/SDL/issues/5371, maybe that's the reason?
I've found this: libsdl-org/SDL#5371, maybe that's the reason?
Yeah that seems to be it. Maybe after the release I'll update all the external_deps and see if that fixes it.
I no longer get this issue when building from master.
I got this on Mac on master when nacl_loader was missing.
Updating to SDL 2.32.2 does not fix it on Windows. On second glance, https://github.com/libsdl-org/SDL/issues/5371 is not relevant because it concerns SDL_WINDOW_FULLSCREEN_DESKTOP which is the "Mac OS fullscreen" from https://github.com/Unvanquished/Unvanquished/issues/790.
As a reminder, the bug can be produced by ./daemon -set vm.cgame.type 2 -set r_fullscreen 1 if you have not built the native exe.
It seems that on Windows this happens any time there is a Sys::Error in full-screen mode. Not just at a special point during loading where the window is not fully initialized or something...
The Linux error popup is somewhat broken too, even in windowed mode. You can interact with it only by clicking X. The "OK" button doesn't work.
Seems to be fixed with SDL3 on Windows.
On Mac I can't produce it now even with SDL2.
Yeah!