scp-fs2open / scp-fs2open/fs2open.github.com

FSO Locking up when receiving user input during load states under Windows.

Open
#3,622 14 comments 0 reactions 0 assignees View on GitHub
bug library
Dominant language
C++
Stars
487
Forks
184
Avg merge
3d 9h
Merged PRs (30d)
44

Description

~~To be clear... I've not seen any cases of this happening when a loading bar is displayed on the screen.~~ -Just accomplished this (yay?). This usually occurs when FSO is busy enough that the windows mouse cursor reappears and shows the "busy" animation.

Examples include:

- between pressing "commit" and actually seeing the in-flight hud on screen
- during initial start of FSO before the intro movie plays
- after the intro movies plays but before the player select screen appears

_Any_ user input during such times can cause this while the fso windows has focus... including user input not intended for FSO specifically (such as pausing or unpausing music with keyboard "media" keys or using the volume roller on my keyboard to raise or lower the volume). Even a single mouse click can result in the issue. I've been having this issue at least since 21.0, possibly before.

Once the issue has been triggered Windows turnes the FSO window grey and displays the usual windows "this program is not responding... wait/close" message. Choosing to wait simply leaves FSO locked up. Ultimately, the only way forward becomes to close FSO.

To [quote](https://discord.com/channels/223511295431933953/223511391531827200/880093005518897154) Lafiel from Discord #SCP :

> So, what's happening here is an operation system issue.
If you attach it to a debugger, this doesn't happen.
If it's not attached to a debugger, windows sees that the app isn't taking in user commands, and it's then windows that decides that this app will be halted.
You can see that if you cause it to freeze up at first, with the slightly white-ish screen, it still continues to load as normal, but once windows decides "This isn't good", and shows you the "Close Program" Prompt, it'll halt FSO, and seemingly not properly unhalt when you click wait.
The proper solution would be to accept and then disregard inputs during load states, but I have no clue how to make that happen in SDL and the FSO input system

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.