Description

Compiling any material with r.ShaderCompiler.JobCache=0 causes ShaderCompileWorker to crash. Reproduction steps cause a crash during Editor startup, but this bug may affect other scenarios where materials are compiled.

Crash could not be reproduced in Release-5.4 CL38640384

Steps to Reproduce

1. Download attached test project
2. Set r.ShaderCompiler.JobCache=0 (i.e. via ConsoleVariables.ini or command line)
3. Open the attached project in the Editor
4. Observe Windows Message “ShaderCompileWorker” crashed with included callstack.

Callstack

Exception:
Assertion failed: IsValid() [Link Removed] [Line: 1082]

Callstack:
0x00007ff9e10d7504 ShaderCompileWorker-ShaderPreprocessor.dll!StbLoadFile() [D:\dev\Epic_UE5_5\Engine\Source\Developer\ShaderPreprocessor\Private\ShaderPreprocessor.cpp:249]
0x00007ff9e10decc6 ShaderCompileWorker-ShaderPreprocessor.dll!preprocess_file() [D:\dev\Epic_UE5_5\Engine\Source\Developer\ShaderPreprocessor\Private\stb_preprocess\preprocessor.c:5007]
0x00007ff9e10d4810 ShaderCompileWorker-ShaderPreprocessor.dll!PreprocessShader() [D:\dev\Epic_UE5_5\Engine\Source\Developer\ShaderPreprocessor\Private\ShaderPreprocessor.cpp:805]
0x00007ff93ed46279 ShaderCompileWorker-ShaderCompilerCommon.dll!UE::ShaderCompilerCommon::ExecuteShaderPreprocessingSteps() [D:\dev\Epic_UE5_5\Engine\Source\Developer\ShaderCompilerCommon\Private\ShaderCompilerCommon.cpp:2080]
0x00007ff93ed5e209 ShaderCompileWorker-ShaderCompilerCommon.dll!UE::ShaderCompilerCommon::FBaseShaderFormat::PreprocessShader() [D:\dev\Epic_UE5_5\Engine\Source\Developer\ShaderCompilerCommon\Private\ShaderCompilerCommon.cpp:2105]
0x00007ff924164121 ShaderCompileWorker-RenderCore.dll!FInternalShaderCompilerFunctions::PreprocessShaderInternal() [D:\dev\Epic_UE5_5\Engine\Source\Runtime\RenderCore\Private\ShaderCore.cpp:1562]
0x00007ff9241642c1 ShaderCompileWorker-RenderCore.dll!FInternalShaderCompilerFunctions::PreprocessShaderInternal() [D:\dev\Epic_UE5_5\Engine\Source\Runtime\RenderCore\Private\ShaderCore.cpp:1589]
0x00007ff92414a194 ShaderCompileWorker-RenderCore.dll!FInternalShaderCompilerFunctions::CompileShaderInternal() [D:\dev\Epic_UE5_5\Engine\Source\Runtime\RenderCore\Private\ShaderCore.cpp:1680]
0x00007ff924149efb ShaderCompileWorker-RenderCore.dll!CompileShader() [D:\dev\Epic_UE5_5\Engine\Source\Runtime\RenderCore\Private\ShaderCore.cpp:1799]
0x00007ff7164cec7a ShaderCompileWorker.exe!FWorkLoop::ProcessInputFromArchive() [D:\dev\Epic_UE5_5\Engine\Source\Programs\ShaderCompileWorker\Private\ShaderCompileWorker.cpp:695]
0x00007ff7164ca318 ShaderCompileWorker.exe!FWorkLoop::Loop() [D:\dev\Epic_UE5_5\Engine\Source\Programs\ShaderCompileWorker\Private\ShaderCompileWorker.cpp:286]
0x00007ff7164c7454 ShaderCompileWorker.exe!GuardedMain() [D:\dev\Epic_UE5_5\Engine\Source\Programs\ShaderCompileWorker\Private\ShaderCompileWorker.cpp:1211]
0x00007ff7164c76f8 ShaderCompileWorker.exe!GuardedMainWrapper() [D:\dev\Epic_UE5_5\Engine\Source\Programs\ShaderCompileWorker\Private\ShaderCompileWorker.cpp:1252]
0x00007ff7164d5e6b ShaderCompileWorker.exe!wmain() [D:\dev\Epic_UE5_5\Engine\Source\Programs\ShaderCompileWorker\Private\ShaderCompileWorker.cpp:1358]
0x00007ff7164d73cc ShaderCompileWorker.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
0x00007ffab8c7259d KERNEL32.DLL!UnknownFunction []
0x00007ffab946af38 ntdll.dll!UnknownFunction []

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-239035 in the post.

1
Login to Vote

Non-Issue
ComponentUE - Rendering Architecture - Shaders
Affects Versions5.5.15.55.5.2
Target Fix5.6
CreatedJan 15, 2025
ResolvedJan 16, 2025
UpdatedJan 17, 2025
View Jira Issue