We’re experiencing a consistent crash in Windows Player builds when pressing Alt+Tab, but only starting from Unity 6.3+ and only when Discord is running.
Key points:
Reproduces in a completely empty project
Graphics API: Direct3D12
OS: Windows 10
GPU: RTX 3080 Ti
Crash happens immediately on Alt+Tab
No meaningful errors in Player.log
Does NOT reproduce in:
Unity 6.2
Unity 2022.3 LTS
Reproduces in:
6000.3.0f1
6000.3.1f1
6000.3.2f1
6000.5.0a3
If Discord is completely closed, the issue does not occur.
Also tested on another Windows 10 machine (laptop) with Discord running - could not reproduce there.
This appears to be a regression introduced in Unity 6.3, likely related to the Windows Player / D3D12 focus-loss or swapchain handling.
A bug report has been submitted to Unity: CASE IN-129682
Posting here to check if other developers can reproduce this issue on similar setups.
Reproduced in 6000.3.2f1 with application running in fullscreen exclusive mode. Not just Alt+Tabbing to Discord but even hovering through the Alt+Tab selection triggers the crash. Not reproducible with DX11 API.
Thanks for the report. Our QA responded to you last week, they are having trouble reproducing the issue. Can you send them crash dumps so we could further investigate the issue?
@benjr34 could you also submit a bug report on this? Seems like a tricky issue to fix so the more data we have, the more likely we’re able to action on it.
Just to clarify: I mentioned this earlier via email, but the crash dump won’t contain any useful data besides basic PC specs. This seems to be a very low-level crash that doesn’t get captured properly in the dump
Hmm, did you respond to the same email you got a response from for IN-129682? I wonder if there’s some glitch in the system since the last thing I see on the ticket is QA sending an email to you on Thursday and there’s been no response from you since then. If you replied after that, please let me know as we need to figure out why your email didn’t come through.
That said, dump files (.dmp extension) contain the state of the program at the time of the crash - a copy of the stack and all registers for every thread in the process. It should absolutely contain useful information for investigating low-level crashes - for all intents and purposes, it’s a snapshot of a debugger session at the time of the crash. You should be able to open one in Visual Studio, press “Start Debugging” and see what kind of things it gives you.
Great, thanks! The dumps show a classic D3D12 device removal crash, and I don’t see any Discord DLLs having been injected into the process so the crash might not be related to Discord after all. Are you able to do one more diagnostics step for me? Enabling D3D12 debug layer would print more detailed information about the crash. To enable it, you need to install “Graphics Tools” optional Windows feature:
Type “Optional features” in start menu > View features > “Graphics Tools”
Then, run the build with “-force-d3d12-debug” command line argument and reproduce the crash. That should result in the player.log file having more detailed information.
In my case, the issue does seem to be related to Discord. I consistently avoid running or testing the game with Discord open, as I often need to Alt+Tab, and having Discord running has caused this crash for me multiple times in the past.
I sent you TestAltTabUnity_6_3.exe.28808.dmp by email.
It was closed specifically during the tests. Likewise any other app that might inject I could think of (Steam, RTSS etc.) were also not running. Had any luck to reproduce?
Unfortunately I coudn’t manage to run it succesfully resulting in these errors in the player.log:
d3d12: could not get the debug interface (0x887a002d).
Couldn't activate D3D12 debug layer! Make sure to add "Graphics Tools" in Windows Settings ("System" -> "Optional features")
d3d12: failed to query info queue interface (0x80004002).
This might be related.
I’ve tried reinstalling Graphic Tools, GPU driver with DDU, restarted PC several times - still no luck.
I may be wrong here, but wasn’t Discord windows application a Chromium web app under the hood? Did you try testing with any browser? Also are you using the fullscreen exclusive or some other window mode?
In your editor installation folder, there’s a folder named “D3D12”, next to Unity.exe. In there, you can find d3d12SDKLayers.dll. Copy that file inside the “D3D12” folder that’s next to the build executable. That should make the debug layer work.
Normally, this DLL only gets copied when building development builds. We need to update the error message because it’s no longer valid :/.
Seemed to work - the new logs are fuller. However, the “Unrecoverable D3D12 device error” line still asked for -force-d3d12-debug arg. Don’t know if one of those messaging errors or not. Anyway, I’ve sent the new files via email. This time only the Windows file explorer was open besides running build. Alt+tab from splash screen playing will always trigger crash. After loading it takes several “jumps” most of the time.