Rare crashes in RenderGraphBuilder / FRDGBuilder / TRDGHandle

Hello there,

We have some crashes concerning RenderGraphBuilder reported by Sentry on our Shipping build.

The 4 different callstack we have are pointing to:

  • TRDGHandle<T>::operator< (RenderGraphDefinitions.h:366)
  • FRDGBuilder::GetReservedCommitSize (RenderGraphBuilder.h:974)
  • FRDGBuilder::FlushCullStack (RenderGraphBuilder.cpp:1304)
  • FRDGBuilder::AddPassDependency (RenderGraphBuilder.cpp:1152)

No information found on EPS, nor on the Unreal Github.

I’m not sure how to tackle it, so I was wondering if maybe these crashes are known and a fix is on the way ?

Thank you,

Thomas

Steps to Reproduce
No repro steps yet.

Hello,

5.6.1 has some fixes in these areas. If you are already on 5.6.1, for the first callstack it’s possible there is a race condition in FRDGBuilder::ProcessAsyncSetupQueue and this changelist may be relevant or help as guides to how fixes have been made in this area

CL#43813963 Replaced FPipe with explicit task chain as a speculative fix to async setup queue race.

Also possibly related:

[CL#44451049 Fixed crash in RDG due to external access subresource being null at [0].](https://github.com/EpicGames/UnrealEngine/commit/38428fa1bdfc27ff893dc5cfd0603807454bb040)

CL#50784410 Make GRDGAllowRHIAccess atomic to silence TSAN. Also moved pass bit to other async setup queue union where it’s accessed instead.

For Callstack #2, #3 and #4 we don’t have any known issues, they’re likely related and possibly CL#43813963 above may address these too. If you ever get a repro you could test with r.RDG.ParallelSetup=0.

Hope this helps!

Thank you Alex, I will check that asap !