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

This has now been fixed - we moved a bunch of things out of the BP’s on construct and into BeginPlay, but that still doesn’t make much sense as to why opening the Niagara System in editor first fixed the issue….

I am getting the same crash. It points to line 716 as well but lists this instead. To clarify this is NOT fixed. I am using the latest version of Unreal 5.6.1 and everytime I open up the main map of my game it crashes. I upgraded from 5.4.4 which had no issues with this map.

Has this been formerly documented as a bug if so is there any progress on the fix?

[2025.09.15-23.24.12:206][483]LogWindows: Error: appError called: Assertion failed: Pair != nullptr [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Map.h] [Line: 716]

Assertion failed: Pair != nullptr [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Map.h] [Line: 716]

UnrealEditor_Core
UnrealEditor_Niagara
UnrealEditor_Niagara
UnrealEditor_Niagara
UnrealEditor_Niagara
UnrealEditor_Niagara
UnrealEditor_Niagara
UnrealEditor_Niagara
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

I can also confirm that disabling Niagara GPU Particles allows me to open the map.

fx.NiagaraAllowGPUParticles 0

100% of the times without the above console command my map crashes. 100% of the time with the console command my map does not crash. Unfortunately the solution to open up the Niagara Particle Editor first before PIE is not possible as I have too many Niagara Systems for this work around to be viable.