Niagara Crash 4.20.2 build - ENiagaraExecutionState::Active && InState

[2018.09.24-03.47.40:172][761]LogWindows: Error: === Critical error: ===
[2018.09.24-03.47.40:172][761]LogWindows: Error:
[2018.09.24-03.47.40:172][761]LogWindows: Error: Assertion failed: InState >= ENiagaraExecutionState::Active && InState < ENiagaraExecutionState::Num [File:D:\Build++UE4\Sync\Engine\Plugins\FX\Niagara\Source\Niagara\Private\NiagaraEmitterInstance.cpp] [Line: 1425]
[2018.09.24-03.47.40:172][761]LogWindows: Error:
[2018.09.24-03.47.40:172][761]LogWindows: Error:
[2018.09.24-03.47.40:172][761]LogWindows: Error:
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ffd9c1a3fb8 KERNELBASE.dll!UnknownFunction []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72f55d22c XD.exe!FWindowsErrorOutputDevice::Serialize() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72f2c658b XD.exe!FOutputDevice::LogfImpl() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72f259a18 XD.exe!FDebug::AssertFailed() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72eace68e XD.exe!FNiagaraEmitterInstance::SetExecutionState() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72eaf5cf6 XD.exe!FNiagaraSystemSimulation::Tick() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72eaf7cc4 XD.exe!FNiagaraWorldManager::Tick() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72eaa197e XD.exe!?ExecuteIfSafe@?$TBaseRawMethodDelegateInstance@$0A@VINiagaraModule@@$$A6AXPEAVUWorld@@W4ELevelTick@@anonymous_user_142fbdd5@Z$$V@@UEBA_NPEAVUWorld@@W4ELevelTick@@anonymous_user_142fbdd5@Z() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff7316acc62 XD.exe!TBaseMulticastDelegate<void,UWorld * __ptr64,enum ELevelTick,float>::Broadcast() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff7316df71a XD.exe!UWorld::Tick() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff7315420e9 XD.exe!UGameEngine::Tick() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72dea0a48 XD.exe!FEngineLoop::Tick() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72deb063c XD.exe!GuardedMain() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72deb069a XD.exe!GuardedMainWrapper() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff72debe1d6 XD.exe!WinMain() []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ff732eeb156 XD.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ffd9cc51fe4 KERNEL32.DLL!UnknownFunction []
[2018.09.24-03.47.40:172][761]LogWindows: Error: [Callstack] 0x00007ffd9f18ef91 ntdll.dll!UnknownFunction []
[2018.09.24-03.47.40:172][761]LogWindows: Error:
[2018.09.24-03.47.40:186][761]LogExit: Executing StaticShutdownAfterError
[2018.09.24-03.47.40:202][761]LogWindows: FPlatformMisc::RequestExit(1)
[2018.09.24-03.47.40:320][761]Log file closed, 09/24/18 11:47:40

Hello we’ve been experiencing unknown issue with Niagara. Any possible fix on this error? I saw fix on this already with preview 3 version notes, so I wonder why it is still occuring. Hoping for the response. Thanks!

Do you have a particular repro case or did this just happen once?

I dont have 100% repro case, it just happen randomly. But I have a feeling that it is connected with the weapon effects we have (like charging/reloading) that is driven by activate and deactivate states.

I have the same issue. Ours seems to happen with our weapons systems as well when a gun is rapidly fired.

We temporarily fixed this by modifying the source code, changing the exact line where it crashes. It is currently in Check condition, change it to If condition.

The only problem we encounter after the fix was if the Niagara system CompleteOnInactive is checked, some of the particles will not destroy properly. It will just loop infinitely in your level.
So make sure you uncheck those.

Fantastic information. Thank you very much. I read that in 4.21 they address some of these issues. I’ll probably wait for that to release, in the meantime we ended up just reducing the amount of niagara systems that are being spawned and that seems to have reduced the crashed by a lot. There’s still the odd case here in there, but stable enough to be able to continue working.

I’ve been able to reproduce this crash as well on 4.22.2. It definitely is triggered by Systems that get too large. It doesn’t seem to be a hard limit of number of emitters in the system, but rather related to the combined ‘size’ of the emitters within the system. That is to say I’ve gotten it to a point where I could add a relatively simple emitter to the system and it won’t crash, but if I added a large, more complex system, this crash would occur.

The easiest way to reproduce this bug is to simply create a new system, then just continually add emitter after emitter to the system. Eventually, the engine will crash. (You do have to wait for the effect to finish compiling and actually play before the crash will occur.)