Unreal Engine crashing with a GPU crash or "D3D device lost": how to find the cause and fix it

A frequent reason Unreal Engine 5 closes suddenly on Windows is a GPU crash: the graphics card or its driver stops responding and the D3D device is lost. Confirm that in the log first, then update the driver, free up video memory, and only after that look at the Windows TDR timeout and the engine's debug options.

Applies to:Unreal Engine 5 (editor and packaged games)5.3 per Epic documentation; user reports cover 5.1 and 5.4WindowsD3D11 and D3D12 renderers
On this page

What it means

"Unreal Engine crashing" covers several different failures. A crash is any problem the program cannot recover from. Some come from a deliberate failed check in the code (an assert), and others from bugs in a plugin, in project code or in an asset. This article deals with one frequent cause in both the editor and games: the GPU crash.

In a GPU crash, the graphics card or its driver stops responding and the D3D device is lost. The CPU callstack in the crash report then only shows what the CPU was doing at that moment, so it usually does not point at the real cause. That is why the log matters more than the callstack here.

If the crash happens right at launch and the log says nothing about the GPU, start with Game crashes on startup on Windows. For the same error inside a particular game, see DXGI_ERROR_DEVICE_HUNG (0x887A0006) and Apex Legends DXGI_ERROR_DEVICE_REMOVED.

Symptoms and causes

You are likely dealing with this problem if:

  • The editor or game closes suddenly, or shows a "GPU Crash" or "D3D Device Lost" message.
  • The log contains DXGI_ERROR_DEVICE_REMOVED, DXGI_ERROR_DEVICE_HUNG or "GPUCrash - exiting due to D3D device being lost - D3D Hung".

The usual causes, most common first:

GPU out of video memory (VRAM)
Large scenes, high resolutions, several open viewports or other GPU-heavy programs can fill VRAM.
Windows TDR timeout
Timeout Detection and Recovery resets the GPU when a single operation takes longer than the timeout. Heavy ray tracing, Lumen and similar work can trigger it.
Engine, driver or OS bug
Epic also lists a bug in engine code, in the graphics driver or in the operating system as possible causes.
Hardware problem
A faulty or unstable graphics card can produce the same error.

How to fix it

Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.

1.Confirm it is a GPU crash by reading the log

Easy

The fixes below only apply to GPU crashes. The log tells you whether yours is one.

  1. For the editor, open the project folder and look in Saved/Logs for the logs and Saved/Crashes for crash reports.
  2. For a packaged game on Windows, open the crash folder under your user profile.
    Text
    C:\Users\<user>\AppData\Local\<Project>\Saved\Crashes
  3. Open the newest log in a text editor and search for DXGI_ERROR_DEVICE_REMOVED, DEVICE_HUNG or GPUCrash. A hit means this is a GPU crash. No hit means a CPU-side crash, and the callstack in Saved/Crashes is what you need to follow.

2.Update the graphics driver

Easy

Epic points to driver bugs as a possible cause of GPU crashes, so a current driver is the cheapest thing to rule out.

  1. Download the latest driver from your GPU vendor's own website (NVIDIA, AMD or Intel) and install it.
  2. Restart the PC and run the project again.

3.Free up video memory

Easy

Running out of VRAM is one of the causes Epic documents.

  1. Open Task Manager, go to Performance and select your GPU. Watch Dedicated GPU memory while the editor or game runs.
  2. Close other GPU-heavy programs, such as browsers with many tabs, other games or video tools.
  3. In the editor, lower the viewport Screen Percentage or the resolution, and keep only one viewport open.
  4. If you build the project, use lower-resolution textures and meshes or add culling.

4.Split heavy ray tracing work into tiles

Moderate

If the crash is a TDR timeout caused by one very long GPU operation, tiling splits it into several shorter ones, each a separate GPU command buffer.

  1. Set both console variables to a value above 0. Each tile then becomes its own command buffer.
    Text
    r.RayTracing.GlobalIllumination.RenderTileSize
    r.RayTracing.Reflections.RenderTileSize

5.Narrow down an engine or driver bug with launch options and console variables

Advanced

These options help show whether the crash comes from a threading or timing problem, a render pass or a specific feature.

  1. Launch once with -gpucrashdebugging, and separately once with -d3ddebug. Do not combine the two.
  2. Test with -onethread and -forcerhibypass to look for threading or timing problems.
  3. Set r.RDG.Debug=1 to report render passes that were not set up properly. Set r.RDG.ImmediateMode=1 for more useful callstacks (it may change behavior).
  4. Switch the RHI, for example from DX12 to DX11. Hardware ray tracing needs DX12.
  5. Toggle Lumen, Nanite and Ray Tracing, or hide objects in the scene, to find which one triggers the crash.

6.Raise the Windows TDR timeouts

AdvancedChanges settings

Gives the GPU more time before Windows resets it.

Before you start: This edits the registry. Create a restore point first (search for Create a restore point in the Start menu) and change only the two values below.

  1. Press WinR, type regedit and press Enter.
  2. Go to this key.
    Text
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
  3. Create a DWORD (32-bit) Value named TdrDelay and set it to 60 (decimal).
  4. Create a second DWORD (32-bit) Value named TdrDdiDelay and set it to 60 (decimal). Note the spelling: one place in Epic's page writes it differently, but TdrDdiDelay is the correct name.
  5. Restart the PC.

7.Report the crash

Moderate

If you have narrowed it to an engine or driver bug, a report is the way to get it fixed.

  1. Note that editor builds compiled from source do not send crash data to Epic.
  2. For packaged builds, enable Include Crash Reporter in the project packaging settings, or set the value below in Config/DefaultGame.ini.
    Config
    IncludeCrashReporter=True
  3. As of UE 5.4, Epic does not receive reports from packaged builds. Reports go to the endpoint you set as DataRouterUrl under [CrashReportClient].

Check that it worked

  • Run the same scene or level that crashed before, for longer than it used to survive, without the editor or game closing.
  • Check the newest file in Saved/Logs and confirm it has no DXGI_ERROR_DEVICE_REMOVED, DEVICE_HUNG or GPUCrash entries.
  • Watch GPU memory in Task Manager and make sure it stays below the card's limit.

If it still fails

  • If the log shows no GPU error, the crash is not a GPU crash. Use the callstack in Saved/Crashes to look for a faulty plugin, project code or a corrupted asset.
  • If the crash returns after the driver, VRAM and TDR steps, test with the other RHI (DX11 or DX12) and with Lumen, Nanite and Ray Tracing toggled to find the trigger, then report it with the log.
  • Repeated device-lost errors in several different programs can point to failing hardware. Test the card in another game or on another PC if you can.
  • Epic's own documentation and forums are the place to ask about engine bugs.

Questions

Does the same advice apply on macOS or Linux?

The sources used here cover Windows only. The log and registry paths above are Windows paths.

Sources

  1. How to Fix a GPU Driver Crash When Using Unreal EngineOfficial · Epic Games
  2. Crash Reporting in Unreal EngineOfficial · Epic Games