Crash in ConvertToExternalUniformBuffer

Hi Epic,

we have one rather frequent outstanding crash in the shipped game (5.4.4 + RHI Parallel Translate).

We can’t t get a repro locally from our QA, we only see a lot of dumps from out in the wild.

I pasted the callback. The error is 0xC0000005: Access violation reading location 0x0000000000000038

In the Shipping minidumps, everything is heavily inlined, there isn’t much to see and judging from the 0x38 offset, we’re accessing a null pointer. But I can’t see which member it might be.

I see in CL34146199, which was just after 5.4 and after the RHI Parallel Translate merge (which we got), that you removed/postponed the whole call to ConvertToExternalUniformBuffer which we’re crashing in. Could it potentially help? We have raytracing disabled.

Although, I fear it will be an out of memory situation, out of bounds, or a lifetime issue.

Thanks for any ideas, Pavel

aaaa

Not sure if the callstack got pasted right, so again here just in case:

[Inline Frame] FRDGBuilder::ConvertToExternalUniformBuffer::<lambda_7>::operator()(const FRDGParameter & Param) Line 0 C++

> FRDGParameterStruct::Enumerate<`lambda at .\Runtime\RenderCore\Private\RenderGraphBuilder.cpp:663:44’>(FRDGBuilder::ConvertToExternalUniformBuffer::<lambda_7> Function) Line 15 C++

[Inline Frame] FRDGBuilder::ConvertToExternalUniformBuffer(FRDGUniformBuffer * UniformBuffer) Line 663 C++

FSceneUniformBuffer::GetBuffer(FRDGBuilder & GraphBuilder) Line 216 C++

FInstanceCullingContext::BuildRenderingCommandsInternal(FRDGBuilder & GraphBuilder, const FGPUScene & GPUScene, FInstanceCullingContext::EAsyncProcessingMode AsyncProcessingMode, FInstanceCullingDrawParams * InstanceCullingDrawParams) Line 710 C++

[Inline Frame] FInstanceCullingContext::BuildRenderingCommands(FRDGBuilder & GraphBuilder, const FGPUScene & GPUScene, FInstanceCullingDrawParams * InstanceCullingDrawParams) Line 683 C++

[Inline Frame] FParallelMeshDrawCommandPass::BuildRenderingCommands(FRDGBuilder & GraphBuilder, const FGPUScene & GPUScene, FInstanceCullingDrawParams & OutInstanceCullingDrawParams) Line 0 C++

FDeferredShadingSceneRenderer::RenderPrePass::<lambda_0>::operator()(unsigned char DepthMeshPass) Line 521 C++

[Inline Frame] FDeferredShadingSceneRenderer::RenderPrePass(FRDGBuilder & GraphBuilder, TArrayView<FViewInfo,int> InViews, FRDGTexture * SceneDepthTexture, FInstanceCullingManager & InstanceCullingManager, FRDGTexture * * FirstStageDepthBuffer) Line 577 C++

FDeferredShadingSceneRenderer::Render::<lambda_8>::operator()<TArray<FViewInfo,TSizedDefaultAllocator<32>>,FDeferredShadingSceneRenderer::FNaniteBasePassVisibility,TArray<Nanite::FRasterResults,TSizedInlineAllocator<2,32,TSizedDefaultAllocator<32>>>,TArray<Nanite::FPackedView,TConcurrentLinearArrayAllocator<FSceneRenderingBlockAllocationTag>>>(TArray<FViewInfo,TSizedDefaultAllocator<32>> & InViews, FDeferredShadingSceneRenderer::FNaniteBasePassVisibility & InNaniteBasePassVisibility, TArray<Nanite::FRasterResults,TSizedInlineAllocator<2,32,TSizedDefaultAllocator<32>>> & NaniteRasterResults, TArray<Nanite::FPackedView,TConcurrentLinearArrayAllocator<FSceneRenderingBlockAllocationTag>> & PrimaryNaniteViews) Line 2062 C++

FDeferredShadingSceneRenderer::Render(FRDGBuilder & GraphBuilder) Line 2164 C++

[Inline Frame] RenderViewFamilies_RenderThread(FRHICommandListImmediate & RHICmdList, const TArray<FSceneRenderer *,TSizedDefaultAllocator<32>> & SceneRenderers) Line 4990 C++

FRendererModule::BeginRenderingViewFamilies::<lambda_31>::operator()(FRHICommandListImmediate & RHICmdList) Line 5280 C++

[Inline Frame] UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void (FRHICommandListImmediate &)>::operator()(FRHICommandListImmediate & Params) Line 555 C++

[Inline Frame] FRenderThreadCommandPipe::EnqueueAndLaunch::<lambda_84>::operator()() Line 1550 C++

[Inline Frame] Invoke(FRenderThreadCommandPipe::EnqueueAndLaunch::<lambda_84> & Func) Line 47 C++

UE::Core::Private::Function::TFunctionRefCaller<`lambda at .\Runtime\RenderCore\Private\RenderingThread.cpp:1537:123’,void ()>::Call(void * Obj) Line 405 C++

[Inline Frame] UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void ()>::operator()() Line 555 C++

[Inline Frame] TFunctionGraphTaskImpl<void (),1>::DoTaskImpl(TUniqueFunction<void ()> & Function, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 1733 C++

[Inline Frame] TFunctionGraphTaskImpl<void (),1>::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 1726 C++

TGraphTask<TFunctionGraphTaskImpl<void (),1>>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 1236 C++

[Inline Frame] FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 840 C++

[Inline Frame] FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 762 C++

FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 650 C++

RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 265 C++

FRenderingThread::Run() Line 417 C++

Hi Pavel,

Given the nature of your engine modifications, it is difficult for us to give you a totally accurate answer on whether or not the change you found will fix the particular crash you are running into. It looks like it is minimally invasive, so at this point, your best bet is to try the change out in your builds and see if it fixes your crash. I am sorry, but I do not have any better information for you now. Please let me know if you have any further questions.