Animation freeze when looping level sequence with animation default slot

Hi everyone, as I say in the repro step, i’m trying to play an animation in level sequence and play this sequence in loop in a map. in my repro step I describe a very simple setup but my goal here is to add life in my map by adding some character performing a looping action but I use animation slot because i still need some ABP animation system like look at or stuff like that. That’s why i can’t use force custom mode and i use slot instead. but the first loop play well the animation but then after a few loop it stop at a certain pose and after a random delay it play again for 1 or a few loop and then freezing again…

I try a lot of stuff like setup in “KeepState”, play the sequence at the begin play of a BP and bind to the end of the sequence to play it again etc.. but nothing works.

If you know what i can do it would help a lot thanks for your time.

Steps to Reproduce
Create a character

Create an Anim blueprint with this simple setup : Ref pose Mesh => DefaultSlot => OutputPose and add it to the mesh of the character.

[Image Removed]

In an empty level drop your character in.

Create a level sequence drop the same character in the sequence

add the CharacterMesh track

add an animation track to the character mesh

use any animation.

[Image Removed]

make sure the animation is setup with Default slot and with ForceCustomMode uncheck.

[Image Removed]

drag and drop your sequence in the level and set autoplay to true and loop indefinitely :

[Image Removed]

your animation should be play and loop but freeze at some time during multiple loop and then play again and so on.

Hey there,

This was fixed in the 5.5 update. I’m in the process of tracking down which CL it was to see if it’s something that can be easily cherry-picked.

Dustin

Hi Dustin, that would be so great thanks a lot!

Hi there,

Is there any news on this issue? I would be very interested to have the CL.

Thanks :slight_smile:

I’m sorry for the delay; there are quite a few CLs to search through to identify the issue.

Dustin

Hi again,

I’m sorry to be a bother but we really need this CL to fix this issue in our game. Any news on your part?

Best regards,

Alicia

Hey there,

Alright, so I’ve done a bunch of searching and testing different possible changes, as well as checking for a code workaround. And the unfortunate answer is that there were too many changes between 5.4 and 5.5 to really pinpoint what it might be. During this time, we refactored the Pre-Animated State handling in many ways and added Time Warping. These were significant changes, and any one of those things could have fixed the issue you’re seeing here. Here’s what I do know: something is preventing the animation system from generating a new instance ID for the montage (what we use under the hood to play sequence animations) when the sequence loops, but only sometimes.

That said, I do have a hacky workaround that you can use until you are able to update the engine. For any sequence that is set to loop, you can bind an event to “OnFinished” of the sequence player to play the level sequence again. For any sequence that is set to loop indefinitely, this works well; otherwise, you will also have to handle how many loops.

Apologies for the long delay. As mentioned before, there is a lot of work to go through and test out, or seek solutions around to backport.

Dustin

Ah finally found a CL that might address the issue.

https://github.com/EpicGames/UnrealEngine/commit/101bed5b89dec32c9eb71fb4fac796143299badc

Dustin

Thanks, we are currently implementing the changes I will test if it repro or not, Thanks again

Hi again! sorry to re-open this but we have an issue, the cl fix well the looping issue but we now have a build crash that can occure randomly and it seem pretty close of the fix here is the stack :

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 758]

Array index out of bounds: -1 into an array of size 1

0x00007ff60af572c6 Ego.exe!FAnimMontageInstance::Advance() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Animation\AnimMontage.cpp:2562]

0x00007ff60af9d6e9 Ego.exe!UAnimInstance::Montage_Advance() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Animation\AnimInstance.cpp:1865]

0x00007ff60afc435a Ego.exe!UAnimInstance::UpdateMontage() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Animation\AnimInstance.cpp:433]

0x00007ff60afc0693 Ego.exe!UAnimInstance::UpdateAnimation() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Animation\AnimInstance.cpp:577]

0x00007ff60b53f19f Ego.exe!USkeletalMeshComponent::TickAnimation() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:1418]

0x00007ff60b5406b6 Ego.exe!USkeletalMeshComponent::TickPose() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:1612]

0x00007ff60b5402f8 Ego.exe!USkinnedMeshComponent::TickComponent() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Components\SkinnedMeshComponent.cpp:1417]

0x00007ff60b53fe75 Ego.exe!USkeletalMeshComponent::TickComponent() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:1717]

0x00007ff610a22ca4 Ego.exe!USkeletalMeshComponentBudgeted::TickComponent() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Plugins\Runtime\AnimationBudgetAllocator\Source\AnimationBudgetAllocator\Private\SkeletalMeshComponentBudgeted.cpp:134]

0x00007ff60b2a34e7 Ego.exe!FActorComponentTickFunction::ExecuteTickHelper<`FActorComponentTickFunction::ExecuteTick’::`2’::<lambda_1> >() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Classes\GameFramework\Actor.h:4576]

0x00007ff60b38fdd4 Ego.exe!FActorComponentTickFunction::ExecuteTick() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1174]

0x00007ff60c5e3f6f Ego.exe!FTickFunctionTask::DoTask() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:276]

0x00007ff60c602d86 Ego.exe!TGraphTask<FTickFunctionTask>::ExecuteTask() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1238]

0x00007ff60547adca Ego.exe!FNamedTaskThread::ProcessTasksNamedThread() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:760]

0x00007ff60547b39e Ego.exe!FNamedTaskThread::ProcessTasksUntilQuit() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:651]

0x00007ff605485de3 Ego.exe!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2122]

0x00007ff60c65d705 Ego.exe!FTickTaskSequencer::ReleaseTickGroup() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:556]

0x00007ff60c66c0c2 Ego.exe!FTickTaskManager::RunTickGroup() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1583]

0x00007ff60ba9aeee Ego.exe!UWorld::RunTickGroup() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:772]

0x00007ff60baa6f1a Ego.exe!UWorld::Tick() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1528]

0x00007ff60b7f9cd9 Ego.exe!UGameEngine::Tick() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Engine\Private\GameEngine.cpp:1785]

0x00007ff60ce5a188 Ego.exe!FEngineLoop::Tick() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5921]

0x00007ff60ce7246c Ego.exe!GuardedMain() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Launch\Private\Launch.cpp:180]

0x00007ff60ce7253a Ego.exe!GuardedMainWrapper() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]

0x00007ff60ce75105 Ego.exe!LaunchWindowsStartup() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]

0x00007ff60ce85464 Ego.exe!WinMain() [R:\DXUnrealEngineGit54\DXUnrealEngine\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:299]

0x00007ff6128f59b6 Ego.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]

0x00007ff900b2e8d7 KERNEL32.DLL!UnknownFunction

here in the anim montage Advance methode : [Image Removed]It seems that the CurrentSectionIndex is higher than the array num, we will try to add security but we dont really know if it can cause an issue on animation, but if you have cl or any stuff with changes for that part we will be verry grateful!

thanks again and have a nice day

Yeah I think there is an additional CL that you can cherry pick:

https://github.com/EpicGames/UnrealEngine/commit/058e6700fd5a1b59adfb85823eb70ccfcab58a3d

Thank you, it seems to have resolved the issue!

yeah i can imagine thanks for your time