This is an odd issue that I think might be a driver bug, but I thought I’d reach out here first.
We have some developers that when testing the packaged build of the game can easily cause the game window to “freeze” when alt-tabbing.
After looking around online I didn’t find anything specific to UE, but I did find that people would encounter this issue with other games such as War Thunder or World of Warcraft; though it seems they weren’t able to “unfreeze” it.
The common factors seem to be using DX12 in Fullscreen Windowed mode while also using some sort of Frame Sync technology such as G Sync or Enhanced Sync.
I had our devs with the issue disable G Sync and they haven’t encountered the issue since.
I’ve attached to the post pictures of a trace for one of the hangs.
I’m not well versed with graphics programming, but from what I understand the Render Thread is waiting on the GPU to update the Fence value for the Present Draw Call.
Except it doesn’t get a response until some sort of input is performed on the game window (or via adjusting volume for some reason).
My assumption is that the GPU for some reason isn’t aware that the Game window is still visible and should be rendered, so with the sync tech turned on it never returns/renders the frame.
Has anyone at Epic ran into such an issue before? Thankfully the game doesn’t crash, but since the Game Thread isn’t running it ends up disconnecting the player from the server.
I can’t guarantee the reproduction steps will cause the issue or not, we only have 2 developers that have encountered this issue and can reproduce it consistently.
Alt-tab out of the game (window might freeze here)
Alt-tab back in, or move the cursor over and click on the game window. (window can also freeze here)
The game window will freeze.
Clicking, or providing any other form of input will unfreeze the game (e.g. physical headset volume).
I was unable to find any similar issues internally, and the alt+tab issues I did find from the past typically didn’t end up with a permanent freeze. Sometimes the game would appear to freeze up for 300ms and sometimes several seconds if the GPU was low on VRAM and had to page data in/out when returning to the client. Are you seeing any warnings in the logs when the user alt-tabs?
OK, thanks for the additional info. If it’s alright with you, I’ll leave this ticket in pending status in case something comes up that can help us narrow down the cause, or determine a workaround.
For what it’s worth, we are also experiencing this issue so it is not an isolated issue, we are using Unreal 5.5.4. Only one developer can repro it so far and everything else listed above looks the same as us. We’re trying to get more information on it and we will share it here when we can.
One thing that we enabled very recently was hang detection which is what brought this issue to light since the game hangs for over 30 seconds in the exact same spot as you describe. Similar to as you’ve noticed, when the fatal hang detection window pops up it seems to unfreeze the game (providing input) which is then very confusing for the user as the game is now no longer hung but they get the crash report window.
The values we used to enable hang detection are shown below. We’re going to try disabling this to see if that user can still repro the issue as we wondered if perhaps the stuck detection was somehow causing this all though the Insights capture does not seem to support this theory.