UE5 prev. 2. DX12 Fatal Error DXGI_ERROR_DEVICE_REMOVED

Hey everyone!

So I have been having this issue for almost a full year now over multiple Unreal versions (from ue4 4.25 up untill UE5 5.0 preview 2) and I have tried pretty much everything everything I could find that was suggested on similar crash posts.
At this point I dont even know anymore if the original reason for crashing was the same issue as I am having now. but I feel at the end of the road regarding this issue.

From installing specific GPU drivers, reverting back to older GPU drivers, installing GPU game-driver variants, installing GPU studio-driver variants, disabling certain NVIDIA control panel global settings, reinstalling fresh windows 10, installing fresh windows 11 and increasing TDP timing.

None of these have helped sadly. Which leaves me only with disabling DX12 altogether on all my projects, which is a massive shame since so many of the new features in all these updates are great to play around with if the editor didn’t crash very spontaniously.

Basically to get to the point:
Every time I open an unreal project using DX12, it normally takes around 10 minutes to crash. but after multiple times of restarting the editor, it seems to take longer and longer before it crashes. At some point not crashing for a few hours. Up untill I restart my PC.

Keeping an eye on Task Manager I can’t get any indication of what may be causing the GPU to crash. Video memory doesn’t necessarily gets used to much during crashing, neither is compute, 3D or copy engines.

I consistently get the following crash report:

Here is the crash log file:
TankEnvironment.log (105.7 KB)

I am kind of at the end of the road with all the solutions and options I could think of, so hence why I ask it here now in the forums.
Hopefully anybody can give me suggestions for how to fix this, I wouldn’t be surprised it may be something incredibly easy to be honest. I just can’t think of anything anymore that I could try :smile:

PC Specs:
CPU: I9-9900K
RAM: 64GB DDR4 2166Mhz
GPU: RTX 2080TI
Motherboard: Gigabyte Z390 Gaming X

I have looked into running the editor in Debug mode as well with a breakpoint set to the line after the UE_LOG function call in the void VerifyD3D12Result() function of file: D:\Unreal\UE_5.0\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp | Line: 860.
This seems to atleast narrow it down to the VERIFYD3D12RESULT function failing for void FD3D12DefaultBufferAllocator::AllocDefaultResource() in file: D:\Unreal\UE_5.0\Engine\Source\Runtime\D3D12RHI\Private\D3D12Allocation.cpp | Line: 1438

This makes me think that something is causing the memory allocation of a buffer to fail, but tracking that further then this is not something I am experienced enough to do.

I hope that gives you all the info needed to help me with this issue.
Sorry for the long post, hopefully it has enough information to go off of to help me fix this :smiley:

Kay

1 Like

Having same problem. Did you figured out how to fix it?

My PC:
MSI GS76 Stealth 11UH
i7 11800H
RTX 3080 Laptop GPU (16GB Vram)
32GB RAM (3200mhz)
Windows 11 with available latest patch today(Genuine)

Nope, still having the issue. ):

I have no clue what to do.
I did go more into the C++ code and I suspect its a bug, since it allocates the memory for a buffer. But the validation of that allocation fails. Sadly I cannot confirm yet if it is actually a bug or maybe something up with my hardware/software stack instead.

TankEnvironment.log (104.3 KB)
In this crash it seems like it allocates a page for the Lumenscene card update (or clearing of lumenscene cards) but it allocates a resource with 0x0x0 dimensions.

[2022.04.02-14.23.28:453][562]LogRHI: Error: [Aftermath] Status: PageFault
[2022.04.02-14.23.28:453][562]LogRHI: Error: [Aftermath] Failed to get Aftermath stack data
[2022.04.02-14.23.28:453][562]LogRHI: Error: [Aftermath] Faulting address: 0x0000001854591000
[2022.04.02-14.23.28:453][562]LogRHI: Error: [Aftermath] Faulting resource dims: 0 x 0 x 0
[2022.04.02-14.23.28:453][562]LogRHI: Error: [Aftermath] Faulting result size: 0 bytes
[2022.04.02-14.23.28:453][562]LogRHI: Error: [Aftermath] Faulting resource mips: 0
[2022.04.02-14.23.28:454][562]LogRHI: Error: [Aftermath] Faulting resource format: UNKNOWN (0x0)
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: PageFault: PageFault at VA GPUAddress "0x1854591000"
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: PageFault: Last completed frame ID: -1 (cached: 564) - Current frame ID: 567
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: PageFault: Logging all resource enabled: No
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: PageFault: Found 0 active tracked resources in 16.00 MB range of page fault address
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: PageFault: Found 0 active heaps containing page fault address
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: PageFault: Found 0 released resources containing the page fault address during last 100 frames
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: [GPUBreadCrumb] Last tracked GPU operations:
[2022.04.02-14.23.28:454][562]LogD3D12RHI: Error: [GPUBreadCrumb]	3D Queue 0 - Begin: Frame 558 - Scene - LumenSceneLighting - BuildCardUpdateContext - ClearCardUpdateContext
[2022.04.02-14.23.28:461][562]LogD3D12RHI: Error: pResource->Map(Subresource, pReadRange, reinterpret_cast<void**>(&pData)) failed 
 at D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RHIPrivate.h:1333 
 with error DXGI_ERROR_DEVICE_REMOVED with Reason: DXGI_ERROR_DEVICE_HUNG

[2022.04.02-14.23.28:461][562]LogD3D12RHI: Error: [GPUBreadCrumb]	Compute Queue 0 - No Data
[2022.04.02-14.23.28:474][562]LogD3D12RHI: Display: D3D12 CreatePlacedResource failed with params:
	Heap Type: 1
	Heap Flags: 192
	Resource Dimension: 1
	Resource Width: 77696
	Resource Height: 1
	HeightFormat: 0
	Resource Flags: 0
[2022.04.02-14.23.28:474][562]LogD3D12RHI: Error: hr failed 
 at D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Resources.cpp:629 
 with error DXGI_ERROR_DEVICE_REMOVED with Reason: DXGI_ERROR_DEVICE_HUNG

[2022.04.02-14.23.28:474][562]LogD3D12RHI: Error: [GPUBreadCrumb]	Copy Queue 0 - No Data
[2022.04.02-14.23.28:486][562]LogD3D12RHI: Error: DRED: No breadcrumb head found.
[2022.04.02-14.23.28:486][562]LogD3D12RHI: Error: DRED: No PageFault data.
[2022.04.02-14.23.28:486][562]LogD3D12RHI: Error: Memory Info from frame ID 565:
[2022.04.02-14.23.28:486][562]LogD3D12RHI: Error: 	Budget:	10281.00 MB
[2022.04.02-14.23.28:486][562]LogD3D12RHI: Error: 	Used:	4702.26 MB
[2022.04.02-14.23.28:500][562]LogD3D12RHI: Error: GPU Crashed or D3D Device Removed.

:frowning: kinda anoying. Did you tried to resetup windows? I really thinking about going back to windows 10 but probably it’s not a problem.

LoginId:**
EpicAccountId:**

Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp] [Line: 859] pResource->Map(Subresource, pReadRange, reinterpret_cast<void**>(&pData)) failed at D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RHIPrivate.h:1333 with error DXGI_ERROR_DEVICE_REMOVED with Reason: DXGI_ERROR_DEVICE_HUNG

UnrealEditor_D3D12RHI
UnrealEditor_D3D12RHI
UnrealEditor_D3D12RHI
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

Yes I have, I have re-installed windows 10 and also upgraded to windows 11.
None have helped so far sadly.

I did notice that for me the issue seems to be partially linked to Lumen, specifically the Lumen Card representation of the scene. when it tries to update that and it needs to add a lot of assets still to that representation (when just opening the level and quickly looking around) it seems to crash.

But that is not the only reason it could crash, as I have had it happen with too high screenpercentage (using TSR or TAA) or even when editing materials during saving/compilation.

Today updated to full verison of UE5 still getting this errors and crashes.

Experiencing the same issue, I can use projects that were updated from UE4 but any new UE5 projects just instantly crashes with the D3D12Util.cpp error

Yeah I still get them as well, But I feel like its something in my project as I have been working on optimizing performance and that has reduced the frequency of the crashes.

One thing that seems to help for me a little bit is making sure to make the viewport size is smaller then normal (with ultra-wide i set it to only occupy half my screen) and reducing the screenpercentage also seems to help (Though TSR seems to be quite expensive, the final output resolution is actually pretty good).

do you both have ultra-wides perhaps? maybe that could be the connecting piece between us all? @ermgerd @emirefek

Found this tutorial on the new learning portal:

Seems to talk about the same issue we are having, but only proposes the DX11 route as a fix sadly.

Just wanted to share here in case its useful for anybody looking here :slight_smile:

@kaymanv I have been dealing with the same issue for some time. This thread covers this issue as well and includes lots of options others have tried: UE5 gpu crashed or d3d device removed - #58 by Joshuab_artist

Switching to DX11 or Vulcan seemed to work, but like you, I lost out on too much functionality to use that solution.

The only other thing that I saw any success with was disabling “Support Hardware Ray Tracing” in the project. This resolved the device removed error for me. Unfortunately, my renders look way worse now (I’m doing cinematics). Perhaps that’s not essential for you or others, so you may wish to try that.

@daleicious Sadly I need that as well. But thanks for sharing!
For the project for work I can run UE5 with all features on just fine on the same GPU.
So I will ask around what engine changes/fixed they did to their custom UE5 version to get that working.

1 Like

Plausible solutions
1 Alt + S tipe Graphics settings broswe a UN5
2 Instal microsoft visual C++
3 Windows security clearances for UN5
4 Ciange Windows automatic settings for multiple graphics pluged to 1 PC related to UN5

Thanks for the suggestions @Data_D_Soong
2,3 and 4 I have tried already. I dont know what you mean with 1 though? :smiley:

soery error pres Widows sibol + S and Tipe in a Graphics settings and find a UN5 exe in you pc is work in som game

Direct X error they are related to hardware drivers bios setings in 99.9% of cases

Hello)) My project was cresh when I tried to save the project. Or when trying to exit the project. The log file indicates that direct x has been disabled.
Solution:
My project was not correctly connected. Reconnected on the blue icon.

The project started working fine

Good day everyone! I found a solution and I am 80-90% sure that this will fix your mistake! because I tried it on two different computers and it worked! and on Windows 10 and on Windows 11 checked! the first thing you need to do is install Nvidia Studio Driver then settings according to the pictures and I hope you succeed and I will be glad for your help :people_hugging: