UnityCapture icon indicating copy to clipboard operation
UnityCapture copied to clipboard

If application loses focus - 5 seconds later it crashes.

Open guiglass opened this issue 4 years ago • 3 comments

I am using Unity 2019.3.2f1 and Windows 10. when I build and run a windowed game and I then click outside of the window and un-focus the game, after 5 seconds it freezes and crashes.

but the stream in OBS continues to play fine and my game still working. It's just that the window is frozen and Windows asks me to end task. And has become completely unrecoverable.

Exact same issue as this fork

Is there anything I can try? It does not happen in the editor, only windowed final builds. And I believe it only affects Unity 2019 and up.

--

It does not freeze if the window is minimized It does not freeze if the window is in focus It does not freeze if the window repeatedly focused and unfocused

maximizing window and it still freezes.

I have not tried full screen - but I fullscreen is not compatible with my game and I must use windowed.

Can you please help me find where the issue is?

--

I did not see a crash report I think because Unity never actually crashed and the game was still playing every while the window was locked up. So I have nothing much to post from the error logs. However there was one line at the very end of Player.log:

##utp:{"type":"MemoryLeaks","version":2,"phase":"Immediate","time":1584182609881,"processId":35128,"allocatedMemory":155286,"memoryLabels":[{"Permanent":40},{"NewDelete":432},{"Thread":64},{"Manager":2928},{"VertexData":1632},{"GfxDevice":8384},{"Animation":99552},{"Physics":32},{"Serialization":40},{"File":5864},{"String":739},{"DynamicArray":9616},{"PoolAlloc":56},{"Sprites":8280},{"GI":344},{"WebRequest":2978},{"VR":4176},{"Secure":10785},{"Subsystems":-656}]}

--

Also something very interesting I found was that when i enabled "Use DXGI Flip Model Swapchain for D3D11" checkbox in player settings I then noticed the game window would become unresponsive however I still could see my game playing in the game window like normal (it was all grayed out and a rotating throbber instead of mouse pointer) but the game was still playing.

When I set that checkbox disabled then whenever the window freezes I see the game display is stuck and not changing.

Not that this has much to do with why it's crashing, but it was the only thing I found that had any effect.

guiglass avatar Mar 14 '20 10:03 guiglass