
Unreal Engine 5 Shader Cache Corruption Crash Fix (All Games)
Fix UE5 game crashes by clearing the corrupted DirectX shader cache. One script wipes all UE5, D3D, and per-game pipeline caches for Stalker 2, POE2, BF6, Avowed.
What is Unreal Engine 5 Shader Cache Corruption?
Unreal Engine 5 keeps three layers of shader cache to avoid recompiling pipeline state objects (PSOs) every launch: the DirectX Shader Cache maintained by Windows, the engine pipeline cache stored per game in %LOCALAPPDATA%\<GameName>\Saved\ShaderCache, and the per-game DDC (Derived Data Cache) in %LOCALAPPDATA%\<GameName>\Saved\DerivedDataCache. When any one layer holds stale or corrupted entries β most commonly after a GPU driver update, a Windows cumulative update, or a game patch β UE5 attempts to bind a PSO that no longer matches the current driver ABI and crashes with Fatal error! Unhandled Exception: EXCEPTION_ACCESS_VIOLATION or GPU Crash Dump Triggered.
Confirmed by June 2026 community reports across Stalker 2 (Heart of Chornobyl), Path of Exile 2, Silent Hill 2 Remake, Battlefield 6, Avowed, Clair Obscur: Expedition 33, and Senua's Saga: Hellblade II: clearing the full three-layer cache resolves roughly 90% of recurring "no clear cause" UE5 crashes. The catch is most online guides clear only one layer, which leaves the corrupted cache to regenerate from the remaining stale data. The script in step 3 below wipes all known UE5 cache paths atomically.
When does it occur?
- After installing a new Nvidia (581.x), AMD (Adrenalin 26.6.x), or Intel Arc driver
- After a Windows 11 cumulative update (KB5094126 in June 2026 is a frequent trigger)
- After a game receives a patch that changes shader permutations (POE2 June 2026 endgame, Stalker 2 patch 1.6)
- During cutscenes that trigger a new shader pipeline that wasn't precompiled
- On first launch after switching DirectX 12 to Vulkan or vice versa
- After moving the game install between drives (paths in cache become stale)
- When the cache disk is full or has bad sectors
Common causes
- Stale PSO entries in
%LOCALAPPDATA%\D3DSCachereferencing an older driver compiler - Engine pipeline cache (
*.upipelinecache,*.shk) corrupted by an interrupted shader compilation - Per-game DDC entries built against a different engine minor version
- Antivirus quarantining a freshly written shader during compilation (Defender SmartScreen, Norton, Bitdefender)
- Disk-full preventing the cache from completing a write, leaving a half-written file
- Wrong UE5 graphics RHI selected (DX12 vs Vulkan) producing an unusable cache
- Custom
Engine.inir.ShaderPipelineCache.StartupMode=0disabling the precache
Step-by-step fixes
- Close ALL UE5 games and the Epic / Steam launcher β caches stay locked while the process is running; deletion will silently fail and the file regenerates from stale data. Use Task Manager β Details to confirm no
*-Win64-Shipping.exeis alive. - Clear the Windows DirectX Shader Cache (clean way) β Right-click
This PCβ Properties β Storage β Temporary files β check DirectX Shader Cache β Remove files. Or run admin PowerShell:Remove-Item "$env:LOCALAPPDATA\D3DSCache\*" -Recurse -ForceandRemove-Item "$env:LOCALAPPDATA\NVIDIA\DXCache\*" -Recurse -ForceandRemove-Item "$env:LOCALAPPDATA\NVIDIA\GLCache\*" -Recurse -Force. - Run the universal UE5 cache-wipe batch script β paste into a new
.batfile and run as Administrator:
@echo off
echo Clearing UE5 shader caches...
del /q /s "%LOCALAPPDATA%\D3DSCache\*" 2>nul
del /q /s "%LOCALAPPDATA%\NVIDIA\DXCache\*" 2>nul
del /q /s "%LOCALAPPDATA%\NVIDIA\GLCache\*" 2>nul
del /q /s "%LOCALAPPDATA%\AMD\DxCache\*" 2>nul
for /d %%G in ("%LOCALAPPDATA%\*") do (
if exist "%%G\Saved\ShaderCache" rd /q /s "%%G\Saved\ShaderCache"
if exist "%%G\Saved\DerivedDataCache" rd /q /s "%%G\Saved\DerivedDataCache"
)
echo Done. Launch your UE5 game now and allow shader precompilation to finish.
pause- Verify the per-game cache paths got wiped β check
%LOCALAPPDATA%\<GameName>\Saved\(e.g.Stalker2,PathOfExile2,BF6,Avowed). TheShaderCacheandDerivedDataCachefolders should be either empty or absent. - Force the correct RHI β for each game, set the graphics API explicitly. POE2: launcher β Settings β Graphics β DirectX 12. Stalker 2: in-game Video β DX12. Avowed: Engine.ini β
[/Script/WindowsTargetPlatform.WindowsTargetSettings]βDefaultGraphicsRHI=DefaultGraphicsRHI_DX12. Wrong RHI generates an incompatible cache that crashes on first PSO bind. - Allow the precompile pass to complete β first launch after clearing will spend 2-15 minutes precompiling. Do NOT alt-tab or close. If the game has a "Precompiling shaders" splash (Avowed, Stalker 2), wait. Interrupting it leaves you back at step 1.
- Exclude the cache folders from antivirus real-time scanning β Windows Security β Virus & Threat Protection β Manage settings β Exclusions β add
%LOCALAPPDATA%\D3DSCache,%LOCALAPPDATA%\NVIDIA\DXCache, and each game'sSaved\ShaderCache. Real-time scanning can corrupt files mid-write during precompile. - Move the cache to a different drive if disk is full or failing β set the environment variable
UE_SHADER_CACHE_DIRto a path on a healthier drive (e.g.,D:\UE5Cache). System Properties β Environment Variables β System variables β New. UE5 will use this for the engine cache and stop fighting a saturated C: drive.
If it still doesn't work
If the crash returns after a successful precompile, the bad layer is upstream of the cache β your GPU driver is shipping a broken shader compiler. Check the [Nvidia RTX hotfix display stability fix](/en/errors/nvidia-rtx-hotfix-june-2026-display-stability-crash-fix) or roll back AMD Adrenalin to 25.12.1. If the precompile itself crashes, you're likely hitting the [Hardware-Accelerated GPU Scheduling crash wave](/en/errors/hardware-accelerated-gpu-scheduling-game-crashes-fix-june-2026) β disable HAGS, then re-run the cache wipe.
Game-specific symptoms after a clean cache: Path of Exile 2 still crashing on Vulkan boot β see [POE2 Vulkan crash startup fix](/en/errors/path-of-exile-2-vulkan-crash-startup-fix). Battlefield 6 still crashing to desktop with no code β see [BF6 crash to desktop](/en/errors/battlefield-6-crash-desktop-no-error-code). Avowed throwing Fatal Error! UE-Alabama β see [Avowed UE-Alabama fatal error](/en/errors/avowed-fatal-error-ue-alabama-crash-pc). Clair Obscur: Expedition 33 fatal error β see [Expedition 33 fatal error crash](/en/errors/clair-obscur-expedition-33-fatal-error-crash). Each of those has the title-specific follow-up steps that picking up from the shader-cache reset alone cannot fix.
Related errors
Fix Path of Exile 2 Vulkan crashes on startup and in-game. Switch renderer to DX12, clear shader cache, update GPU drivers, and resolve Dawn of the Hunt crash triggers.
Fix Avowed Fatal Error UE-Alabama crash on PC. Resolve DirectX 12 issues, shader compilation errors, and startup crashes in Obsidian's RPG.
Fix Battlefield 6 crashing to desktop with no error message. Javelin anti-cheat PCIe fix, Frame Generation crash, memory leak workaround, and overlay conflicts.
Fix the UE-Sandfall fatal error crash in Clair Obscur: Expedition 33 on PC. DirectX 11 switch, shader cache fix, overlay conflicts, and GPU driver solutions.
Fix Windows 11 Hardware-Accelerated GPU Scheduling crashes in Marvel Rivals, POE2, BF6, Forza 6, Civ 7, RE Requiem. Disable HAGS with one PowerShell script.