Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Editor & General Support' started by Mad_Mark, Oct 14, 2020.

  1. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
    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"
     
    Lughinu and Valorware like this.
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
  5. Lughinu

    Lughinu

    Joined:
    Nov 3, 2016
    Posts:
    11
    I just worked 8 hours without a problem, my "solution" was to manually set integrated card instead of nvidia.
    Fortunately I have a 2D game.

    upload_2023-1-26_16-13-38.png
     
  6. Valorware

    Valorware

    Joined:
    Aug 25, 2016
    Posts:
    91
    Just a temporary solution though, you shouldn't/can't release a game like that because it will still likely crash on random PCs
     
  7. Valorware

    Valorware

    Joined:
    Aug 25, 2016
    Posts:
    91
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
    Hi,

    Not sure on this, what GPU is this running on ?

    Also you got the swapchain bug or a general crash ?
     
  9. Valorware

    Valorware

    Joined:
    Aug 25, 2016
    Posts:
    91
    Its AMD something. I did get the error on my NVidia PC, but then when built, the crash also happened on the AMD Steam Deck.

    My particular variation of the problem was related to post-processing though.

    So I don't think it matters if its NVidia or AMD. Well, who knows whats going on really, its difficult to say

    *edit* it was Swapchain bug. same error as the topic title
     
    nasos_333 likes this.
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
    Indeed, Unity has also confirmed that can be a number of reasons, so will see, hopefully they can discover the problem and solve all.
     
  11. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215





    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.

    More info on the issue:
    https://forum.unity.com/threads/failed-to-present-d3d11-swapchain.1346855/#post-8753737
     
    Last edited: Jan 30, 2023
  12. grizzly101

    grizzly101

    Joined:
    Jan 4, 2017
    Posts:
    1
    Disabling the integrated graphics card worked for me too, thanks!
     
  13. Valorware

    Valorware

    Joined:
    Aug 25, 2016
    Posts:
    91
    Short-term fix, if you release your game its likely that it'll crash on many players PCs. You cant ask them all to disable integrated graphics and they may not have that option!
     
  14. Lughinu

    Lughinu

    Joined:
    Nov 3, 2016
    Posts:
    11
    apparently updating my nvidia driver, fixed this issue
     
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
    Nice, at least works in some configs.

    The issue with this is that is rather random, for me updating my 1050GTX driver made the issue appear and had to revert to DX12 mode to work with LUMINA.
     
  16. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    62
    Valorware and nasos_333 like this.
  17. battletrance1st

    battletrance1st

    Joined:
    Jan 27, 2022
    Posts:
    1
    nasos_333 likes this.
  18. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
    The issue with this is that the end user will still get a crash and cant be forced to use such modification.

    Also the other issue is that in my case the game runs in real time, there is certainly nowhere a 2 secs gpu delay, so the whole thing is off and is a bug that need to be resolved so crashes are globally avoided.

    Is also more clear that is a bug as happens only after a certain driver update version.

    The windows setting of responding at a 2 secs stalled GPU seems reasonable in general, is useful to know how to extend for editor purposes perhaps, but for run time should never expect a 2 secs GPU stall in general, so real time things should definitly not cause this issue.
     
    Valorware likes this.
  19. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    62
    This is the task manager performance tab during 2 swapchain crashes.
    Both of the crashes are indicated by 2 sudden spikes in the 3D utilisation graph.
     

    Attached Files:

  20. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215
    GamesbyJP likes this.
  21. NathoSteveo

    NathoSteveo

    Joined:
    Dec 7, 2019
    Posts:
    7
    Happening to me a lot recently, I'm using 2022.2.8f1 very annoying.
     
  22. NathoSteveo

    NathoSteveo

    Joined:
    Dec 7, 2019
    Posts:
    7
    I managed to fix the problem (for me) by going to Registry Editor: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GraphicsDrivers
    and changed 'TdrLevel' (which wasn't there, so I created the key) to 0, haven't had a crash since.
     
    ROBYER1 and nasos_333 like this.
  23. Alec-Slayden

    Alec-Slayden

    Joined:
    Dec 16, 2008
    Posts:
    101
    I'm getting this issue occasionally also. No heavy load, just some UI work in a scene. I was writing code in VS and the computer froze for between 15 and 30 seconds, then the error popped up. GPU is a 3090 and doesn't spike more than 6%.
     
    nasos_333 likes this.
  24. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,215

    Hi all, i have managed to fix the issue replacing a while loop in my shader with a for loop with specific iterations.

    The video shows LUMINA running in DX11 mode.
     
  25. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,449
  26. KangManJyn

    KangManJyn

    Joined:
    Sep 29, 2022
    Posts:
    7
    It is a Windows 10 platform app.
    If you don't use "Hardware Decoding", it seems to be solved.
    It seems to be a GPU compatibility issue, "Hardware Decoding" is disabled, so it works well.
     
  27. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,449
    In my specific case, I was using virtual desktop on an Intel XE Integrated GPU laptop to use the Oculus Quest Pro on unsupported hardware (the Oculus App told me the GPU was unsupported). But while using Virtual Desktop with SteamVR, Unity would have a TDR timeout crash on play with OpenXR. The next thing I need to figure out is that the VR tracking works in Unity and I can even mix Vive trackers + a base station with OVR Space Calibrator in a mixed playspace using this setup, but the actual VR view does not render in the headset which I have read around is a common Virtual Desktop + Unity issue that has workarounds using command line to launch the unity project with Virtual Desktop attached.
     
  28. unity_fTJWaumQjo0cXA

    unity_fTJWaumQjo0cXA

    Joined:
    Aug 10, 2018
    Posts:
    1
    The issue appeared for me when I updated the Nvidia drivers to latest ones. I've never seen this one before, but right after driver update I couldn't even open a fresh new project because of it. The fix of adding parameters to work with d3d12 is what fixed it for me. So it seems that there's a strong connection with latest drivers here
     
    nasos_333 likes this.
  29. LaurynasLubys

    LaurynasLubys

    Joined:
    Mar 7, 2012
    Posts:
    80
    This happens in Unreal engine too. In Unity it happens a few times a day, and 50 times in Unreal.
    So this is not engine issue. It also happens on different PCs.
     
  30. SunnyValleyStudio

    SunnyValleyStudio

    Joined:
    Mar 24, 2017
    Posts:
    67
    Hey all!
    For me in Windows 11 and RTX 2080 it seems to be the issue with the Hardware-accelerated GPU scheduling (although I'm not 100% sure but the PC seems to run much better.

    The only other thing I did was update MB bios but I had still some strange lags / stuttering and theD3D11 error that seems to be gone after disabling the HAGS)

    To disable it you can go to Settings -> Display -> Graphics (at the bottom) -> "Change default graphics settings" (at the top) -> Set the HAGS to off.

    I hope it helps someone! :)



    UPDATE:
    I also had to disable Multiplane Overlay windows functionality by editing the registry at
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Dwm

    You have to create a new Dword 32 "OverlayTestMode" and set its value to "5"

    See the screenshots for more help.
    (source https://www.reddit.com/r/Amd/comments/yvyqc7/disabling_multiplane_overlay_mpo_fixed_all/)
     

    Attached Files:

    Last edited: Apr 25, 2023
    lsle98 likes this.
  31. Super_RafyYT

    Super_RafyYT

    Joined:
    Oct 5, 2021
    Posts:
    11
    it also happened to me today, never had problems with other programs or games, but i used unity 2023.1.0b4, since the version contains the word "b" which stands for beta i guess its normal that it crashes, since its unstable in itself
     
  32. ReneSchleese

    ReneSchleese

    Joined:
    Jul 11, 2017
    Posts:
    9
    I applied most fixes proposed in this thread, and while some of them made Unity not show the error message in question anymore, it didn't fix the actual symptoms which for me were:
    • Unity Editor crash
    • Choppy playmode in subsequent Unity Editor executions (indicating that the graphics driver crashed as well)
    • Bluescreen after a few minutes of using the machine in that state
    My specs:
    • Dell Laptop
    • Windows 10
    • Nvidia Quadro P2000 graphics card
    What seemed to fix the issue for me was to configure the Nvidia Control Panel program to always use the High performance graphics card for the Unity Editor.
    1. Open Nvidia Control Panel
    2. Under 3D Settings, select Manage 3D Settings
    3. On the right, switch to Program Settings
    4. Click on Add, select Unity Editor, click Add selected Program, and set High-performance NVIDIA processor
     

    Attached Files:

  33. d_sharov

    d_sharov

    Joined:
    Dec 24, 2021
    Posts:
    23
    I have tested many ways to solve. But it only helped to roll back all win 11 updates with driver updates.
     
  34. AleX_Fr

    AleX_Fr

    Joined:
    Apr 30, 2023
    Posts:
    1
    Hi all, I solved this problem very simply. In the Riva-tuner app that comes with the msi afterburner, you need to limit the FPS for unity to a reasonable value. I set it to 300 FPS and never encountered this problem again.
     
  35. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    134
    My rtx 3070 do this on win11, dx11. Unity 2022.2.20 any help? Yesterday the win11, just died because of this, and the boot just not worked first time...
     
    leobilck likes this.
  36. Tkrain42

    Tkrain42

    Joined:
    Jul 25, 2015
    Posts:
    43
    Necroing this thread, I suppose... brand new laptop (not a great one, Intel UHD 605), only Unity 2022.3.0f1 installed, and the working project quite literally has just a UIElements runtime, nothing else in the scene... Once it hits, restarting Unity heads straight to the error and only rebooting the laptop works.
    Not getting the issue with the same project in the same version on my desktop with NVidea GEForce 1650
     
  37. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    134
    DX11 lot of DX11 spawchain error randomly, yesterday I get 6-7 of that immediatelly, and I can't restart unity anymore.(2022 LTS)
    Just when restart my PC

    DX11 is broken
    DX12 is broken (70 less FPS than DX11)
    I try with Vulkan
     
  38. styrbo

    styrbo

    Joined:
    Sep 25, 2018
    Posts:
    4
    Thats issue happened to my new laptop
    Model: Acer ROG Strix G733PZ_G733PZ
    Tested in versions: 2021.3.6f1 and 2022.2.9f1
    When its happened: When i expand editor windows too quickly, unity got crash
    add -force-d3d12 to run arguments work to me, and for some unknown reasons i cant reproduce crash after run one of the projects once in dx12
     
    lacas8282 likes this.
  39. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    134
    But dx12 is slow, low fps
     
  40. doublehitgames

    doublehitgames

    Joined:
    Mar 5, 2016
    Posts:
    96
    Same problem Here. RTX 4070, and processor I9.12K.
    Unity 2022.3 LTS release. But is is occouring at all versions for me. 2020, 2021 and now 2022, but with a very more
    constancy

    Currently im restarting around 5 times my machine during the work day, because when the problem occour, nothing more working to open the projeto. Only reinitializing the Computer.

    You (Unity Company), have a big problem here at Unity, right?
    The Production working with an editor that is not open is greatly hindered. I've been seeing this problem for years and no solution for it!

    Disappointment is the least of my feelings.

    As I see the competitor taking off into the future, I see UNITY going in the opposite direction with this editor.

    Lots of good work done in the dashboard with liveOps and devops, but bad work done here in the Editor, which is where everything is supposed to work.

    My honest opinion is. Stop what you're doing and worry about your main vehicle, which is the Editor. Because without it, your BackEND is useless. Amazon and PlayFab already make everything there is better! So please focus on what matters. Create a stable editor for us. For love of GOD. FOOOCUS. FOOOCUS..

    Sorry for the rant!
     
    novaVision and leobilck like this.
  41. styrbo

    styrbo

    Joined:
    Sep 25, 2018
    Posts:
    4
    not sure about it, but how i said - i don't get this error anymore, so i removed comand promt and stay in dx11
     
  42. lubosaliso

    lubosaliso

    Joined:
    Apr 30, 2023
    Posts:
    8
    ¿Qué? Tengo este problema desde 2018
     
  43. Cuttlas-U

    Cuttlas-U

    Joined:
    Apr 11, 2017
    Posts:
    38
    Hi , This happened to me when I upgraded windows driver yesterday ,
    It always happens when I'm working with post processing in a urp project
    interestingly i also have a very heavier hdrp project that has no issue

    RTX 3090TI
     
  44. chandler55

    chandler55

    Joined:
    Jun 8, 2010
    Posts:
    17
    this error is driving me nuts. not sure what to do as it happens quite often
     
  45. REBIAPPS

    REBIAPPS

    Joined:
    Feb 8, 2022
    Posts:
    1
    Hi here is the solution. This error comes due high load of graphics in the project. step1: open your project in unity step2:click "Edit" and then click "Project Settings" step3:click"Quality" step4:Then change levels to "low" then save it step5:Exit from unity step6:Restart your pc

    watch vedio till end thanx

     
  46. Dawid_Matuszewski

    Dawid_Matuszewski

    Joined:
    Mar 2, 2016
    Posts:
    20
    So we have any official solution for this error?
    I tried everything with regedit, updating drivers etc.

    We don't use any third party programs. Only Unity and Windows.
     
    WornTraveler and phumpuang_t like this.
  47. WornTraveler

    WornTraveler

    Joined:
    Jul 3, 2022
    Posts:
    2
    Honestly kind of amazing this is still a thing. I assumed it was just an editor error, but some people in this thread seem pretty certain it would ship to end user. That's... Well. Alarming to say the least. I'd assumed it was also a hardware issue on my end, but some of the systems impacted seem pretty capable.

    Any word if anyone can confirm this bug still happens outside editor play?
     
  48. browne11

    browne11

    Joined:
    Apr 30, 2015
    Posts:
    133
    This randomly popped up today. Twice in an hour. Updating card drivers and so far so good.
     
  49. huangkisu

    huangkisu

    Joined:
    Sep 3, 2021
    Posts:
    3
    Updating NV card driver to the latest one and solving it? for me this whole day have not crash again
     
  50. axelstewart

    axelstewart

    Joined:
    May 17, 2018
    Posts:
    13
    I've been having this issue also. I've tried a lot of different things to mitigate load on the graphics card but consistently now it's [open animation asset => tab out => d3d11 swapchain], and it's happening often as well if I don't tab out - just not as constant.
    It looks like in my case it's an issue with InspectorWindow.Paint displaying a 3D model, but again, it's also happened in very different circumstances. URP, 2022.3.5f1, Windows 10, latest drivers. I've tried a few fixes but right now I'm just trying to live with it and do my job.