BrogueCE icon indicating copy to clipboard operation
BrogueCE copied to clipboard

Game unexpectedly closes/aborts when locking screen

Open davidalayachew opened this issue 7 months ago • 10 comments

I have a Windows 11 machine. I had the game maximized and full screened. I played for a bit, locked my computer screen, then when I came back and unlocked the screen, I saw my browser, which was the window beneath the game. I pressed Alt+Tab to try go back to the game, but when I did, it actually showed that I had been on the game already, and that Alt+Tab actually made my browser come into focus, even though it had been visible the entire time. Then, when I pressed Alt+Tab again to bring the game into focus, the window just closed.

To get the game maximized, I used WindowsKey+Up, and then to get it Full-Screened, I used the + button. From there, I started up a new game, then went through the sequence of steps above. Nothing abnormal.

davidalayachew avatar May 11 '25 23:05 davidalayachew

And when I start the game back up again, I see that there is a saved game, bringing me right back to where I was before the game unexpectedly closed.

Please let me know if more info is needed.

davidalayachew avatar May 11 '25 23:05 davidalayachew

Do you get the same issue when you make it full-screen with the F11 keybind?

tmewett avatar Jun 10 '25 16:06 tmewett

Sorry to have responded so late. Juggling emergencies.

Do you get the same issue when you make it full-screen with the F11 keybind?

Yes.

Btw, this is incredibly easy for me to reproduce. It is literally as follows.

  1. Start up the game. Don't even have to start a save, the main menu is good enough.
  2. Press F11 to go fullscreen.
  3. Lock the computer by pressing WindowsKey + L.
  4. Unlock the computer.
  5. Alt+Tab to the still open session of the game (which, weirdly enough, is not showing).
  6. The game appears to close abruptly upon completing the Alt+Tab.

davidalayachew avatar Sep 09 '25 02:09 davidalayachew

Dies every single time if I follow the above steps on my Windows 11 laptop.

davidalayachew avatar Sep 09 '25 02:09 davidalayachew

I can't reproduce this on Windows 10.

Technical notes: The issue may be caused by some subtle misuse of SDL resources or not properly handling window changes. Otherwise it may be a bug in SDL.

tmewett avatar Nov 02 '25 13:11 tmewett

It wouldn't surprise me if this was a bug in SDL. The same issue has occurred for a few GUI libraries that I submit bugs for. Just wanted it documented to give other folks the chance to chime in and say me too.

Depending on how common the issue, it may make sense to escalate, or send out a stripped down build to see who else runs into the issue. For me, I think I can even get it to occur from the menu page.

davidalayachew avatar Nov 10 '25 18:11 davidalayachew

I've had two people reproduce this, so it is a wider issue. No idea why it doesn't happen to me.

What GPU do you have?

tmewett avatar Nov 10 '25 22:11 tmewett

Never mind; the two other repros have an Nvidia and an Intel integrated graphics, so it's not GPU vendor/driver related.

tmewett avatar Nov 10 '25 22:11 tmewett

Here are my GPU details.

Key Value
Name AMD Radeon(TM) Graphics
Adapter Type AMD Radeon Graphics Processor (0x1506), Advanced Micro Devices, Inc. compatible
Adapter Description AMD Radeon(TM) Graphics

davidalayachew avatar Nov 11 '25 03:11 davidalayachew

And this issue is still as easy to reproduce as it was originally.

If you want to send me a debug build, I am happy to run it on my machine. Maybe you can get some useful logs that way.

davidalayachew avatar Nov 11 '25 03:11 davidalayachew