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. 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. j_ho_74

    j_ho_74

    Joined:
    Aug 13, 2014
    Posts:
    24
    Windows 10 Enterprise or Home
    Laptop Alienware m17 R2, Intel Core i7-9750H, X 16 GB (2 x 8 GB) DDR4 2.666 MHz
    NVIDIA GeForce RTX 2080 8 GB GDDR6 withMax-Q Design
    Latest Nvidia driver

    Best regards
    Joerg
     
  2. Kitsune_bcn

    Kitsune_bcn

    Joined:
    Jul 1, 2021
    Posts:
    16
    It started to happen to me too. I'm pretty sure it's either the nVidia driver version, or the geforce experience (I don't know what of this 2 because I updated both at the same time). Try rolling back to a older driver or uninstalling geforce experience.
     
  3. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    I have this happening across four different driver versions and geforce experience has never been installed (since it's just spyware).
     
  4. Cyanilux

    Cyanilux

    Joined:
    Nov 23, 2015
    Posts:
    1
    I had this issue today. I also submitted a bug report earlier but in short, it was occurring when launching any project (existing or new) in 2020 & 2021 after updating NVIDIA drivers to the newest version, (as well as various other versions on the NVIDIA site I installed after that to attempt to fix it). Using Windows 8.1, NVIDIA GeForce GTX 860M, also have an Intel(R) HD Graphics 4600. I tried disabling the Intel one in the Device Manager and while it stopped the error, the scene/game in the Unity editor was still super slow (But fine when playing games or launching a build from one of my projects).

    In case it helps anyone else, I uninstalled the NVIDIA driver through the Control Panel / Programs And Features and restarted the PC. It seemingly reinstalled some older versions (possibly previous ones I had installed? Or perhaps windows chose specific stable ones, idk). It didn't work the first time but I did the same thing again and it installed an even older one (385.46). Perhaps not ideal to use older drivers, but it has fixed the error and lets me continue using Unity at least. Maybe this method will work for others too.
     
  5. Phantom_X

    Phantom_X

    Joined:
    Jul 11, 2013
    Posts:
    305
    Was happening once in a while before, but since I updated to latest nvidia drivers it happens constantly after 30 mins or so of usage.

    Then I used DDU to completely remove old drivers before installing new ones and so far I didn't get another crash.

    Unity 2020.3.1 On URP 10.3.2

    Windows 10 Pro
    Ryzen 5600x
    GeForce RTX 3070
     
    Last edited: Jul 3, 2021
  6. GinBall

    GinBall

    Joined:
    Feb 4, 2017
    Posts:
    1
    That worked for me .. Thank you so much
     
  7. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    It worked for me too but I don't feel comfortable using an experimental api. Using d3d12 also causes the game window to have severe tearing, regardless of framerate or vsync settings.
     
  8. KingKadriK

    KingKadriK

    Joined:
    Jul 1, 2015
    Posts:
    15
    Last edited: Jul 11, 2021
    atomicjoe likes this.
  9. Mini-Dev

    Mini-Dev

    Joined:
    May 31, 2021
    Posts:
    1
    RTX 2070 8GB
    32GB RAM DDR4
    I7 10th gen 8 cores
    window 10
    both
    Unity 2020.3.13f1 LTS
    Unity 2020.1.6f
    crashing sometimes
    Since I added water shader!
     
    Last edited: Jul 19, 2021
  10. KingKadriK

    KingKadriK

    Joined:
    Jul 1, 2015
    Posts:
    15
    RTX 3070 8Gb
    32 Gb RAM DDR4
    i7 11700 11th 8 cores
    windows 10
    Unity 2020.3.2f1 HDRP
    crashed sometimes after 5mn in the timeline
    the same scene don't crash at work on another pc (GTX 1080)

    it's clearly a problem with RTX Card..
     
  11. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    78
    Mine's crashing with the same error at the end of a Windows build (if I have the scene open), if I build while in a blank scene it doesn't seem to crash.

    AMD 5900HX / RTX 3080 Mobile 16 GB VRAM / 32 GB RAM Lenovo Laptop, Unity 2020.3.12, URP, Mono build.

    Running in hybrid mode (nvidia optimus), but Unity is running on the dGPU. Need to try switching to dGPU only mode to see if its fixes it.

    The build actually seems to come out just fine, just the editor crashes at the end.

    I've built the same scene to android just fine many times without ever crashing.

    Scene is mildly complex (150,000 triangles maybe, lots of shaders), but not so crazy it can run decent on my android phone.

    Edit: It still happens, but seemingly much more rare.
     
    Last edited: Sep 11, 2021
  12. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,495
    I didn't see chip creep mentioned here.. it's caused by repeated expansion and contraction due to temperature variation - over time, chips can eventually work their way loose.. then you get issues like these (and worse). However.. slim chance of this being the reason if your system is new, as it typically takes years to happen.
     
    atomicjoe likes this.
  13. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    78
    I may have just found a fix for my case: I had previously installed NVIDIA Omniverse to check out some graphics demos, and I uninstalled it... However, some part of it was still running (found Omniverse System Monitor in my task tray). Apparently its a common problem, and nvidia even made a tool to remove it:

    https://docs.omniverse.nvidia.com/prod_launcher/prod_utilities/cleanup-tool.html.

    After running that tool, Omniverse system monitor is gone and I have made 3 builds in a row without crashing, with the scene open. (First 3 times without crashes all day!).

    Will update if this didn't really fix it, thought I'd share it as it may help someone.
     
  14. KosukeSilver

    KosukeSilver

    Joined:
    Apr 20, 2020
    Posts:
    1
    hey, i found a solution that worked for me.
    copy the
    D3Dcompiler_47.dll from the directory C:\Program Files\Unity\Hub\Editor\YOUR UNITY VERSION\Editor\Data\Tools
    and paste it in C:\Program Files\Unity\Hub\Editor\YOUR UNITY VERSION\Editor\
    this worked for me
     
  15. AlsGameShack

    AlsGameShack

    Joined:
    Feb 13, 2014
    Posts:
    1
    I've been getting this error a lot today and I can easily reconstruct it. It's when I'm using the HPSXRP (or Haunted PSX Render Pipeline) package. I was only testing the shader to see how it works so I added a cube and a plane. In order for lighting to work on the objects however I need to add a custom material using the PSX shader onto the cube or plane to see it properly.

    Not long after (about 5-10 seconds) Unity crashes with the D3D compiler error and after reading some of the previous comments here it might be related to shaders, especially since I have only two objects in my entire scene. I've tried a few of the solutions and nothing has worked for me so far.

    I have submitted a crash report to Unity so will be interesting to see what comes of it but in case it is still needed here are my specs. Let's hope there is a fix available for this!

    Windows 10 Home
    Radeon RX 570
    Intel i5-2500K @ 3.30GHz
    2x8gb DDR 1600MHz
     
  16. PixelDough

    PixelDough

    Joined:
    Apr 27, 2018
    Posts:
    45
    I've shared this with the developer of the HPSXRP. I was also just having this issue today, never experienced it before. He's going to be looking into it to see if it's an issue with the pipeline or not :)
     
  17. Ooka2

    Ooka2

    Joined:
    Oct 22, 2020
    Posts:
    3
    for anyone else still having this problem, i just had to re-install my nvidia geforce drivers and that fixed the issue
     
  18. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,866
    That worked for me! Thanks!
    I'm using very heavy compute shaders for offline rendering and it clearly needed more than 2 seconds to render LOL!

    PS: before that I had my PC shutting down randomly because the UPS was not up to par with the spikes in current consumption and had to plug the PC directly to the wall instead...
    My 3090 is breathing fire right now :D
     
  19. LaioX

    LaioX

    Joined:
    Aug 16, 2021
    Posts:
    1
    Hi, i solved it by closing another desktop opened and just leaving 1. (Windows+TAB key)
     
  20. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    Having this issue with 2021.1.17f. Once it happens, only Windows restart fixes it. It's unusable. Having 3080 RTX, latest drivers
     
    M_R_M likes this.
  21. krakendono

    krakendono

    Joined:
    Jun 5, 2016
    Posts:
    15
    Just reset my computer and i still get the error what is going on unity
     
    M_R_M likes this.
  22. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    237
    Also running into this issue.

    Repros consistently upon resize of the Scene View. It happens instantaneously upon resize, it does not take 2 seconds (as noted above).

    For me is directly correlated with an series of models made in Blender and exported as an FBX for use in Unity. The Models are pretty simple.

    I've tried deleting the library folder, doesn't help.

    @Soner-Sen -- If the root cause is indeed a "complex" or "invalid" mesh, then surly Unity can check for that? At a minimum is there not a utility addon / package you guys could share out for us to better understand the source of the issue? Ideally calling out the mesh that has the issue so we can go fix it without resorting to brute force trial and error?

    Specs:
    Windows 10
    16 gb RAM
    RTX 2080
    i7-8700 @ 3.2Ghz
     
  23. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,866
    Have you tried this fix?
    Maybe it's not related, but it's worth a shot, as It will not hurt anyway.
     
  24. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    237
    @atomicjoe
    No I haven't. Appreciate you flagging it for me though. However, I really don't think we should have to hack around this kind of stuff.

    Unity is a product I pay for. Integration with Blender is something they call out as a first class feature. Crashing consistently because I have a "complex mesh" means there is a reproducible bug here, this thread further supports that. Unity can and should take the time to reply to us and address the issue. It is not okay that technical support is outsourced to the community.
     
  25. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,866
    This much is completely true.
    If you are a pro user, don't even bother posting on the forums, just fill a bug report and include a repro project with the mesh that is causing you problems. Pro users bug reports are checked out quickly, I can attest that.
    You can also email the pro user success advisors, they are eager to help and could speed this up for you.
     
  26. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    237
    Thanks, I'll give that a shot.
     
  27. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Soner already said this, and let me repeat it: there isn't one issue that causes this error. This error means the graphics driver crashed, and there can be many, many reasons behind that. Unfortunately, saying "I'm also seeing THIS issue" is not really actionable on our side. We need proper bug reports to investigate the crashes you are seeing, as chances that it's not actually the same issue are extremely high. For what it's worth, we've fixed a number of bugs that look like this over the last couple years and they were all caused by different things.
     
    PatHightreeXVR likes this.
  28. v2-Ton-Studios

    v2-Ton-Studios

    Joined:
    Jul 18, 2012
    Posts:
    237
    @Tautvydas-Zilys That is the worst reply I have gotten from a customer engagement representative in years. Very sad to see this from Unity.
     
  29. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Sorry to disappoint, but I am frankly not sure what kind of response you expected. By the way, I am not a customer engagement representative. I'm the guy investigating and fixing the bugs you report.
     
  30. Levi-of-Storange

    Levi-of-Storange

    Joined:
    May 23, 2013
    Posts:
    2
    Xbox game bar showed me that my machine was not running DX12 correctly so I updated my OS to the latest build and it fixed my problem. I had tried everything previously. Reinstalling my OS, Unity, Drivers, Registery Edits, and I only have a dedicated GPU so integrated wasnt a problem. But it sounded like an OS issue. I would make sure your up to date with the latest Build as just getting updates wont do it. I had to migrate to 20H2.

    Edit: it didnt fix the issue. But at least it white screens so I can still save my scene / changes before closing.
    I am out of ideas.
    Also specs:
    AMD 3900X
    RTX 2080 Ti
    Asus X570-Pro MB
    Ram: 32GB
    Windows 10 - 20h2
     
    Last edited: Sep 14, 2021
    Tautvydas-Zilys likes this.
  31. lasercannon

    lasercannon

    Joined:
    Nov 29, 2012
    Posts:
    80
    If it helps:

    Getting this up to a few times each day, often when Unity is idling and I'm working in something else. My whole computer freezes up too, sometimes indefinitely instead of showing the error; but it appears to be the same problem.

    I do tend to have a lot of programs open at once, but Unity is always the only one that crashes.

    Windows 10 Pro 21H1 19045.1165
    Intel i9-11900KF @ 3.50GHz
    32 GB RAM
    NVIDIA GeForce RTX 3070

    Unity 2020.3.1f1
    URP

    Doesn't seem like others on my team are seeing this, though I seem to remember seeing it on other computers I've had (less frequently).
     
  32. gioasiku16

    gioasiku16

    Joined:
    Jul 6, 2021
    Posts:
    2
    Does the error always come because maybe the RAM memory too big?
     
  33. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,900
    I have the same issue today trying to convert one of my projects to 2020.3.18f1 (not tried with a new project though)

    I had this issue on some PCs with lesser GPUs before, but now appears on my laptop with Nvidia 1050GTX and Unity is unusable !!

    I really dont know what to do with this, as cant work on new Unity at all now

    This was never an issue in 2019.4 Unity, so there must have been something extremely wrong in making the new Unity versions, please fix asap these errors so we can work.

    EDIT: Found some solution, will try now as seems i do miss the whole Tools folder, maybe be a HUb problem afterall that did not do the install properly

    https://stackoverflow.com/questions...t-d3d11-swapchain-due-to-device-reset-removed
     

    Attached Files:

  34. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,866
    Public Service Announcement:
    FILL ACTUAL BUG REPORTS IF YOU ENCOUNTER A BUG!
    (Help menu -> Report a Bug...)


    Complaining in the forums will not get it fixed. The forums are for discussing issues with other users (or for screaming into the void out of frustration, we do that too :p ) but if you find an actual bug, send Unity Tech a bug report with a repro project. It's the ONLY way you will get your problems solved (hopefully).

    Once you know it's an actual bug and that you have filled a bug report with a repro project, THEN you can put up the pressure by complaining in the forum, with an actual link to your bug report so that we can all upvote it.
     
  35. pakos21

    pakos21

    Joined:
    Sep 27, 2015
    Posts:
    4
    It only happens on higher lightmap settings on Progressive GPU (preview).
    Progressive CPU works always.

    -Updated graphics card driver. didn't work.
    -Bought a powered USB hub to see if my power is not enough but didn't resolve.
    *I thought the entire machine crashes but noticed only the screens go out, sound works.

    My specs---
    Window 10
    Ryzen 9 3950x 16 Core
    64 GB Ram
    Nvidia RTX 3090
    Crashes on Unity 2019 through 2020.3.18 so far.
    EVGA 1000G power
     
    Last edited: Sep 18, 2021
  36. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    Did you try the GPU timeout fix from earlier in the thread?
     
  37. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Can you file a bug report on this?
     
  38. Levi-of-Storange

    Levi-of-Storange

    Joined:
    May 23, 2013
    Posts:
    2
    I was able to file a bug report and Unity Helped get it solved for me at least so far. Its been several days and no issues.
    They had me set my NVidia control panel to restore defaults, the only option I had changed was Enabling G-Sync for windowed and Full Screen Mode. So after disabling g-sync for windowed mode everything seems to be good.
    Give it a try?
     
  39. Mukul_Negi

    Mukul_Negi

    Joined:
    Mar 27, 2016
    Posts:
    19
    Enabling GPU instancing for a terrain detail object somehow fixed it for me
     
  40. EasyPK

    EasyPK

    Joined:
    Oct 21, 2020
    Posts:
    2
    replying here in case this helps ANYONE else... GPU instancing on a complex terrain object thats being lit by the gpu, G SYNC monitor and gpu using g sync while using unity being turned OFF from ON for "Low Latency Mode" within Nvidia control panel have seemed to fix my "hold on, busy..." progress bars, and HORRIBLE performance with the editor.

    full post here Lots of busy... Hold on.... etc?
     
  41. Propagant

    Propagant

    Joined:
    Nov 18, 2013
    Posts:
    33
    Removing Library folder worked to me. However it's not really nice solution as the Library folder holds some required temp data to your timeline or shaders. At least it did for me.

    PC Setup

    Nvidia RTX 2070 S
    Windows 10 Pro
    Intel Core i9 10900K 3.70GHz
    2-Displays, both 1920x1080
    using Unity 2020.3.19f1
     
  42. nikitadezhic_unity

    nikitadezhic_unity

    Joined:
    Mar 17, 2020
    Posts:
    7
    In my case it has something to do with nvidia drivers. I haven't checked all of them, but it seems like the erros starts to appear at ~450.
    It crashed on 456.71, 471.68, 471.96, 466.47, 472.12.
    It works on 446.14. It also worked on 440.something.
    Specs:
    Windows 8.1
    Geforce GTX 960m
    Intel Core i7-4720HQ
    8gb ram

    EDIT: forgot to mention - crashed immediately on start.
     
  43. dpcactus

    dpcactus

    Joined:
    Jan 13, 2020
    Posts:
    53
    It appears that my issue was caused by my PCI-e 3.0 Riser Cable since I run GF3080 with a B550 Mainboard and PCI-e 4.0. Ever since I threw this one out, the issue hasn't reoccurred.
     
  44. TrollAxeThrower

    TrollAxeThrower

    Joined:
    Dec 24, 2012
    Posts:
    16
    Same problem.
    Nvidia GTX 850m, Driver 472.12
    Intel Core i7-4700HQ 2.40 GHz
    Windows 8.1 x64
    Tried installing different Unity3D versions but to no avail.
    The Engine doesn't even open up. The crash happens right after loading a project.
    In 2019.4.31f1 version, the window opens and doesn't crash, but it stops showing anything after the hierarchy window.

    Unity used to work for me just fine. I can guess it's the driver update, but that's just sad. I can't roll back, I also use Unreal engine on my computer, and I'm pretty sure it works well because I have an updated driver. Will send this to a bug reports as well.
     
  45. TrollAxeThrower

    TrollAxeThrower

    Joined:
    Dec 24, 2012
    Posts:
    16
    Tried to deactivate the Intel Graphics Card Driver, and it worked. Does anyone have another solution? :/
     
  46. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    Sounds like Unity for some reason is running on your Intel Gfx card? Are those drivers updated? You could force it to run on Nvidia GPU via Nvidia control panel (although I don't know why it doesn't do that by default).
     
  47. Ravl

    Ravl

    Joined:
    May 14, 2013
    Posts:
    35
    Happens on Unity 2020.3.16f1 (64-bit) with the latest NVIDIA Drivers.

    I tried to delete the library folder and worked.

    so this is a unity issue, not a driver one. also happened for some reason on an older project without making any update to unity.
     
  48. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,504
    It could definitely be on Unity's side. Could you report a bug?
     
  49. rhfpeixoto

    rhfpeixoto

    Joined:
    Nov 5, 2021
    Posts:
    1
    Hi !
    First step disable D3d12 in the build settings.
    Second step open a simple scenario when compiling.
    it worked with me.
     
  50. SanderGoal043

    SanderGoal043

    Joined:
    Feb 13, 2017
    Posts:
    9
    Hi!

    I have been having this problem for a while now(longer then a year across multiple computers), and usually it would lock my pc entirely. and no error to be found anywhere. these freezes only seem to happen when using unity. and I cant seem to find a way to replicate them.
    sometimes they happen multiple times a day, then nothing for weeks.

    specs:

    windows 10 (21H1, os build 19043.1348)
    AMD Ryzen 7 5800X
    NVIDIA RTX 3070 (driver version: 472.12)
    2x 2560x1440 screens with HDR

    its not he latest driver version (currently updating). but I doubt this will fix it
    this time however the freeze did not lock op my pc, and I managed to find an error in event viewer

    1)
    The program Unity.exe version 2020.3.13.26904 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel.
    Process ID: 65a0
    Start Time: 01d7dbabdb6ceca8
    Termination Time: 4294967295
    Application Path: C:\Program Files\Unity\Hub\Editor\2020.3.13f1\Editor\Unity.exe
    Report Id: f6e0caca-2fbf-4734-a5a8-4b643812b5ba
    Faulting package full name:
    Faulting package-relative application ID:
    Hang type: Top level window is idle


    2)
    Summary
    Hardware error
    Status
    Not reported
    Description
    A problem with your hardware caused Windows to stop working correctly.
    Problem signature
    Problem Event Name: LiveKernelEvent
    Code: 141
    Parameter 1: ffffe00fa112e010
    Parameter 2: fffff8005984a9c4
    Parameter 3: 0
    Parameter 4: 7ea8
    OS version: 10_0_19043
    Service Pack: 0_0
    Product: 768_1
    OS Version: 10.0.19043.2.0.0.768.101
    Locale ID: 8192