Failed to present D3D11 swapchain...

I had this error message after using the spline tool in 2023.1.
8502857--1132316--upload_2022-10-10_17-12-51.png

After that the editor crash and when I open it again all of the windows are black.

1 Like

My bad !
I reinstalled my drivers and it’s working great now !

Wait no…
It happened again after exiting play mode…

1 Like

This is a huge Unity bug and should be fixed asap as ultimate priority

It really destroys any reliability of the system.

I get this often from users with Nvidia and 2060 or later GPUs when DX11 is used in LUMINA HDRP, that is my most demanding asset. DX12 and Vulkan or 1050GTX older GPUs dont give this issue.

Try Vulkan or DX12 as option and see if fixes it.

1 Like

Seconded.

I never had this issue with a 980ti, but my 3090 has these crashes every so often.

2 Likes

As the message says, we need bug reports with more information and ideally reproduction steps to investigate incidents behind this error.

1 Like

LUMINA HDRP videos, software recorded inside Unity editor in 1050GTX Laptop GPU, for reference.

https://www.youtube.com/watch?v=hlF3sVLkLv8

https://www.youtube.com/watch?v=HG10PSYZBv8

https://www.youtube.com/watch?v=6iX8hXmdhek

https://www.youtube.com/watch?v=DGyk1rEX5Pw

https://www.youtube.com/watch?v=VlZPqqHBUvo

Hi,

In my case is not possible to send a report since I cant recreate the problem, should have a more flexible way to recreate the issues.

E.g. is easy to just download my LUMINA HDRP asset and try it in any 2060 or 30xx Nvidia to get the problem in Unity 2021.3 LTS in DX11, i had many reports on this so should be easy to reproduce. It does not happen in 1050GTX, or in DX12 - Vulkan (at least in my tests and from clients reports so far) or in Unity 2019.

Only latest Unity 2021.3 LTS versions have this issue and only with 20xx Nvidia and above in DX11.

I dont own a 20xx or 30xx to replicate this and in my 1050GTX i never get this issue, so is impossible to report. But have had so many reports that i had to up my LUMINA HDRP spec to minimum DX12 or Vulkan, since would be risky to develop with DX11 if this bug happens.

There is a very big number of reports on this Swapchain issue as well around the net. This is right now the most critical Unity issue by far from the time Unity was made, it renders the engine completely unreliable to develop anything in, as it may run in certain GPUs on the developer side and at random fail for all users of the game in other machines.

This is a cataclysmic kind of event problem and should be the no1 to resolve in my mind. I have never seen such a severe issue in Unity that makes one think this engine is not usable at all as is a great risk to use it.

In LUMINA HDRP case, the game runs in 1080p at 30fps on my 1050GTX, so some suggestions that the issue is related to GPU stalling for seconds and produces this error cant possibly stand, as it runs in 30fps, so each GPU round should last less than 1/30 of the second and certainly not seconds. Plus the issue happens in 20xx Nvidia that is far above 1050GTX on my laptop, so that 30fps would be around 60fps.

https://github.com/Unity-Technologies/BoatAttack/issues/172
https://www.reddit.com/r/unity/comments/xhipnn/unity_keeps_on_crashing_failed_to_present_d3d11/
https://canopy.procedural-worlds.com/forums/topic/114-d3d11-swapchain-error-fix/
https://stackoverflow.com/questions/64880939/unity-failed-to-present-d3d11-swapchain-due-to-device-reset-removed
https://www.reddit.com/r/Unity3D/comments/hjhv6k/hdrp_makes_editor_freeze/
https://discussions.unity.com/t/816628
https://discussions.unity.com/t/845644
https://unity928.rssing.com/chan-30531769/article975366.html
https://gamedev.stackexchange.com/questions/202919/failed-to-present-d3d11-swapchain-due-to-device-reset-removed

1 Like

You should still report it and say that it only happens on these GPUs and doesn’t happen on 10xx.

In general this message appears when the OS decides that the GPU driver hangs. This can happen due to a lot of reasons, for example, when there’s so many compute shader invocations that the GPU can’t complete them in reasonable time. Thus, many instances of it are user errors. There’s not much that can be done on our side about this in general, as there’s no safe way to estimate, how long a given frame will take to render and whether it will be below or above the OS threshold.

Hi, thanks for the input.

The thing is that this error appeared in Unity 2020 onwards, so for sure there is something related to how graphics are handled by Unity after 2019 versions.

Also in general the error makes no sense whatsoever, as if something works at 30fps in 1050GTX, should not have any stalls in 20xx series and the OS should not identify it as such unless there is some bug.

So my guess is that something in Unity handling of graphics makes the OS think that the GPU is stalling when actually this does not happen, in DX11.

I’m not saying it’s a generic issue in your case - this is why I asked you to submit a bug report :slight_smile:
I’m just saying that in many cases the error is the same, but the underlying issue varies a lot, hence there are a lot of messages that can be found when searching for the error itself.

I see, thanks :slight_smile:

How will i go about submit the report, will i need to include my asset whole or could download it from your side directly ?

It would be great if you could prepare a project with your asset already included and list simple steps to reproduce the issue. Thank you! :slight_smile:

1 Like

Hi,

I have now submitted the project with the potential bug

New Incident created: IN-27763 - Crash of editor and build when using DX11 in Unity 2021.3.f1 and above in Nvidia 2060GTX or above, with Swapchain bug.

Hopefully can give some more insight on the issue. Note that i cant recreate the issue on my side, so the project must be run in Nvidia 2060 or above in DX11 mode to be replicated, since this is the GPUs that had reports that fail from users.

On my 1050GTX GPU i never had a single crash while working more than a year now on the system. That is why it looks like a bug and is also is impossible to handle on my side alone.

4 Likes

I have the same error since for multiple months now (Unity 2021.3.x) on my laptop with an GTX 1660 Ti.

1 Like

Is it only happening in DX11 ? Have you tried DX12 or Vulkan ?

Hi,

Is there any update on the swapchain issue ?

I had also sent a ticket below on this

New Incident created: IN-27763 - Crash of editor and build when using DX11 in Unity 2021.3.f1 and above in Nvidia 2060GTX or above, with Swapchain bug.”

Other threads on the issue
https://discussions.unity.com/t/812657 page-4#post-8714637

Thanks

1 Like

Hi! Looks like it hasn’t been processed yet. I’ll poke QA.

2 Likes

Hi, thanks that would be great.

Some good news, it seems the bug has now been looked at and confirmed by the relevant team and hopefully can address soon.

Thanks for the help on this, is very appreciated

“IN-27763 - Build stops responding when building the project using DirectX11 graphics API UPDATE: Internal ID created
CASE IN-27763
Thank you again for your bug report.
Your bug report Build stops responding when building the project using DirectX11 graphics API has been confirmed and transferred to the appropriate internal development team at Unity. Your bug report has the following internal ID: UUM-25111”

1 Like

UPDATE on the swapchain issue in LUMINA HDRP in DX11:

The Unity team has managed to recreate the bug and are now looking into it. The system did not create an issue in DX12 or Vulkan on Unity side as well.

Constant Crashes - Failed to present D3D11 swapchain due to device removed. page-5#post-8753740

This below is the issue tracking link, please remember to vote for the issue to help with it be resolved faster. Thanks in advance for any help on this.

1 Like