FAnimInstanceProxy::UpdateAnimation_WithRoot crashes from GetSkelMeshComponent() returning null

Crash triggered from stopping a level sequence from end play in a component.

Sorry, here is the callstack, when checking no I don’t have a repro i thought it was asking about the project not just callstack/description

0x00007ffbf1e21197 UnrealEditor-Engine.dll!USkeletalMeshComponent::GetAnimInstance() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:3377]

0x00007ffbf16e4456 UnrealEditor-Engine.dll!FAnimInstanceProxy::UpdateAnimation_WithRoot() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Animation\AnimInstanceProxy.cpp:1356]

0x00007ffb969bac51 UnrealEditor-ControlRig.dll!FAnimNode_ControlRigInputPose::Update_AnyThread() [D:\dev\game\Engine\Plugins\Animation\ControlRig\Source\ControlRig\Private\Sequencer\ControlRigLayerInstanceProxy.cpp:450]

0x00007ffbf17ae6f3 UnrealEditor-Engine.dll!FPoseLinkBase::Update() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Animation\AnimNodeBase.cpp:342]

0x00007ffb968c0f9a UnrealEditor-ControlRig.dll!FAnimNode_ControlRigBase::Update_AnyThread() [D:\dev\game\Engine\Plugins\Animation\ControlRig\Source\ControlRig\Private\AnimNode_ControlRigBase.cpp:431]

0x00007ffbf16e45c0 UnrealEditor-Engine.dll!FAnimInstanceProxy::UpdateAnimation_WithRoot() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Animation\AnimInstanceProxy.cpp:1366]

0x00007ffbf16e2c3e UnrealEditor-Engine.dll!FAnimInstanceProxy::UpdateAnimation() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Animation\AnimInstanceProxy.cpp:1237]

0x00007ffbf16e35c0 UnrealEditor-Engine.dll!UAnimInstance::UpdateAnimation() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Animation\AnimInstance.cpp:665]

0x00007ffbf1e5f4a0 UnrealEditor-Engine.dll!USkeletalMeshComponent::TickAnimInstances() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:1627]

0x00007ffbf1e5f96d UnrealEditor-Engine.dll!USkeletalMeshComponent::TickAnimation() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Components\SkeletalMeshComponent.cpp:1581]

0x00007ffbe8b508ec UnrealEditor-MovieSceneTracks.dll!UE::MovieScene::FEvaluateSkeletalAnimations::EvaluateSkeletalAnimations() [D:\dev\game\Engine\Source\Runtime\MovieSceneTracks\Private\Systems\MovieSceneSkeletalAnimationSystem.cpp:577]

0x00007ffbe8b8b804 UnrealEditor-MovieSceneTracks.dll!UE::MovieScene::FEvaluateSkeletalAnimations::Run() [D:\dev\game\Engine\Source\Runtime\MovieSceneTracks\Private\Systems\MovieSceneSkeletalAnimationSystem.cpp:487]

0x00007ffbf0ac69a3 UnrealEditor-MovieScene.dll!UE::MovieScene::FScheduledTask::Run() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneTaskScheduler.cpp:101]

0x00007ffbf0ab13cf UnrealEditor-MovieScene.dll!UE::MovieScene::FEntitySystemScheduler::PrerequisiteCompleted() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneTaskScheduler.cpp:625]

0x00007ffbf0a8173a UnrealEditor-MovieScene.dll!UE::MovieScene::FEntitySystemScheduler::CompleteTask() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneTaskScheduler.cpp:585]

0x00007ffbf0ac6bd5 UnrealEditor-MovieScene.dll!UE::MovieScene::FScheduledTask::Run() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneTaskScheduler.cpp:160]

0x00007ffbf0a919c9 UnrealEditor-MovieScene.dll!UE::MovieScene::FEntitySystemScheduler::ExecuteTasks() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneTaskScheduler.cpp:502]

0x00007ffbf0a027a3 UnrealEditor-MovieScene.dll!FMovieSceneEntitySystemRunner::GameThread_EvaluationPhase() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneEntitySystemRunner.cpp:1080]

0x00007ffbf09fef7a UnrealEditor-MovieScene.dll!FMovieSceneEntitySystemRunner::FlushNext() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneEntitySystemRunner.cpp:375]

0x00007ffbf09ff2ab UnrealEditor-MovieScene.dll!FMovieSceneEntitySystemRunner::FlushOutstanding() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\EntitySystem\MovieSceneEntitySystemRunner.cpp:512]

0x00007ffbf0b5dedc UnrealEditor-MovieScene.dll!UMovieSceneSequencePlayer::StopInternal() [D:\dev\game\Engine\Source\Runtime\MovieScene\Private\MovieSceneSequencePlayer.cpp:564]

… some bp component logic calling Stop on the player

0x00007ffbf14f3a35 UnrealEditor-Engine.dll!AActor::EndPlay() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Actor.cpp:2849]

0x00007ffbf1538f68 UnrealEditor-Engine.dll!AActor::RouteEndPlay() [D:\dev\game\Engine\Source\Runtime\Engine\Private\Actor.cpp:2796]

0x00007ffbf3774bf8 UnrealEditor-Engine.dll!UWorld::EndPlay() [D:\dev\game\Engine\Source\Runtime\Engine\Private\World.cpp:5468]

0x00007ffbf7ed9748 UnrealEditor-UnrealEd.dll!UEditorEngine::TeardownPlaySession() [D:\dev\game\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:861]

0x00007ffbf7e8d91b UnrealEditor-UnrealEd.dll!UEditorEngine::EndPlayMap() [D:\dev\game\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp:344]

0x00007ffbf7759333 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\dev\game\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:2473]

0x00007ffbf83cf1a6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\dev\game\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:550]

0x000001d30000c5bf UnrealEditor-gameEditor.dll!UgameEditorEngine::Tick() [D:\dev\game\game\Source\gameEditor\gameEditorEngine.cpp:28]

0x00007ff7b020693f UnrealEditor.exe!FEngineLoop::Tick() [D:\dev\game\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5877]

0x00007ff7b0225a9c UnrealEditor.exe!GuardedMain() [D:\dev\game\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]

0x00007ff7b0225b8a UnrealEditor.exe!GuardedMainWrapper() [D:\dev\game\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:123]

0x00007ff7b02293f4 UnrealEditor.exe!LaunchWindowsStartup() [D:\dev\game\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:277]

0x00007ff7b023be24 UnrealEditor.exe!WinMain() [D:\dev\game\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:317]

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

basically we’re calling stop on a Movie Sequence player during end play, and because the skel mesh has been cleared. We’re early outing in the update root scope if GetSkelMeshComponent() is null, but we get some ensures indicating this isn’t really expected. So wanted to check if there was a better fix.

Hi, yeah it sounds like we are missing at least one check higher in the callstack that the component is valid. I would also try adding a check in FEvaluateSkeletalAnimations::EvaluateSkeletalAnimations to make sure that the component is registered by expanding the validity check that we already have there:

`void EvaluateSkeletalAnimations(USkeletalMeshComponent* SkeletalMeshComponent, const FBoundObjectActiveSkeletalAnimations& InSkeletalAnimations) const
{
ensureMsgf(SkeletalMeshComponent, TEXT(“Attempting to evaluate an Animation track with a null object.”));

if (!SkeletalMeshComponent || !SkeletalMeshComponent->IsRegistered() || !SkeletalMeshComponent->GetSkeletalMeshAsset())
{
return;
}`If that does catch the issue, I can integrate that change.