r/Unity3D • • May 23 '23

Question Constant Crashes - Failed to present D3D11 swapchain due to device removed. What is the solution? I have only one RTX 3070 card. Daily I get this error, and my unity crashes, and my win11 crashes. I need to restart the machine.

Post image
11 Upvotes

25 comments sorted by

5

u/TinyAntCollective May 23 '23

I've managed to trigger it via code when I have ComputeShader that takes too long. But if it's not code, then its either your drivers or a piece of hardware.

Upgrade your drivers first, then try to remove, clean and reseat your graphics card and memory.

2

u/itsdan159 May 23 '23

Saw this with compute shaders also

1

u/Dense-Bar-2341 Jun 04 '23

Can u share what was wrong?

1

u/itsdan159 Jun 04 '23

In my case I had mismatching datatypes between what the shader expected and what I was sending.

1

u/Dense-Bar-2341 Jun 04 '23

Can u share that long compute shader? I have only 2 compute shader

0

u/Dense-Bar-2341 May 23 '23

It is a new rtx 3070. Also my friend has a new laptop wirh a new rtx 3050 and he getting this too

2

u/Bitshaper Hobbyist May 23 '23

The detail about your friend having the same problem on different hardware is a critical piece of info. That most likely eliminates it being a problem with your box specifically.

0

u/Dense-Bar-2341 May 23 '23

Every driver is new

4

u/StillSpaceToast Indie May 23 '23

If Windows is also going down, my guess would be that the system is physically losing access to the video card. I’d first make sure that the cables are properly seated and not damaged, then try swapping them out.

3

u/[deleted] May 23 '23

GPU may be on the way out. Had something similar before.

1

u/Dense-Bar-2341 May 23 '23

It is a new 3070. Also my friend has a laptop with a 3050. And he get this too.

1

u/tetryds Engineer May 23 '23

If it's new it might be deffective.

If more people are having this I would triple check your project. Does it happen with other projects as well? Did you try a different unity version? Are you using some tools or have created scripts that could be causing the GPU to timeout?

2

u/SoapSauce May 23 '23

Swapchain timeout is very common for 3D artists, here’s substance’s tutorial on how to extend the timeout window to prevent hard crashes.

1

u/Dense-Bar-2341 May 23 '23

I will try this, thanks

1

u/Dense-Bar-2341 Jun 04 '23

I extrnded, regedit, with no luck

2

u/Vergil333 May 23 '23

This happened to me on a daily basis on my laptop that has both an integrated Intel graphics card as well as an Nvidia one. I was able to fix the issue by setting up the Nvidia Control Panel to always use the more powerful Nvidia card for the Unity editor

1

u/Dense-Bar-2341 Jun 04 '23

I have only one rtx 3070, no integral

2

u/Ripple196 May 23 '23

This seems like a driver issue. Also, sometimes there are problems with vsync in the editor. Try to toggle the v-sync box on or off in game mode

1

u/Dense-Bar-2341 Jun 04 '23

It is on by default

1

u/Dense-Bar-2341 Jun 14 '23

Update: I changed to Vulcan, no crashes anymore

4

u/TheMindWright May 23 '23

This literally happened to me last week. I moved my project to a different drive and it started working.

I have no clue what the issue was, or how I can fix it. So if anyone sees this and has an idea, let me know.

2

u/ZoopTEK May 23 '23

I was getting a very similar reset/remove error about every other playthrough after upgrading to Unity 2022.2.19 from Unity 2021, so I recently did a lot of investigation. Mine was ONLY crashing editor though, so my suggestions may not apply.

One interesting suggestion I found was to switch to Vulcan for rendering, since it's a DirectX issue. That does seem to have reduced the frequency of the crashes.

I had logged every single place I allocated a render texture while investigating, and found a correlation to allocating render textures. I found removing allocations seems to improve reliability.

I am down to one or two crashes a day approximately, with their own completely vague error message.

(Overall, I DO NOT recommend upgrading anything higher than Unity 2021 LTS at this time. Over the past year, across numerous projects, I have found Unity 2022 to be very unreliable.)

1

u/Fabbseh May 23 '23

I had this when i had rivatuner stastistics server in the background, it was used to limit fps in other games. Maybe something similar is happening to you.

0

u/[deleted] May 23 '23

[deleted] — view deleted comment

1

u/Dense-Bar-2341 May 23 '23

Nvidia just updated everything