5.6->5.8 started observing intermittent crashing from my Niagara system, possible race condition.

Summary

I upgraded from 5.6 to 5.8.2. I started experiencing crashes intermittently (~10% chance when loading a level) when “Open Level (by Name)” blueprint. I could only reproduce the crash in the packaged project and not in editor. Debug data I didn’t know quite how to read but was referencing something with Niagara system. I had a fireplace using deprecated module initialize particle, and snow that used a material. I tested seperately and found both of these could cause the crash, only in packaged project, no crashes in editor play.

Possibly race condition, I disabled auto play on the Niagara actors, and played with delay (2.0) in level blueprint and the crashing appears to be fixed (tried restarting the level 100 times with no crashing, when normally it would crash within 1-10 restarts).

What Type of Bug are you experiencing?

Rendering (Graphics / Niagara)

Steps to Reproduce

Haven’t tried to reproduce outside of my project yet.

Expected Result

n/a

Observed Result

Intermittent crashes from Niagara system

Affects Versions

5.8

Platform(s)

Windows

For crash reports, include your callstack

0:061> kp

Child-SP RetAddr Call Site

00 000000595067bf08 00007ffc8887c11f ntdll!NtWaitForSingleObject+0x14
01 000000595067bf10 00007ff72907a39f KERNELBASE!WaitForSingleObjectEx+0xaf
02 000000595067bfb0 00007ff72f051a8e BP_SantasWorkshop_Win64_Shipping!ReportCrash+0xef
03 000000595067bff0 00007ffc7968a9c0 BP_SantasWorkshop_Win64_Shipping!_guard_xfg_dispatch_icall_nop+0xce
04 000000595067c030 00007ffc8b1e4abf VCRUNTIME140!_C_specific_handler+0xa0
05 000000595067c0c0 00007ffc8b0c5e97 ntdll!_chkstk+0x9f
06 000000595067c0f0 00007ffc8b1e43fe ntdll!RtlLocateExtendedFeature+0x597
07 000000595067c840 00007ff729251345 ntdll!KiUserExceptionDispatcher+0x2e
08 000000595067cf70 00007ff7292426cb BP_SantasWorkshop_Win64_Shipping!FObjectInitializer::PostConstructInit+0x275
09 000000595067cfd0 00007ff729256b01 BP_SantasWorkshop_Win64_Shipping!FObjectInitializer::~FObjectInitializer+0x11b
0a 000000595067d010 00007ff729247ed3 BP_SantasWorkshop_Win64_Shipping!StaticConstructObject_Internal+0x131
0b 000000595067d330 00007ff72925576e BP_SantasWorkshop_Win64_Shipping!CreatePackage+0x453
0c 000000595067d880 00007ff72925a1db BP_SantasWorkshop_Win64_Shipping!ResolveName2+0x5ae
0d 000000595067e200 00007ff729259be6 BP_SantasWorkshop_Win64_Shipping!StaticLoadObjectInternal+0x16b
0e 000000595067e750 00007ff72922e320 BP_SantasWorkshop_Win64_Shipping!StaticLoadObject+0x96
0f 000000595067eec0 00007ff72a8259b7 BP_SantasWorkshop_Win64_Shipping!FSoftObjectPath::TryLoad+0x1b0
10 000000595067efb0 00007ff72a83c068 BP_SantasWorkshop_Win64_Shipping!FMaterialCachedExpressionData::FillParameterValueByIndex+0xf7
11 000000595067f010 00007ff72a84568c BP_SantasWorkshop_Win64_Shipping!UMaterialInstance::GetParameterValue+0x178
12 000000595067f170 00007ff72a845610 BP_SantasWorkshop_Win64_Shipping!UMaterialInstanceDynamic::SetTextureParameterValueByInfo+0x6c
13 000000595067f220 00007ff72c9a2320 BP_SantasWorkshop_Win64_Shipping!UMaterialInstanceDynamic::SetTextureParameterValue+0x20
14 000000595067f260 00007ff72c992ffd BP_SantasWorkshop_Win64_Shipping!FNiagaraRenderer::ProcessMaterialParameterBindings+0x770
15 000000595067f390 00007ff72c9d6e2e BP_SantasWorkshop_Win64_Shipping!FNiagaraRendererSprites::GenerateDynamicData+0x1ed
16 000000595067f3d0 00007ff72c9e520d BP_SantasWorkshop_Win64_Shipping!TMapBase<TTuple<FName,FName>,FNiagaraDataSet * __ptr64,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<TTuple<FName,FName>,FNiagaraDataSet * __ptr64,0> >::FindOrAddImpl<TTuple<FName,FName> >+0x40e
17 000000595067f440 00007ff72c84293b BP_SantasWorkshop_Win64_Shipping!FNiagaraSystemInstanceController::GenerateSetDynamicDataCommands+0x19d
18 000000595067f500 00007ff72a408fce BP_SantasWorkshop_Win64_Shipping!UNiagaraComponent::SendRenderDynamicData_Concurrent+0x27b
19 000000595067f6f0 00007ff72a7d93a1 BP_SantasWorkshop_Win64_Shipping!UActorComponent::DoDeferredRenderUpdates_Concurrent+0x6e
1a 000000595067f720 00007ff72a7dc608 BP_SantasWorkshop_Win64_Shipping!TSubclassOf::operator*+0x1631
1b 000000595067f860 00007ff728e9c4dc BP_SantasWorkshop_Win64_Shipping!ULevelStreaming::BroadcastLevelVisibleStatus+0x308
1c 000000595067f8b0 00007ff728eaa910 BP_SantasWorkshop_Win64_Shipping!LowLevelTasks::FTask::ExecuteTask+0x6c
1d 000000595067f930 00007ff728e958ea BP_SantasWorkshop_Win64_Shipping!LowLevelTasks::FScheduler::WorkerLoop+0x1c0
1e 000000595067f9d0 00007ff728f26034 BP_SantasWorkshop_Win64_Shipping!operator<<+0x1ba
1f 000000595067fa40 00007ff7290815d7 BP_SantasWorkshop_Win64_Shipping!FThreadImpl::Run+0x24
20 000000595067fa70 00007ff729080e2f BP_SantasWorkshop_Win64_Shipping!FRunnableThreadWin::Run+0x37
21 000000595067faa0 00007ffc8a72ccb7 BP_SantasWorkshop_Win64_Shipping!FRunnableThreadWin::GuardedRun+0x7f
22 000000595067fae0 00007ffc8b12ad6c kernel32!BaseThreadInitThunk+0x17
23 000000595067fb10 0000000000000000 ntdll!RtlUserThreadStart+0x2c

It seems like the issue may be related to activating multiple niagara actors at the same time. Hard to say as its intermittent, but since including a .5 second delay between activating the niagara actors I have not been able to reproduce a crash. Even with a long delay and activating 2 or more actors on the same frame, I was able to reproduce crashes.