When "r.CreateShadersOnLoad" is enabled, cooking will crash due to failure to create a shader.
This occurs on //UE5/Release-5.5, CL: 41545209 and //UE5/Release-5.6, CL: 45232827
1. Download the attached test project.
2. Confirm the Content directory is empty
3. Build the editor
4. Cook the project (".cook game windows" in ushell)
5. Observe the crash. If it does not crash, repeat step 4
6. At the bottom of DefaultEngine.ini, observe that "r.CreateShadersOnLoad" is set to "1"
7. Comment out this line
8. Repeat step 4
9. Observe no crash
> [Inline Frame] UnrealEditor-Core.dll!UE::Logging::Private::BasicFatalLog::__l2::<lambda>() Line 1103 C++
UnrealEditor-Core.dll!UE::Logging::Private::BasicFatalLog(const FLogCategoryBase & Category, const UE::Logging::Private::FStaticBasicLogRecord * Log, ...) Line 1103 C++
UnrealEditor-RenderCore.dll!FShaderMapResource_InlineCode::CreateRHIShaderOrCrash(int ShaderIndex, bool bRequired) Line 699 C++
UnrealEditor-RenderCore.dll!FShaderMapResource::CreateShaderOrCrash(int ShaderIndex, bool bRequired) Line 562 C++
[Inline Frame] UnrealEditor-RenderCore.dll!FShaderMapResource::GetShader(int) Line 406 C++
[Inline Frame] UnrealEditor-RenderCore.dll!FShaderMapResource::BeginCreateAllShaders::__l2::<lambda_1>::operator()(FRHICommandListImmediate &) Line 552 C++
[Inline Frame] UnrealEditor-RenderCore.dll!EnqueueUniqueRenderCommand(FShaderMapResource::BeginCreateAllShaders::__l2::<lambda_1> &&) Line 363 C++
[Inline Frame] UnrealEditor-RenderCore.dll!FRenderCommandPipe::Enqueue(FShaderMapResource::BeginCreateAllShaders::__l2::<lambda_1> &&) Line 482 C++
UnrealEditor-RenderCore.dll!FShaderMapResource::BeginCreateAllShaders() Line 547 C++
UnrealEditor-RenderCore.dll!FGlobalShaderMap::BeginCreateAllShaders() Line 615 C++
UnrealEditor-Engine.dll!CompileGlobalShaderMap(EShaderPlatform Platform, const ITargetPlatform * TargetPlatform, bool bRefreshShaderMap) Line 5253 C++
UnrealEditor-Engine.dll!BeginRecompileGlobalShaders(const TArray<FShaderType const *,TSizedDefaultAllocator<32>> & OutdatedShaderTypes, const TArray<FShaderPipelineType const *,TSizedDefaultAllocator<32>> & OutdatedShaderPipelineTypes, EShaderPlatform ShaderPlatform, const ITargetPlatform * TargetPlatform) Line 5438 C++
UnrealEditor-Engine.dll!CompileGlobalShaderMapForRemote(const TArray<FShaderType const *,TSizedDefaultAllocator<32>> & OutdatedShaderTypes, const TArray<FShaderPipelineType const *,TSizedDefaultAllocator<32>> & OutdatedShaderPipelineTypes, const EShaderPlatform ShaderPlatform, const ITargetPlatform * TargetPlatform, TArray<unsigned char,TSizedDefaultAllocator<32>> * OutArray) Line 238 C++
UnrealEditor-Engine.dll!RecompileShadersForRemote(FShaderRecompileData & Args, const FString & OutputDirectory) Line 441 C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::SaveGlobalShaderMapFiles(const TArrayView<ITargetPlatform const * const,int> & Platforms, ODSCRecompileCommand RecompileCommand) Line 9731 C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::BeginCookFinishShaderCodeLibrary(FBeginCookContext & BeginContext) Line 9935 C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::StartCookByTheBook(const UCookOnTheFlyServer::FCookByTheBookStartupOptions & CookByTheBookStartupOptions) Line 11937 C++
UnrealEditor-UnrealEd.dll!UCookCommandlet::RunCookByTheBookCook(UCookOnTheFlyServer * CookOnTheFlyServer, void * StartupOptionsAsVoid, ECookByTheBookOptions CookOptions) Line 587 C++
UnrealEditor-UnrealEd.dll!UCookCommandlet::CookByTheBook(const TArray<ITargetPlatform *,TSizedDefaultAllocator<32>> & Platforms) Line 547 C++
UnrealEditor-UnrealEd.dll!UCookCommandlet::Main(const FString & CmdLineParams) Line 267 C++
UnrealEditor.exe!FEngineLoop::PreInitPostStartupScreen(const wchar_t * CmdLine) Line 4154 C++
[Inline Frame] UnrealEditor.exe!FEngineLoop::PreInit(const wchar_t *) Line 4444 C++
[Inline Frame] UnrealEditor.exe!EnginePreInit(const wchar_t *) Line 49 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 144 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 266 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 317 C++
[External Code]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-353152 in the post.
| 0 |
| Component | UE - Graphics Features |
|---|---|
| Affects Versions | 5.5, 5.6, 5.7 |
| Created | Nov 10, 2025 |
|---|---|
| Updated | Nov 10, 2025 |