Niagara Scalability Crash When Processing Significance

Hi Justin,

Sorry about the extended delay. I’ve been trying to reproduce the issue you described, but so far without success. For this to be actionable by Epic devs, it would be best to find how to repro the problem consistently.

I have attached the current version of my test project. Would it be possible for you to take a look at it and see if there are any steps I missed when trying to repro? I am spawning one system per tick at 120 fps. Each system spawns a burst of particles that last about 0.25 seconds, so I expect to have about 30 live systems at any given time. The scalability settings in my Effect Type are limiting the number of instances to 30 and using age for relevance, so that systems are dying at about the same time when the scalability manager would try to cull them. I’ve also tried several different variations on those numbers.

When inspecting the code and testing with breakpoints, I could also not find an obvious situation where FNiagaraScalabilityManager::UnregisterAt() would be called while iterating on the Context.SignificanceIndices array inside function FNiagaraScalabilityManager::ProcessSignificance(). Since you seem to be comfortable making changes to the engine source code, maybe you could set a flag while that loop is iterating, break when a component is unregistered while that flag is set, and send over the callstack at that time?

Best regards,

Vitor