Description

When Slomo 2 is used to speed up the process, TicksToProcess is greater than 1, which means that ManualTick is called several times during one loop. 

When playback is completed by a ManualTick in that loop, UNiagaraComponent::OnSystemComplete is called. 

If AutoDestroy is enabled, SystemInstance is released. 

Since the value of TicksToProcess is greater than or equal to 0, the loop continues as it is. 

Null reference occurs because SystemInstance has been released.

More likely to crash with Slomo 10, etc.
Licensee responds by adding a null check for SystemInstance before ManualTick.

Steps to Reproduce

1. Open the project attached to UDN.
2. Open and PIE Untitled.umap.
3. Press the space bar to play Niagara.

The Niagara system is played in level BP with the following settings.

  • Solo mode
  • Frame playback with DesiredAge
  • Speeding up with Slomo 2, etc.
  • Enable AutoDestroy
  • GC every frame

This causes a crash because SystemInstance is null when UNiagaraComponent::TickComponent does ManualTick at the timing when NiagaraSystem finishes playing.

Callstack

Assertion failed: IsValid() [Link Removed] [Line: 1109]

UnrealEditor_Engine!FActorComponentTickFunction::ExecuteTickHelper<<lambda_10bf076617bb57090176fa6605386eb8> >() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Classes\GameFramework\Actor.h:4254]
UnrealEditor_Engine!FActorComponentTickFunction::ExecuteTick() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1108]
UnrealEditor_Engine!FTickFunctionTask::DoTask() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:275]
UnrealEditor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [D:\P4\UE5main\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1327]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\P4\UE5main\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:758]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\P4\UE5main\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:649]
UnrealEditor_Core!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [D:\P4\UE5main\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2123]
UnrealEditor_Engine!FTickTaskSequencer::ReleaseTickGroup() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:556]
UnrealEditor_Engine!FTickTaskManager::RunTickGroup() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1583]
UnrealEditor_Engine!UWorld::RunTickGroup() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:771]
UnrealEditor_Engine!UWorld::Tick() [D:\P4\UE5main\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1512]
UnrealEditor_UnrealEd!UEditorEngine::Tick() [D:\P4\UE5main\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:2002]
UnrealEditor_UnrealEd!UUnrealEdEngine::Tick() [D:\P4\UE5main\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:519]
UnrealEditor_Win64_DebugGame!FEngineLoop::Tick() [D:\P4\UE5main\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5812]
UnrealEditor_Win64_DebugGame!GuardedMain() [D:\P4\UE5main\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
UnrealEditor_Win64_DebugGame!GuardedMainWrapper() [D:\P4\UE5main\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
UnrealEditor_Win64_DebugGame!LaunchWindowsStartup() [D:\P4\UE5main\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
UnrealEditor_Win64_DebugGame!WinMain() [D:\P4\UE5main\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:284]
UnrealEditor_Win64_DebugGame!__scrt_common_main_seh() [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-181145 in the post.

0
Login to Vote

Fixed
ComponentUE - Niagara
Affects Versions4.27.25.15.2
Target Fix5.3
Fix Commit24827726
Main Commit24827726
CreatedMar 23, 2023
ResolvedMar 28, 2023
UpdatedJun 20, 2023