Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclickable fatal error message (Windows) #1324

Open
slipher opened this issue Sep 28, 2024 · 10 comments
Open

Unclickable fatal error message (Windows) #1324

slipher opened this issue Sep 28, 2024 · 10 comments

Comments

@slipher
Copy link
Member

slipher commented Sep 28, 2024

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.

@slipher
Copy link
Member Author

slipher commented Sep 28, 2024

An easy way to produce the error is to pass -set vm.cgame.type 2 but don't actually build the native exe.

@illwieckz
Copy link
Member

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).

@VReaperV
Copy link
Contributor

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.

@illwieckz
Copy link
Member

This may even be something having changed in SDL2 or in Windows.

@VReaperV
Copy link
Contributor

0.54.1 still works fine in this regard, so I don't think it's an OS change.

@slipher
Copy link
Member Author

slipher commented Sep 30, 2024

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

@illwieckz
Copy link
Member

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).

@slipher
Copy link
Member Author

slipher commented Oct 2, 2024

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.

@VReaperV
Copy link
Contributor

I've found this: libsdl-org/SDL#5371, maybe that's the reason?

@slipher
Copy link
Member Author

slipher commented Oct 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants