UE5.1 DX12 PIE Crash : EXCEPTION_ILLEGAL_INSTRUCTION (Solved)

I recently experienced random GPU crash after upgrading to UE5.1 and change the shader format from D3D11 to D3D12:

Unhandled Exception: EXCEPTION_ILLEGAL_INSTRUCTION
nvwgf2umx
nvwgf2umx
nvwgf2umx
nvwgf2umx
nvwgf2umx
nvwgf2umx
D3D12Core UnrealEditor_D3D12RHI!FD3D12CommandContext::RHIDispatchComputeShader() [D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Commands.cpp:127]
UnrealEditor_RenderCore!FRHICommand<FRHICommandDispatchComputeShader,FRHICommandDispatchComputeShaderString>::ExecuteAndDestruct() [D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Public\RHICommandList.h:855]

The illegal instruction made me suspect it is a driver issue but couldn’t find any relevant info on UE forum.
Have anyone experience similar issue?

GPU - RTX2080 Super
GPU Driver - 516.94

Hello rit,

I invite you either to upgrade from DirectX 11 to version 12, or consult the link below to help you.

1 Like

Thank you for your reply! :slight_smile:

I’ve already switched from DX11 to DX12 (SM6) the same day I upgraded my project from UE5.0 to UE5.1 - and this crash started to happen after I make the switch to UE5.1

I’ve visited the thread you mentioned before posting here, and it seems the problem is either :

  • Not switch to DX12 or
  • MSI afterburner is messing with Unreal Editor

both are not applicable to my case, unfortunately :frowning:

A similar case I found was on UnrealSlacker Discord channel where the person posted the exact same crash report as mine - he was using DX12 with the latest Nvidia driver, however, no solution was given except suggesting he downgrade from DX12 to DX11 to prevent the crash from happening again.

1 Like

It seems a clean install of the same driver version: 516.94

solved the issue for me.

Have not experienced PIE GPU crash since the clean install 4 days ago.

I guess there are some leftover files that are not compatible with UE5.1 render API while I was installing Nvidia drivers…weird.

Clearing the project cache:
Try deleting the project cache that Unreal Engine uses for temporary files. These are folders such as “DerivedDataCache”, “Intermediate” and “Saved”. Delete them, or move the folder to another location. When opening the project they will be restored.

In the DefaultEngine.ini settings you need to set the desired value DirectX.

[/Script/WindowsTargetPlatform.WindowsTargetSettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12