5.8.3 enable HDR crash

Summary

5.8.3 crashes when enabling HDR

What Type of Bug are you experiencing?

AI

Steps to Reproduce

When running a development build, input r.HDR.EnableHDROutput 1 to the console. However, i think it crashes in editor or standalone too.

Expected Result

HDR works with r.HDR.Display.ColorGamut correctly and does not crash

Observed Result

Immediate crash

Affects Versions

5.8

Platform(s)

Windows

For crash reports, include your callstack

LoginId:f3947bec450d0484acaf24a43e42d782
EpicAccountId:6bd93f561cbc49459bf90735a83a3782

Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Private\PipelineStateCache.cpp] [Line: 712]
Shader compilation failures are Fatal.

UnrealEditor_RHI!HandlePipelineCreationFailure() [D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Private\PipelineStateCache.cpp:712]
UnrealEditor_RHI!FCompileGraphicsPipelineStateTask::CompilePSOInternal() [D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Private\PipelineStateCache.cpp:3937]
UnrealEditor_RHI!TCompilePipelineStateTaskBase<FCompileGraphicsPipelineStateTask,FGraphicsPipelineStateInitializer>::CompilePSO() [D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Private\PipelineStateCache.cpp:3773]
UnrealEditor_RHI!TGraphTask::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:703]
UnrealEditor_RHI!UE::Tasks::Private::FTaskBase::TryExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:524]
UnrealEditor_RHI!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask * __cdecl(bool),48>::TTaskDelegateImpl<LowLevelTasks::FTask::Init<UE::Tasks::Private::FTaskBase::Init’::2'::<lambda_1> >'::15’::<lambda_1>,0>::CallAndMove() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\TaskDelegate.h:171]
UnrealEditor_Core!LowLevelTasks::FTask::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\Fundamental\Task.h:623]
UnrealEditor_Core!LowLevelTasks::FScheduler::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:403]
UnrealEditor_Core!LowLevelTasks::FScheduler::WorkerLoop() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:802]
UnrealEditor_Core!LowLevelTasks::FScheduler::CreateWorker'::2’::<lambda_1>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\Fundamental\Scheduler.cpp:223]
UnrealEditor_Core!FThreadImpl::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\Thread.cpp:69]
UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:167]

Additional Notes

windows DX12, SteamOS share the same behavior

Hello there @BlueDiamond87!

Checking through your crash log, the issue seems to happen while the engine prepares a shader for drawing. Then, turning on HDR changes the final output, the engine requests shader versions that are not there, and the whole thing fails to compile. Please check the following:

  • Open your latest log in Saved/Logs and look for the lines right before the fatal error. There should be a shader compile error naming the shader, and the reason it failed

  • Clear your cache, by going to your project’s main directory, and deleting folders Saved, Intermediate, and DerivedDataCache, which will clear up any stale shader in your build

  • Instead of setting r.HDR.EnableHDROutput directly, try the “Enable HDR Display Output” node

  • As an isolated test, create an empty project , and experiment with HDR, too see if the issue is general, or contained in your own project