Constant Crashes - Failed to present D3D11 swapchain due to device removed.

My Unity 2020.1.8f1 crashes constantly, albeit randomly. Every few days. This is typically when I am doing a lighting burn on a level (various sizes and complexity) or using a procedural level generation tool (I use both CityScape and CityGen3D). It is getting annoying, and I am losing a lot of time rebooting to clear the RAM and redoing my lost work.

Error PopUp:
6415449--716793--upload_2020-10-13_19-36-29.png

Other than abandoning my paid for toolset, or not doing lighting burns, what course of action does unity offer?
mark

10 Likes

This can happen if something occupies the GPU for too long (I think the default is 2 seconds?). Windows will think something has crashed and try to reset the graphics card/drivers to keep the computer running. It is not uncommon for graphics tools like lightmappers to accidentally trigger this.

You can read more about it here: Testing and Debugging TDR During Driver Development - Windows drivers | Microsoft Learn . The relevant registry key is “TdrDelay”. Try increasing that to something like 10 and see if that helps.

5 Likes

Thanks @bobisgod234 .

Hi, have you found a solution to the problem? I just updated the drivers for the video card today and now I have the same error. :frowning:

UPD:
Downgraded video-driver NVIDIA GEFORCE to the old version (456.71 → 440). Personally, it helped me. Everywhere they write different things, someone was helped by reinstalling Unity, someone was disabling Windows Defender.

2 Likes

I had the same crash 5 times over the last hour, getting worth and worth over the days !!!
The TdrDelay trick didn’t worked

1 Like

Did this work for you? I’m, having the exact same problem and can’t fix it.

6881318--803870--Bug.PNG

I’d really want to know too, and @Delvarn if you find a solution, please write it here. Thanks!

Sorry, I wiped my hard drive and re-installed. I haven’t had the same issue since.

1 Like

I read somewhere that it might be related to having too many polygons in the scene and I just had the same crash again, with literally one cylinder and 6 humanoids on it…
TdrDelay didn’t worked, nor Nvidia settings, nor the 2020.1.13f1

Windows 10, Unity 2020.1.13f1, Unity Hub 2.4.2, good PC i7, 32Go Ram, 1080Ti… never had the issue before 2020.1 WTF Please fix this !!!

1 Like

Migrated project from Unity 2019.3.15 to Unity 2020.1.13 and this error appeared out of nowhere. Just why?

I have this Error as well and I can reproduce it:
I have a SceneEditor- and a Game-Window open directly next to each other. When I move the seperator-line between them (so I change the size of both), this Error occures every time after a few seconds. It’s nothing you need to do for several seconds at all, but I thought, I post it here for debugging reasons, since it’s really reproducable, I tested it for about 6 times.
My scene is not very complex… a Terrain and some objects, maybe 10-15 lights.

3 Likes

In my case it was antivirus, so try to turn it off and reinstall Unity 2020.

Problem solved! just update to the latest nvidia graphic driver.

1 Like

2020.1.4f1 same issue, Nvidia driver 457.30 on GTX 970. I’m suspecting the nvidia driver as I updated it recently and I’ve been using 2020.1.4f1 for months with no issues, have never had this error before updating driver.

It crash all my day…Using Unity Hub 2.4.2, 2020.1.15f1,2020.1.14f1. Nvidia driver 457.30(latest ) on GTX 950. Pls Fix It

1 Like

Someone managed to get some solution. I have a Samsung Odyssey notebook with Geforce 1050 gpu. NVIDIA 457.30 driver. I’ve done everything, downgraded the driver version, already changed the TdrDelay. But the problem remains. Using Unity 2020.1.8f.

Same here, random crashes and work lost, 2-3 times per day. Unity 2020.1.16f1, geforce 1660, nvidia drivers 457.71.

I was on older driver when the problem started, and updating didn’t help.

Yup, moving the separator line between game and scene window is guaranteed to cause the crash for me. Though I have gotten it sometimes in play mode and sometimes when just doing stuff the editor. Updated to the latest Nvidia Graphics Driver and still getting the error. Don’t have an antivirus.

Unity 2020.1.16, URP
Win 10, RTX 2070 Super, Ryzen 9 3950x

Update (things that seem to fix the issue for me):
Not having both the game view and scene view open at the same time when moving the separator.
Disabling HexPlanet GameObject (recently bought (https://assetstore.unity.com/packages/tools/modeling/hexplanet-pro-spherically-tiled-world-builder-65466)). It has 2.8K triangles total spread over 162 child GameObjects and accounts for 640 batches and 5 SetPass calls. Not sure if this should be enough to “Occupy the GPU for too long.”
Those meshes mentioned above have mesh assets generated through script. Changing the mesh assigned to all the mesh filters to any mesh asset located in the project stops the error from occurring.

Since this problem started, our builds have begun to “hang” randomly. Similar random frequency than the error in editor play mode. Anyone else?

I’m having the random swapchain crashes since Unity 2020 two to five times a day. Very frustrating.
It happens randomly when changing code and then starting the game.
But once it started, it doesn’t crash for the current playsession.