Crash in FRecordUpdateRayTracingGeometryListener on PC

Hi,

We hit two different crashes inside FRecordUpdateRayTracingGeometryListener.

1st callstack is

FD3D12RayTracingShaderBindingTableInternal::FRecordUpdateRayTracingGeometryListener::RemoveListener E:\dev\main\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp (1921) 
FD3D12RayTracingGeometry::~FD3D12RayTracingGeometry E:\dev\main\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp (3854) 
FD3D12RayTracingGeometry::`scalar deleting destructor'   
FRHICommandListExecutor::FSubmitState::Submit E:\dev\main\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp (1246) 
``FRHICommandListExecutor::Submit'::`36'::<...>::operator E:\dev\main\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp (1468) 
FRHICommandListExecutor::FTaskPipe::Execute E:\dev\main\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp (725) 


2nd callstack is

FD3D12RayTracingShaderBindingTableInternal::FRecordUpdateRayTracingGeometryListener::HitGroupParametersUpdated E:\dev\main\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp (1929) 
FD3D12RayTracingGeometry::SetupHitGroupSystemParameters E:\dev\main\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp (4102) 
FD3D12RayTracingGeometry::Swap E:\dev\main\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp (3774) 
`FD3D12DynamicRHI::RHIReplaceResources'::`2'::<...>::operator E:\dev\main\Engine\Source\Runtime\D3D12RHI\Private\D3D12Resources.cpp (1799) 
TRHILambdaCommandMultiPipe<...>::ExecuteAndDestruct E:\dev\main\Engine\Source\Runtime\RHI\Public\RHICommandList.inl (285) 
FRHICommandListBase::Execute E:\dev\main\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp (524) 
 

These crashes are very hard to reproduce (about once per day). In both crashes, the ShaderTable was NULL.

virtual void RemoveListener(FD3D12RayTracingGeometry* InGeometry) final override
{
	check(Geometry == InGeometry);
	ShaderTable->RemoveUpdateRayTracingGeometryListener(RecordIndex, this); // <<----
}

virtual void HitGroupParametersUpdated(FD3D12RayTracingGeometry* InGeometry) final override
{
	check(InGeometry == Geometry);

	uint32 GPUIndex = ShaderTable->Device->GetGPUIndex();   // <<----

Is this crash a known issue?

To avoid the crash, we added an early return if ShaderTable is null in the code listed above. Is there any potential concern about our local fix?

virtual void RemoveListener(FD3D12RayTracingGeometry* InGeometry) final override
{
	check(Geometry == InGeometry);
	if (ShaderTable == nullptr) return; <<++++++
	ShaderTable->RemoveUpdateRayTracingGeometryListener(RecordIndex, this);
}

virtual void HitGroupParametersUpdated(FD3D12RayTracingGeometry* InGeometry) final override
{
	check(InGeometry == Geometry);
	if (ShaderTable == nullptr) return; <<++++++

Thanks,

Yichen Wang

[Attachment Removed]

Hello,

We have a fix for a crash with a similar call stack to the first one in UE 5.7

[CL#45363875 [RayTracing]* Remove call to FlushAllocationsToClear on SBT before setting the current bindings on the SBT because the clear call could flush pending clear ops which are still used this frame.](https://github.com/EpicGames/UnrealEngine/commit/934ff96651ebb15bb0dd848f7758759bd301d4f2)

Have you integrated this fix? We’re looking into the ShaderTable issue, but it’s possible the root cause is fixed by the above changelist.

[Attachment Removed]

Hello,

I just wanted to post a reminder that Epic will be on holiday break starting next week (Dec 22, 2025) and ending Jan 5, 2026 and there will be no responses from Epic on public or private tickets, though you may receive replies from the community on public tickets.

We wish you happy holidays!

[Attachment Removed]

Hi,

Thanks for quick reply. We are actively integrating UE 5.7.1 right now. We will verify the fix after engine upgrade is done.

Thanks.

[Attachment Removed]