Summary
FParticlePerfStatsManager::AddListener(Listener) defaults to bReset=true and calls Reset() synchronously. Reset() only calls FlushRenderingCommands(), then empties WorldToPerfStats, SystemToPerfStats and ComponentToPerfStats, destroying the TUniquePtr<FParticlePerfStats> objects. It never waits for task-graph work. FNiagaraSystemInstanceFinalizeTask captures an FParticlePerfStatsContext (raw FParticlePerfStats*) in its constructor, so if a listener is added mid-tick (e.g. from an actor tick in the same tick group) the queued finalize task later writes through a freed pointer. Licensee ASan report: heap-use-after-free at NiagaraSystemSimulation.cpp (PARTICLE_PERF_STAT_CYCLES_GT(SystemPerfStatsContext, Finalize)), 24 bytes into a 216-byte FParticlePerfStats freed by Reset().
Affects: 5.8.0–5.8.4, //UE5/Main, //UE6/Main (no fix in Dev-Release-5.8/5.9 as of 2026-11-20).
Code (//UE5/Release-5.8 / Main)
Origin CLs: 14856409 (AddListener/Reset), 15653211 (raw-pointer context), 33495814 (finalize task captures context).
Fix direction
Workaround (confirmed in code): call AddListener(Listener, false); if a reset is needed, do it while Niagara is idle (not during a world tick).
ASanErrorCallback() FParticlePerfStatScope<`FNiagaraSystemInstanceFinalizeTask::DoTask'::`2'::FParticlePerfStatsWriterCycles_GameThread_Finalize>::~FParticlePerfStatScope<`FNiagaraSystemInstanceFinalizeTask::DoTask'::`2'::FParticlePerfStatsWriterCycles_GameThread_Finalize>() FNiagaraSystemInstanceFinalizeTask::DoTask() TGraphTask<FNiagaraSystemInstanceFinalizeTask>::ExecuteTask() UE::Tasks::Private::FTaskBase::TryExecuteTask() FNamedTaskThread::ProcessTasksNamedThread() FNamedTaskThread::ProcessTasksUntilIdle() FTaskGraphCompatibilityImplementation::ProcessUntilTasksComplete() FTickTaskSequencer::ReleaseTickGroup() FTickTaskManager::RunTickGroup() UWorld::RunTickGroup() UWorld::Tick() UGameEngine::Tick() FEngineLoop::Tick() GuardedMain() LaunchWindowsStartup()
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-416317 in the post.
| 0 |
| Component | UE - Rendering - Architecture - Niagara |
|---|---|
| Affects Versions | 5.8 |
| Target Fix | 5.9 |
| Fix Commit | 60940772 |
|---|
| Created | Nov 20, 2026 |
|---|---|
| Resolved | Nov 20, 2026 |
| Updated | Dec 4, 2026 |