TriggerMontageEndedEvent is calling RemoveAtSwap after the NotifyEnd callback which is not safe if the ActiveAninNotifyState array is modified by the callback.
WorkAround: Add a Delay node before calling DestroyActor. Licensee suggests "It might be safer to cache the array before iterating or somehow lock the array or block certain functions."
*Project has been attached for easier replication
Result: Editor crash.
Expected: Montage to play successfully, calling destroy actor at the notify end function.
LoginId:677a448d48352201d90930b796056d79 EpicAccountId:74cb1785c0a148f0a87ef74601ae977a Unhandled exception VCRUNTIME140 UE4Editor_Engine!UAnimInstance::TriggerMontageEndedEvent() [d:\ue4 monteue4main\engine\source\runtime\engine\private\animation\animinstance.cpp:1576] UE4Editor_Engine!UAnimInstance::TriggerQueuedMontageEvents() [d:\ue4 monteue4main\engine\source\runtime\engine\private\animation\animinstance.cpp:1602] UE4Editor_Engine!UAnimInstance::DispatchQueuedAnimEvents() [d:\ue4 monteue4main\engine\source\runtime\engine\private\animation\animinstance.cpp:553] UE4Editor_Engine!USkeletalMeshComponent::ConditionallyDispatchQueuedAnimEvents() [d:\ue4 monteue4main\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:1306] UE4Editor_Engine!USkeletalMeshComponent::FinalizeBoneTransform() [d:\ue4 monteue4main\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:3631] UE4Editor_Engine!USkeletalMeshComponent::FinalizeAnimationUpdate() [d:\ue4 monteue4main\engine\source\runtime\engine\private\physicsengine\physanim.cpp:394] UE4Editor_Engine!USkeletalMeshComponent::PostAnimEvaluation() [d:\ue4 monteue4main\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:2433] UE4Editor_Engine!USkeletalMeshComponent::CompleteParallelAnimationEvaluation() [d:\ue4 monteue4main\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:3522] UE4Editor_Engine!FParallelAnimationCompletionTask::DoTask() [d:\ue4 monteue4main\engine\source\runtime\engine\private\components\skeletalmeshcomponent.cpp:151] UE4Editor_Engine!TGraphTask<FParallelAnimationCompletionTask>::ExecuteTask() [d:\ue4 monteue4main\engine\source\runtime\core\public\async\taskgraphinterfaces.h:847] UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\ue4 monteue4main\engine\source\runtime\core\private\async\taskgraph.cpp:685] UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\ue4 monteue4main\engine\source\runtime\core\private\async\taskgraph.cpp:582] UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\ue4 monteue4main\engine\source\runtime\core\private\async\taskgraph.cpp:1457] UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\ue4 monteue4main\engine\source\runtime\engine\private\ticktaskmanager.cpp:557] UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\ue4 monteue4main\engine\source\runtime\engine\private\ticktaskmanager.cpp:1518] UE4Editor_Engine!UWorld::RunTickGroup() [d:\ue4 monteue4main\engine\source\runtime\engine\private\leveltick.cpp:789] UE4Editor_Engine!UWorld::Tick() [d:\ue4 monteue4main\engine\source\runtime\engine\private\leveltick.cpp:1595] UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\editorengine.cpp:1618] UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\unrealedengine.cpp:403] UE4Editor_Win64_DebugGame!FEngineLoop::Tick() [d:\ue4 monteue4main\engine\source\runtime\launch\private\launchengineloop.cpp:4207] UE4Editor_Win64_DebugGame!GuardedMain() [d:\ue4 monteue4main\engine\source\runtime\launch\private\launch.cpp:173] UE4Editor_Win64_DebugGame!GuardedMainWrapper() [d:\ue4 monteue4main\engine\source\runtime\launch\private\windows\launchwindows.cpp:147] UE4Editor_Win64_DebugGame!WinMain() [d:\ue4 monteue4main\engine\source\runtime\launch\private\windows\launchwindows.cpp:277] UE4Editor_Win64_DebugGame!__scrt_common_main_seh() [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] kernel32 ntdll
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-74191 in the post.