# Random Ray Tracing Crashes in D3D12RHI 

**URL:** <https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666>\
**Category:** Rendering\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [October 14, 2025, 10:21am UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666 "2025-10-14T10:21:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 14, 2025, 10:21am UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/1 "2025-10-14T10:21:40Z")

</div>

Hi! We’re seeing random crashes on some hardware when using ray tracing, with the following stack traces:

```auto
Assertion failed: RecordData.State == FRecordData::EState::Persistent [File:C:\***\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp] [Line: 2190]
...
UnrealEditor_D3D12RHI!FD3D12RayTracingShaderBindingTableInternal::SetHitGroupGeometrySystemParameters()
...

```

and sometimes:

```auto
Assertion failed: RecordData.State != FRecordData::EState::Persistent || BindingType == ERayTracingLocalShaderBindingType::Transient [File:C:\***\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp] [Line: 2166]
...
UnrealEditor_D3D12RHI!FD3D12RayTracingShaderBindingTableInternal::SetHitGroupGeometrySystemParameters()
...

```

We couldn’t localize the issue or create a consistent repro case.

Do you have any suggestions on how to debug or fix this?

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [October 14, 2025, 3:08pm UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/2 "2025-10-14T15:08:06Z")

</div>

Hi,

I do see that we had a similar issue reported in 5.7 with a fix that may address the issue you’re seeing or help provide some clues.

[CL#45286001 [HWRT] Fix crash due to duplicate shader bindings.]([https://github.com/EpicGames/UnrealEngine/commit/875e926d6d828287ec16a862bfb6dbed74b9cc5c](https://github.com/EpicGames/UnrealEngine/commit/875e926d6d828287ec16a862bfb6dbed74b9cc5c))

In this particular case, it was due to duplicate shader bindings.

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [October 23, 2025, 10:24pm UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/3 "2025-10-23T22:24:50Z")

</div>

I was unable to find a similar fix for 5.6.1 but the code mentioned above which includes **FinishGatherVisibleShaderBindings** was added in [CL#45039770](https://github.com/EpicGames/UnrealEngine/commit/5b0d6249325c979ccfedd141ac655b2b48843485) and the method used to discover the crash was by bisecting the changes because the issue occurred fairly quickly after the breaking change was made. I’ve reached out to the team for further suggestions.

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [October 23, 2025, 10:39pm UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/4 "2025-10-23T22:39:33Z")

</div>

There’s another changelist in UE 5.7 that may fix this issue

[CL#45427462 [HWRT]]([https://github.com/EpicGames/UnrealEngine/commit/5cf4288d23ab4f5c5152a40d2999af0cf6ba98ec](https://github.com/EpicGames/UnrealEngine/commit/5cf4288d23ab4f5c5152a40d2999af0cf6ba98ec))

\* 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. Only flush clear after add & remove of primitive scene infos on RT timeline. Pending clears can be added by async stream in requests in between the building of the dirty bindings and the flush to RHI from RDG passes causing cleared data in the SBT and triggering validation errors and potentially missing entries in the SBT.

\* Also keep track of dirty records and clear dirty record when reallocated again before the clear was flushed (otherwise valid entries can be cleared)

However, backporting this changelist may be difficult because of the numerous changes to the system between 5.6 and 5.7.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 15, 2025, 8:44am UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/5 "2025-10-15T08:44:59Z")

</div>

We’re using version 5.6.1 (based on CL 43139311), and I couldn’t find any similar lines of code in this or other files.

Is there perhaps an equivalent or related fix available for this version? Thanks.

---

<div class="post-metadata">

**Author:** ![Tom\_LeFx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tom\_LeFx](https://forums.unrealengine.com/u/Tom_LeFx)\
**Post date:** [February 18, 2026, 2:16pm UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/6 "2026-02-18T14:16:48Z")

</div>

Is there any update to this situation? We are also encountering this bug fairly frequently in one of our recent projects and porting the whole thing to 5.7 is not exactly a solution we are able to pursuit. Has anyone succesfully backported the fixes and do they actually fix this issue?

We are on UE 5.6 (CL-44394996) btw - Thanks 🙂

---

<div class="post-metadata">

**Author:** ![hyperik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hyperik](https://forums.unrealengine.com/u/hyperik)\
**Post date:** [April 24, 2026, 10:03am UTC](https://forums.unrealengine.com/t/random-ray-tracing-crashes-in-d3d12rhi/2677666/7 "2026-04-24T10:03:04Z")

</div>

We have the same issue on 5.6.1 has there been any updates on this or workarounds?

Edit: Or have anyone upgraded to 5.7 and confirmed it’s indeed fixed?
