DirectX encountered an unrecoverable error

Fix 'DirectX encountered an unrecoverable error' in Battlefield 2042

This error crashes Battlefield 2042 mid-game. It's caused by unstable GPU clocks or corrupted shader cache, not a DirectX installation issue.

Quick answer: Reset your GPU core and memory clocks to stock, then delete the DirectX shader cache at %USERPROFILE%\AppData\Local\Temp\D3DSCache. That fixes 90% of these crashes.

Why you're seeing this error

You're in a match of Battlefield 2042. The game's been running fine for 10 minutes. Then suddenly the screen freezes, you get a black flash, and Windows boots you to the desktop with a popup that says "DirectX encountered an unrecoverable error." The game's gone. No warning. No debug info.

This error is almost never a problem with your DirectX installation itself. DirectX 12 ships with Windows 10 and 11, and it's very hard to corrupt. The real culprit is the graphics driver or hardware. Specifically, the game's engine (Frostbite) pushes your GPU hard. If your GPU clocks are even slightly unstable — either from factory overclock, your own manual overclock, or aggressive boost algorithms — the driver resets itself. That driver reset triggers the DXGI_ERROR_DEVICE_HUNG error, which shows you this message.

Another common cause is a corrupted shader cache. Battlefield 2042 compiles shaders in the background when you first start the game. If that process gets interrupted by a crash or a power loss, the cache becomes invalid. The game tries to use broken shader data and the GPU nopes out.

Note: This is not related to your DirectX version. You do NOT need to download the DirectX runtime installer. That won't fix it.

Fix steps

I've ordered these from most likely to fix it to least likely. Do them in order. Test after each one.

  1. Set GPU clocks to stock. If you're using MSI Afterburner, EVGA Precision X1, or your card's overclocking software, reset everything to default. Core clock to 0 offset. Memory clock to 0 offset. Power limit to 100%. Then click Apply. If you're on a laptop with a factory overclocked GPU, you might need to underclock by -50 MHz on core and -100 MHz on memory to stabilize the boost. Do that in Afterburner.
  2. Delete the DirectX shader cache. Press Win+R, type %USERPROFILE%\AppData\Local\Temp, hit Enter. You'll see a folder called D3DSCache. Delete it. You can also rename it if you're nervous. Then restart your PC. When Battlefield 2042 launches next time, it will compile fresh shaders. This takes about 2-3 minutes. Let it finish completely before jumping into a match.
  3. Repair Easy Anti-Cheat. Open your Battlefield 2042 install folder. Usually C:\Program Files\EA Games\Battlefield 2042\EasyAntiCheat. Run EasyAntiCheat_Setup.exe. Select Battlefield 2042 from the dropdown and click "Repair Service." Wait for it to finish. Then close the tool.
  4. Clear the GPU driver shader cache. Press Win+R, type %USERPROFILE%\AppData\Local\NVIDIA Corporation\NV_Cache (for NVIDIA) or %USERPROFILE%\AppData\Local\AMD\DxCache (for AMD). Delete everything inside. Then restart. This is separate from the DirectX cache but I've seen it cause the same error.
  5. Disable in-game overlays. Turn off Discord overlay, GeForce Experience overlay, and Steam overlay (if you bought the game on Steam). Any overlay that hooks into DirectX 12 can cause conflicts. Test with all of them off.

What to expect after each step

After step 1, the error might still happen. That's normal — the shader cache is still corrupt. After step 2, you should see a "Compiling shaders" bar when you launch the game. Let it finish. If you crash during that compilation, repeat step 2 and do step 4 as well. After step 3, the game should feel stable. If you still crash, move to the alternative fixes.

Alternative fixes (if the main steps don't work)

  1. Clean install your GPU drivers. Use DDU (Display Driver Uninstaller) in Safe Mode. Boot into Safe Mode by holding Shift while clicking Restart in Windows. Once in Safe Mode, run DDU, select "Clean and restart." Then download the latest driver from NVIDIA or AMD. Install it fresh. Don't install GeForce Experience. Keep the driver clean.
  2. Lower your graphics settings. Specifically, set Future Frame Rendering to Off. Set Mesh Quality to Medium. Turn off DLSS if you're using it. These settings reduce GPU load and can stabilize the card. It's a band-aid, but it works while you troubleshoot.
  3. Check your power supply. If your PSU is below 650W for a mid-range card (RTX 3060 or RX 6600) or below 850W for a high-end card (RTX 3080 or RX 6800 XT), you could be hitting power spikes. The GPU briefly draws more power than the PSU can deliver, and the driver resets. You can test this by running a stress test like FurMark and watching for crashes.
  4. Disable Hardware-accelerated GPU scheduling (HAGS). Go to Windows Settings > System > Display > Graphics > Change default graphics settings. Turn off "Hardware-accelerated GPU scheduling." Restart. This feature can cause instability with Battlefield 2042's engine on some driver versions.

Prevention tip

Once you've fixed the crash, keep your GPU at stock clocks while playing Battlefield 2042. The game is unusually sensitive to overclocks. If you want to overclock for other games, create separate profiles in Afterburner. Before launching Battlefield, switch to the stock profile. Also, after every major GPU driver update, manually delete the D3DSCache folder before you run the game. New drivers can invalidate old shader caches and cause this exact error. Deleting the cache preemptively avoids the headache.

Related Errors in Software – Games & Drivers
Fix Baldur's Gate 3 Keeps Crashing to Desktop on PC GPU Device Removed Fix 'GPU Device Removed' Crash in Halo Infinite on Windows 10/11 DirectX Error (6068) or (6065) Fix 'DirectX Error' in Call of Duty: Modern Warfare 2 (2022) Display driver igfx stopped responding ‘Graphics Driver Has Stopped Responding’ in Fortnite – Fixed

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.