100% crash rate with a niagara system on map/level load after migrating to 5.6

Since updating to 5.6, we suddenly have an issue when the engine tries to look up some shader parameters in the PerInstanceData_RenderThread TMap, the pair isn’t found so if continuing after the failing check there is a crash accessing that null instance data.

The call stack is as follows:

[Inline Frame] UnrealEditor-Niagara.dll!TMapBase<unsigned __int64,FNDIArrayInstanceData_RenderThread<FNiagaraPosition>,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<unsigned __int64,FNDIArrayInstanceData_RenderThread<FNiagaraPosition>,0>>::FindChecked(const unsigned __int64) Line 716	C++
 	UnrealEditor-Niagara.dll!FNDIArrayProxyImpl<FNiagaraPosition,UNiagaraDataInterfaceArrayPosition>::SetShaderParameters(INDIArrayProxyBase::FShaderParameters * ShaderParameters, unsigned __int64 SystemInstanceID) Line 1053	C++
 	UnrealEditor-Niagara.dll!FNiagaraGpuComputeDispatch::SetDataInterfaceParameters(FRDGBuilder & GraphBuilder, const FNiagaraGPUSystemTick & Tick, const FNiagaraComputeInstanceData & InstanceData, const TShaderRefBase<FNiagaraShader,FNiagaraShaderMapPointerTable> & ComputeShader, const FNiagaraSimStageData & SimStageData, const FNiagaraShaderScriptParametersMetadata & NiagaraShaderParametersMetadata, unsigned char * ParametersStructure) Line 2457	C++
 	UnrealEditor-Niagara.dll!FNiagaraGpuComputeDispatch::DispatchStage(FRDGBuilder & GraphBuilder, const FNiagaraGPUSystemTick & Tick, const FNiagaraComputeInstanceData & InstanceData, const FNiagaraSimStageData & SimStageData) Line 1698	C++
 	UnrealEditor-Niagara.dll!FNiagaraGpuComputeDispatch::ExecuteTicks(FRDGBuilder & GraphBuilder, TStridedView<FSceneView const ,int> Views, ENiagaraGpuComputeTickStage::Type TickStage) Line 1285	C++
 	UnrealEditor-Niagara.dll!FNiagaraGpuComputeDispatch::PostRenderOpaque(FRDGBuilder & GraphBuilder, TStridedView<FSceneView const ,int> Views, FSceneUniformBuffer & SceneUniformBuffer, bool bAllowGPUParticleUpdate) Line 2124	C++
 	UnrealEditor-Engine.dll!FFXSystemSet::PostRenderOpaque(FRDGBuilder & GraphBuilder, TStridedView<FSceneView const ,int> Views, FSceneUniformBuffer & SceneUniformBuffer, bool bAllowGPUParticleSceneUpdate) Line 219	C++
 	UnrealEditor-Renderer.dll!RenderOpaqueFX(FRDGBuilder & GraphBuilder, TStridedView<FSceneView const ,int> Views, FSceneUniformBuffer & SceneUniformBuffer, FFXSystemInterface * FXSystem, ERHIFeatureLevel::Type FeatureLevel, TRDGUniformBuffer<FSceneTextureUniformParameters> * SceneTexturesUniformBuffer) Line 541	C++
 	UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRDGBuilder & GraphBuilder, const FSceneRenderUpdateInputs * SceneUpdateInputs) Line 3216	C++
 	UnrealEditor-Renderer.dll!RenderViewFamily_RenderThread(FRDGBuilder & GraphBuilder, FSceneRenderer * Renderer, const FSceneRenderUpdateInputs * SceneUpdateInputs) Line 4825	C++
 	[Inline Frame] UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamilies::__l116::<lambda_4>::operator()(FRDGBuilder &) Line 5113	C++
 	UnrealEditor-Renderer.dll!`FRendererModule::BeginRenderingViewFamilies'::`116'::<lambda_4>::<lambda_invoker_cdecl>(FRDGBuilder & GraphBuilder, const FSceneRenderFunctionInputs & Inputs) Line 5115	C++

Looking for references to the PerInstanceData_RenderThread map, I can only see Find() being called on this but I can’t easily find where the Map has entries added to it.

We have several staff having this issue trying to get into our main map on our game. I have disabled GPU particles for the time being to work around this but we would like those gpu simulated particles working, of course.
Please ask me for any further details, and if you need this thread to be moved elsewhere please feel free to do so!
Thanks and kind regards in advance

Small updated: Enabled LogNiagara and in the log messages saw many messages about " InvalidateCompileResults" but resaved niagara emitters etc and looked at individual systems to get rid of these warnings, but we’re still getting this same consistent crash

EDIT - This is NOT Fixed! Well, it’s half fixed, but it’s very strange

For some reason, this will still crash with 100% repro rate UNLESS you open the Niagara system in editor first, close that window and then go into PIE

So this is very mysterious, and frustrating

1 Like