If a widget has playing animation node in finished animation event, calling StopAllAnimations appends a new UMGSequncePlayer to ActiveSequencePlayers array during array iteration and cause ensure condition failed.
Copying ActiveSequencePlayers into a temporary array works as a simple workaround.
void UUserWidget::StopAllAnimations() { bStoppingAllAnimations = true; TArray<UUMGSequencePlayer*> TemporaryArray = ActiveSequencePlayers; for (UUMGSequencePlayer* FoundPlayer : TemporaryArray) { if (FoundPlayer->GetPlaybackStatus() == EMovieScenePlayerStatus::Playing) { FoundPlayer->Stop(); } } bStoppingAllAnimations = false; UpdateCanTick(); }
Result:
Ensure condition failed
// code placeholder === Handled ensure: ===Ensure condition failed: Lhs.CurrentNum == Lhs.InitialNum [File:C:\UE4_243DA\UE4\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 207] Array has changed during ranged-for iteration!
UE4Editor-UMG.dll!DispatchCheckVerify<bool,<lambda_c77323095a651dd7a69754f0cbb9655f> >() [c:\ue4_243da\ue4\engine\source\runtime\core\public\misc\assertionmacros.h:167]
UE4Editor-UMG.dll!UUserWidget::StopAllAnimations() [c:\ue4_243da\ue4\engine\source\runtime\umg\private\userwidget.cpp:725]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4907]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:927]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!UObject::ProcessContextOpcode() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2792]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void *)>() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:828]
UE4Editor-CoreUObject.dll!ProcessLocalFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1056]
UE4Editor-CoreUObject.dll!ProcessLocalScriptFunction() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:997]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1081]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4907]
UE4Editor-CoreUObject.dll!UObject::ProcessEvent() [c:\ue4_243da\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1912]
UE4Editor-Engine.dll!AActor::ProcessEvent() [c:\ue4_243da\ue4\engine\source\runtime\engine\private\actor.cpp:795]
...
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-103868 in the post.
0 |
Component | UE - Editor - UI Systems |
---|---|
Affects Versions | 4.24, 4.25 |
Target Fix | 4.26.1 |
Created | Dec 1, 2020 |
---|---|
Resolved | Dec 7, 2020 |
Updated | Apr 27, 2021 |