Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Bug Failed to present D3D11 swapchain...

Discussion in '2023.1 Beta' started by PaulMDev, Oct 10, 2022.

  1. PaulMDev

    PaulMDev

    Joined:
    Feb 19, 2019
    Posts:
    51
    I had this error message after using the spline tool in 2023.1.
    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.
     
  2. PaulMDev

    PaulMDev

    Joined:
    Feb 19, 2019
    Posts:
    51
    My bad !
    I reinstalled my drivers and it's working great now !
     
  3. PaulMDev

    PaulMDev

    Joined:
    Feb 19, 2019
    Posts:
    51
    Wait no...
    It happened again after exiting play mode...
     
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    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.
     
    PhoenixAdvanced likes this.
  5. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    310
    Seconded.

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

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,045
    As the message says, we need bug reports with more information and ideally reproduction steps to investigate incidents behind this error.
     
    nasos_333 likes this.
  7. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    LUMINA HDRP videos, software recorded inside Unity editor in 1050GTX Laptop GPU, for reference.






    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...t-d3d11-swapchain-due-to-device-reset-removed
    https://www.reddit.com/r/Unity3D/comments/hjhv6k/hdrp_makes_editor_freeze/
    https://forum.unity.com/threads/random-unity-crashes-after-upgrade-to-rtx-3070.1004528/
    https://forum.unity.com/threads/fai...wapchain-due-to-device-reset-removed.1129568/
    https://unity928.rssing.com/chan-30531769/article975366.html
    https://gamedev.stackexchange.com/q...t-d3d11-swapchain-due-to-device-reset-removed
     
    Last edited: Jan 2, 2023
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,661
    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.
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    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.
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,661
    I'm not saying it's a generic issue in your case - this is why I asked you to submit a bug report :)
    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.
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    I see, thanks :)

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

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,661
    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! :)
     
    nasos_333 likes this.
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    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.
     
    TreyK-47, LeonhardP and aleksandrk like this.
  14. CannedCaveman

    CannedCaveman

    Joined:
    Feb 28, 2020
    Posts:
    2
    I have the same error since for multiple months now (Unity 2021.3.x) on my laptop with an GTX 1660 Ti.
     
    nasos_333 likes this.
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    Is it only happening in DX11 ? Have you tried DX12 or Vulkan ?
     
  16. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    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://forum.unity.com/threads/con...-to-device-removed.987834/page-4#post-8714637

    Thanks
     
  17. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,661
    Hi! Looks like it hasn't been processed yet. I'll poke QA.
     
    nasos_333 likes this.
  18. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    Hi, thanks that would be great.
     
  19. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    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"
     
    aleksandrk likes this.
  20. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    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.

    https://forum.unity.com/threads/con...-to-device-removed.987834/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.

    https://issuetracker.unity3d.com/is...ding-the-project-using-directx11-graphics-api
     
  21. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847





    An update, it seems after i updated my 1050GTX drivers get stuck in some of the most demanding scenes in LUMINA URP and HDRP in DX11. I never had any issues with previous drives in either versions in any scene.

    With DX12 both assets work fine as well.

    I post my new drivers details from DX Diag and Nvidia panels, in case can help.

    It is also apparent that Nvidia states Run time DX12 and DX Diag also reports DX12 use, thus i assume they have completely abandoned DX11 and thus the issues of random crashes.

    My laptop is a DELL XPS 15 9560, 1050GTX GPU.
     
  22. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,661
    I suggest to add this information to the case you submitted.
     
    nasos_333 likes this.
  23. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    11,847
    Hi, yes have already added it, hopefully can help further
     
    aleksandrk likes this.
  24. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    48
    Having the same issue developing for Meta Quest 2 connected through air link.
    Screen turned black twice in the timespan of 20 minutes. Happens when pressing play in the scene occasionally. My screen turns black as my graphics driver crashes, and when it comes back these error messages appear.

    Edit: Using 2020.3.33f1, which is... not listed in the issue tracker

    UNITY_CRASH.png system_info.png system_info_display.png
     

    Attached Files: