Description

Cash when entering Path Tracing view mode if r.Decal.NormalReprojectionEnabled true

The licensee has reported:
This crash happens because the DeferredShadingRenderer tries to extract the normal GBuffer target for the next frame.
There is a check bUseGBuffer to make sure that the GBuffer is used, but that value is true in the Path Tracing view mode.
The easiest fix is to change this line, to check bRenderDeferredLighting instead: https://github.com/EpicGames/UnrealEngine/blob/2d53fcab0066b1f16dd956b227720841cad0f6f7/Engine/Source/Runtime/Renderer/Private/DeferredShadingRenderer.cpp#L2555

In DeferredShadingRenderer.cpp, change if (bUseGBuffer) in line 2555 to if (bRenderDeferredLighting)
I've tested the fix and it works.

I've tested on 5.5 and 5.7 - it crashes on both versions.  CL42031367

Steps to Reproduce

Create a blank Game project.
Make sure that ray tracing and path tracing is toggled on in project settings (on by default on 5.5)
Enter Console Command: r.Decal.NormalReprojectionEnabled true
In the Viewport, go to View Mode - set Path Tracing

Expected result: should work normally
Actual result: the Editor Crashes

Callstack

> [Inline Frame] UnrealEditor-RenderCore.dll!FRDGUserValidation::ValidateExtractResource(FRDGViewableResource *) Line 505 C++
UnrealEditor-RenderCore.dll!FRDGUserValidation::ValidateExtractTexture(FRDGTexture * Texture, TRefCountPtr<IPooledRenderTarget> * OutTexturePtr) Line 486 C++
UnrealEditor-RenderCore.dll!FRDGBuilder::QueueTextureExtraction(FRDGTexture * Texture, TRefCountPtr<IPooledRenderTarget> * OutTexturePtr, ERDGResourceExtractionFlags Flags) Line 442 C++
UnrealEditor-Renderer.dll!ExtractNormalsForNextFrameReprojection(FRDGBuilder & GraphBuilder, const FSceneTextures & SceneTextures, const TArray<FViewInfo,TSizedDefaultAllocator<32>> & Views) Line 819 C++
UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRDGBuilder & GraphBuilder) Line 2562 C++
UnrealEditor-Renderer.dll!RenderViewFamilies_RenderThread(FRHICommandListImmediate & RHICmdList, const TArray<FSceneRenderer *,TSizedDefaultAllocator<32>> & SceneRenderers) Line 5431 C++
UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamilies::__l96::<lambda_3>::operator()(FRHICommandListImmediate & RHICmdList) Line 5734 C++
[Inline Frame] UnrealEditor-RenderCore.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(FRHICommandListImmediate &)>::operator()(FRHICommandListImmediate &) Line 470 C++
UnrealEditor-RenderCore.dll!FRenderThreadCommandPipe::EnqueueAndLaunch::__l5::<lambda_1>::operator()() Line 1541 C++
[Inline Frame] UnrealEditor-RenderCore.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(void)>::operator()() Line 470 C++
[Inline Frame] UnrealEditor-RenderCore.dll!TFunctionGraphTaskImpl<void __cdecl(void),1>::DoTaskImpl(TUniqueFunction<void __cdecl(void)> & Function, ENamedThreads::Type) Line 1710 C++
[Inline Frame] UnrealEditor-RenderCore.dll!TFunctionGraphTaskImpl<void __cdecl(void),1>::DoTask(ENamedThreads::Type) Line 1703 C++
UnrealEditor-RenderCore.dll!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),1>>::ExecuteTask() Line 634 C++
UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 504 C++
[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 482 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 668 C++
UnrealEditor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 317 C++
UnrealEditor-RenderCore.dll!FRenderingThread::Run() Line 470 C++
UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 159 C++
UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 71 C++
[External Code]

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Graphics Features - Path Tracer
Affects Versions5.55.7
Target Fix5.7
Fix Commit43034445
CreatedMay 16, 2025
ResolvedMay 28, 2025
UpdatedMay 30, 2025
View Jira Issue