The Infamous D3D Device Lost Crash

D3D Device Lost Fix!

Hello UE Community!, I am fairly new to unreal engine and wanted to share this possible fix with you.
After suffering for a whole month of constantly crashing and having to redo some of my work or imports again and again…

How To Replicate

Simply interacting with the UE editor in any form like editing blueprints, importing assets or even saving and it will randomly crash whenever it feels like it

Fixes Related To Drivers

I have gone and tried every possible solution I could find on the internet, but they only extended the interval between crashes and didn’t actually fix the problem. I made a bug submission but they couldn’t help me fix it either…

They suspected it was a Nvidia driver problem and were waiting Nvidia to address it as they had no exact workaround for it.

What I have previously tried and only extended the crash interval:
**

  1. Stopped Overclocking GPU
  2. Updated drivers
  3. Reinstalled drivers
  4. Changed to Nvidia Studio drivers
  5. Reinstalled Windows
  6. Disabled XMP profile
  7. Stopped overclocking my CPU
  8. Manually ran the prerequisite installer
    **

Fixes Unrelated To Drivers

I got so desperate because unreal engine was amazing, but I can’t keep on working with it like that…
Luckily I remembered that I had faced problems before while developing with the antivirus interfering and stopping my programs from manipulating files and so on.

So what I tried and actually worked:
**

  1. I stopped overclocking my GPU
  2. I stopped my antivirus
    **

After confirming it was the antivirus, I have made an exception to both the installed unreal engine path and my project’s path in the antivirus and activated it again and it still works.

After that all of my unreal engine versions stopped crashing no matter what I do from importing to connecting lots of nodes in the BP editor.
This whole time it was the antivirus that was causing the crash… I don’t know why epic didn’t suspect it was an antivirus problem rather than a driver problem…
Also, the thing is… the antivirus doesn’t show notification that it has interfered with UE so it took me a long time to figure out it was the cause.

I hope this helps newcomers from avoiding the awesome unreal engine because of the silliness of having to deal with such a thing.

My Setup:
GPU: Nvidia RTX 2070 Super
CPU: AMD Ryzen 7 3700x
Antivirus: AVG Free Antivirus
I currently switched to UE5 Early Access after fixing the crashes

If You Are a UE Dev

  1. Please try to check why is it triggering the antivirus to stop unreal engine editor from working.
  2. It would help a lot if you can give different stack trace errors in the UE bug reporter for what is actually caused by a driver and what is caused by the antivirus or another software blocking UE editor

Please Read This

If this fix doesn’t work for you or if you had any different hardware/software setup please share them and the fix that helped you in the comments.
Also, try to limit the discussion to only have fixes for this problem because finding one that works for your specific setup is really hard as not all the fixes on the internet work for all setups, and most people posting about it don’t list their hardware/software setup.

Summary

This text will be hidden

Any game I try and play that uses Unreal Engine keeps crashing with that error… I have my Nvidia driver’s up to date and I even rolled them back to 497.19 and it still does it…

I have an i9-10850K, 3080 TI, 32 GB RAM

After crashing every 5 minutes using UE 4.24 and having NO problems with 4.23 I finally found a fix for myself.

I no longer crash due to D3D Device being lost for any reason after switching from Nvidia’s game drivers to Nvidia’s Studio Drivers in Geforce Experience.

I have been able to use 4.24 for hours without crashing due to D3D Device Lost. Haven’t crashed once since switching to the Studio Drivers.

I don’t know what they changed, but I did a clean installation and had no problems afterwards. For those of you having the D3D crash, can you see if this also fixes your D3D crashes?

UE-74575

How do I switch? On the web it says its not possible.

Thank you. This bug is driving me crazy.

Hey guys,

I don’t normally post here as I very rarely have any issues that I can’t find solutions to on google, but it seems that I have hit a roadblock and will required some input from this outstanding community.

I have updated to 4.24.1 and have started a small project and have come across the infamous D3D device being lost “Internal Error” issue.

bfc9d4d6d70599deec78e806769e6
EpicAccountId:d66ba0c22f4346f8be072dc9714a966b

Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Util.cpp] [Line: 198] Unreal Engine is exiting due to D3D device being lost. (Error: 0x887A0020 - 'INTERNAL_ERROR')

UE4Editor_D3D11RHI
UE4Editor_D3D11RHI
UE4Editor_D3D11RHI
UE4Editor_D3D11RHI
UE4Editor_D3D11RHI
UE4Editor_RHI
UE4Editor_RHI
UE4Editor_RHI
UE4Editor_RHI
UE4Editor_RHI
UE4Editor_SlateRHIRenderer
UE4Editor_SlateRHIRenderer
UE4Editor_SlateRHIRenderer
UE4Editor_Core
UE4Editor_Core
UE4Editor_RenderCore
UE4Editor_RenderCore
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll

Last important lines of log file

[2019.12.30-02.52.52:283][621]LogSlate: InvalidateAllWidgets triggered.  All widgets were invalidated
[2019.12.30-02.52.52:319][621]LogAudioMixer: Display: No commands were queued while flushing the source manager.
[2019.12.30-02.52.52:324][621]LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden
[2019.12.30-02.52.52:327][621]LogUObjectHash: Compacting FUObjectHashTables data took   2.93ms
[2019.12.30-02.52.52:454][622]LogPlayLevel: Display: Destroying online subsystem :Context_8
[2019.12.30-02.52.55:681][917]LogSlate: Window 'Message Log' being destroyed
[2019.12.30-02.52.55:687][917]LogSlate: Window 'Message Log' being destroyed
[2019.12.30-02.53.30:564][279]LogRHI: Error: SyncInterval 0
[2019.12.30-02.53.30:564][279]LogRHI: Error: SwapChainDesc.BufferDesc.Width 152
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferDesc.Height 26
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferDesc.RefreshRate.Numerator 0
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferDesc.RefreshRate.Denominator 0
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferDesc.Format 24
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferDesc.ScanlineOrdering 0
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferDesc.Scaling 0
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.SampleDesc.Count 1
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.SampleDesc.Quality 0
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferUsage 48
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.BufferCount 2
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.OutputWindow 0000000001240832
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.Windowed true
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.SwapEffect 4
[2019.12.30-02.53.30:565][279]LogRHI: Error: SwapChainDesc.Flags 2050
[2019.12.30-02.53.30:565][279]LogD3D11RHI: Error: Result failed 
 at D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Viewport.cpp:389 
 with error DXGI_ERROR_DEVICE_REMOVED DXGI_ERROR_DRIVER_INTERNAL_ERROR
[2019.12.30-02.53.30:565][279]LogD3D11RHI: [Aftermath] GDynamicRHI=000002F66F53C0C0, GDX11NVAfterMathEnabled=0, Result=0xFFFFFFFF, bDeviceActive=0
[2019.12.30-02.53.30:565][279]LogWindows: Windows GetLastError: The operation completed successfully. (0)

I have tried changing my Tdr Values in RegEdit(Was required for Substance Painter) as seen below:

I have also tried underclocking my gpu as mentioned in this answerhub topic: [Unreal Engine is exiting due to D3D device being lost. (Error: 0x887A0006 - 'HUNG') - Pipeline & Plugins - Unreal Engine Forums][2]

I have also updated windows 10 and installed my latest graphics drivers as well.

Also, I have turned off “Real Time Thumbnails”

Thank you for your time,

Aaron

Is it a laptop?

Another unanswered question, nearly a year old. Superb.

Hi Epic,

Since today I am getting D3D device lost crashes on any of my 4.15.1 projects.
Both the engine compiled from source as well as new projects through launcher.

Both log attached are from two new test projects.
thirdperson, add a landscape.
To put some pressure on the GPU I added the LAM from marketplace to it.
Up till here both projects start up fine.

when enabling depth fields under lighting section in project settings and restarting the editor, it crashes and will continue to crash any time I try to open the project.
Our code version also has depth fields activated due to dynamic lighting and also crashes on startup of the editor.

Is there a way to disable the depth fields so I can test if they are the cause at this time?

Log files project 1

Log files project 2

I made an mistake on what I think causes it. It’s mesh distance fields, not depth fields…

sorry bout that.

I found the entries within both engine.ini files and desabled mesh distance fields there. Editor loads normally again. re-enabling them crashes the engine again. So the issue for us seems to be triggered when enabling the mesh distance field in project settings. This behavior happens on both projects build from the code version of 4.15.1 as well as empty BP projects created through the Epic launcher.

Still receiving it while doing other actions in the editor as well. simply placing an object or opening a blueprint can crash it.

Since 4.13 has issues under the new windows 10 release with dropdown menu’s not working normally and 4.14 and 4.15 constantly give d3d device errors we have no working engine version at this time.

Hey Kamithra,

We have several cases causing the D3D Device being lost. We plan to incorporate Nvidia Aftermath in an upcoming patch that will assist us with gathering information.

What I may ask of you is to get the latest drivers and test this once again after we release another patch.

Thanks!

Ed

Hi Ed,

thanks for the reply. I just upgraded to the newest drivers released by nvidia following the windows upgrade. Problem remains the same.

I’ll keep looking foor things which may help. thanks.

Ah, sorry if I wasn’t clear. What I mean is once we release our patch and are ready to test for the d3d issue that is when we may start asking users to get the latest drivers and try to reproduce the crash in that engine version.

Hi…
I am using unreal engine 4.26 it shows me ( " unreal engine is existing due to d3d device lost I have tried all methods mentioned in youtube website etc…but nothing worked for me,…is there any other way to solve
Project specifications :
C++
Mobile
It often crashes after 5 or 7 minutes only while I’m working if do nothing just kept the ue4 editor running for more than 15 minutes it not crashing but when I started working it crashes in 5 or 7 minutes PLZZ anyone help me with this problem…

Many possible issues, I think most frequent issue here is drivers somehow being corrupt. Maybe do a clean install using DDU.

I’m using Unreal Engine 4.26.2, stock, on Windows 10 Pro, on a 128 GB machine with a NVIDIA RTX 3090 running drivers version 471.11, connected to two 1440p displays.

Every hour or two of using Unreal Editor, the editor provokes the system into “D3D Device Lost” (the hard part, where it resets the desktop, restarts the monitor links, makes Photoshop crash, etc.)
Why am I picking on UE editor? No other program causes this to happen, although I realize that, theoretically, the driver should never allow this in the first place. Several programs do misbehave after it happens, not just Photoshop. Youtube Music Desktop, Slack, and a few other programs also tend to misbehave after device lost, presumably because the Chromium rendering engine they use has some problem with that, because device lost is intended to be “uncommon” these days …

Is there some known resource leak that can be patched? Is there something I can do to debug this? (I will try the latest Studio drivers, because apparently there’s a newer version now.)

1 Like

FWIW, experimentation shows that, if I disable the “mpo” registry hack (previously needed to avoid menus/windows becoming black after a bit of use,) then the “desktop crash / device lost” seems to have changed itself to a “loss of window sync and return” which doesn’t lose the device, and the editor can keep working. But it’s still annoying, and I don’t know if this just shoves the problem under the rug, to pop up as a crash/black-window sometime later.

Also, now that I think about it, this might be more a NVIDIA thing than an UE thing, because I believe I saw the device loss problem once in Cubase, which uses some 3D accelerated API to display its editor windows. UE wasn’t running at the time, so the finger points towards Santa Clara.

Sounds like what happens routinely if you crank the overclock sliders a bit too high.

Totally stock system.