Fatal error DXGI_ERROR_DEVICE_REMOVED with Reason DXGI_ERROR_DEVICE_HUNG

Hi,

On multiple occasions, while rendering the high-resolution images with Movie Render Queue using UE 4.26.2 we are running into random crashes. We came across various random posts and article online which talks about trying to set the TdrLevel and GPU Time out settings but they don’t seem to be working as explained and the crashes still continue.

The render resolution in this case 4096x4096 and we are following the High Resolution rendering guidelines for the tiled rendering of images from docs.


Provides a way to use tiled renders to produce larger images than would normally be possible because of maximum texture sizes or memory limits on GPUs.

However, this doesn’t completely solve the crash issues.

Pasted below is the snippet of the error from the crash log.

[2021.10.11-19.05.07:948][601]LogRenderer: Reallocating scene render targets to support 4096x4096 Format 10 NumSamples 1 (Frame:76195).
[2021.10.11-19.05.18:202][601]LogD3D12RHI: Error: pResource->Map(Subresource, pReadRange, reinterpret_cast<void**>(&pData)) failed 
 at D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RHIPrivate.h:1168 
 with error DXGI_ERROR_DEVICE_REMOVED with Reason: DXGI_ERROR_DEVICE_HUNG

[2021.10.11-19.05.18:203][601]LogD3D12RHI: Error: [GPUBreadCrumb] Last tracked GPU operations:
[2021.10.11-19.05.18:203][601]LogD3D12RHI: Error: [GPUBreadCrumb]	3D Queue 0 - Begin: Frame 600 - SceneCapture  - RenderScene - Scene
[2021.10.11-19.05.18:203][601]LogD3D12RHI: Error: [GPUBreadCrumb]	Compute Queue 0 - No Data
[2021.10.11-19.05.18:203][601]LogD3D12RHI: Error: [GPUBreadCrumb]	Copy Queue 0 - No Data
[2021.10.11-19.05.18:203][601]LogD3D12RHI: Error: DRED: No PageFault data.
[2021.10.11-19.05.18:211][601]LogD3D12RHI: Error: GPU Crashed or D3D Device Removed.

Use -d3ddebug to enable the D3D debug device.
Check log for GPU state information.
[2021.10.11-19.05.18:223][601]LogWindows: Error: Error reentered: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/D3D12RHI/Private/D3D12Util.cpp] [Line: 671] 
pResource->Map(Subresource, pReadRange, reinterpret_cast<void**>(&pData)) failed 
 at D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RHIPrivate.h:1168 
 with error DXGI_ERROR_DEVICE_REMOVED with Reason: DXGI_ERROR_DEVICE_HUNG




[2021.10.11-19.05.19:928][601]LogWindows: FPlatformMisc::RequestExit(0)
[2021.10.11-19.05.19:928][601]LogCore: Engine exit requested (reason: Win RequestExit)
[2021.10.11-19.05.19:929][601]LogWindows: FPlatformMisc::RequestExit(1)
[2021.10.11-19.05.19:929][601]LogCore: Engine exit requested (reason: Win RequestExit; note: exit was already requested)
[2021.10.11-19.05.19:931][601]Log file closed, 10/12/21 00:35:19

How can we fix these crashes and make the renders happen reliably?

Please let us know if you would want us to share any more or specific information on this to help figure and debug the problem.

Thanks,

2 Likes

Hi,

Looks like the below (attached image) registry settings have helped avoid this occurrence so far! Hope we will continue to be lucky with this… :slight_smile:

2 Likes

I tried setting TdrLevel to 0.
Also tried TdrLevel to 3 & TdrDelay to 10 seconds.

It keeps crashing, this doesn’t happen to me in Full Screen

So I just lowered the FPS to a fixed rate.

Now I rarely get that error again while editing in the viewport in window mode.

1 Like

Same here. Lowering FPS works around it.

Try going to the Nvidia Control Panel, click the top right help tab, and enable “debug mode”. After doing this my games very rarely crash.