Crashing when playing montage from animation graph

Hi,

I am getting a repeatable crash in UE4.10 when attempting to put a montage into my animation graph.

The animation graph appears as follows:

To duplicate this bug i did the following:

  1. create anim blueprint and add an animation state machine
  2. in one of those states add a Layered blend per bone node
  3. add an animation (not a montage!) to one of the two links into the Layered blend per bone node
  4. Click the animation, go into its properties, settings → sequence, choose a MONTAGE
  5. attempt to trigger the montage part of the animation blueprint in preview editor (in my case i clicked ‘play with sword’ which sets the boolean value allowing the state machine to enter this state shown in the screenshot)
  6. Editor crashes in UAnimSequenceBase::GetAnimationPose (pure virtual function), presumably because an animation pose and a montage are not compatible and montages don’t implement this method? Stacktrace below:

Stacktrace from VS2015 debugging under Development_Editor build:

>	UE4Editor-Engine.dll!UAnimSequenceBase::GetAnimationPose(FCompactPose & OutPose, FBlendedCurve & OutCurve, const FAnimExtractContext & ExtractionContext) Line 137	C++
 	UE4Editor-Engine.dll!FAnimNode_SequencePlayer::Evaluate(FPoseContext & Output) Line 63	C++
 	UE4Editor-Engine.dll!FPoseLink::Evaluate(FPoseContext & Output) Line 127	C++
 	UE4Editor-Engine.dll!FAnimNode_LayeredBoneBlend::Evaluate(FPoseContext & Output) Line 102	C++
 	UE4Editor-Engine.dll!FPoseLink::Evaluate(FPoseContext & Output) Line 127	C++
 	UE4Editor-Engine.dll!FPoseLink::Evaluate(FPoseContext & Output) Line 127	C++
 	UE4Editor-Engine.dll!FAnimNode_StateMachine::EvaluateState(int StateIndex, FPoseContext & Output) Line 890	C++
 	UE4Editor-Engine.dll!FAnimNode_StateMachine::EvaluateTransitionStandardBlend(FPoseContext & Output, FAnimationActiveTransitionEntry & Transition, bool bIntermediatePoseIsValid) Line 647	C++
 	UE4Editor-Engine.dll!FAnimNode_StateMachine::Evaluate(FPoseContext & Output) Line 594	C++
 	UE4Editor-Engine.dll!FPoseLink::Evaluate(FPoseContext & Output) Line 127	C++
 	UE4Editor-Engine.dll!UAnimInstance::EvaluateAnimation(FPoseContext & Output) Line 476	C++
 	UE4Editor-Engine.dll!USkeletalMeshComponent::EvaluateAnimation(const USkeletalMesh * InSkeletalMesh, UAnimInstance * InAnimInstance, TArray<FTransform,FDefaultAllocator> & OutLocalAtoms, TArray<FActiveVertexAnim,FDefaultAllocator> & OutVertexAnims, FVector & OutRootBoneTranslation, FBlendedCurve & OutCurve) Line 932	C++
 	UE4Editor-Engine.dll!USkeletalMeshComponent::PerformAnimationEvaluation(const USkeletalMesh * InSkeletalMesh, UAnimInstance * InAnimInstance, TArray<FTransform,FDefaultAllocator> & OutSpaceBases, TArray<FTransform,FDefaultAllocator> & OutLocalAtoms, TArray<FActiveVertexAnim,FDefaultAllocator> & OutVertexAnims, FVector & OutRootBoneTranslation, FBlendedCurve & OutCurve) Line 1004	C++
 	UE4Editor-Engine.dll!USkeletalMeshComponent::RefreshBoneTransforms(FActorComponentTickFunction * TickFunction) Line 1138	C++
 	UE4Editor-UnrealEd.dll!UDebugSkelMeshComponent::RefreshBoneTransforms(FActorComponentTickFunction * TickFunction) Line 432	C++
 	UE4Editor-Engine.dll!USkinnedMeshComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 463	C++
 	UE4Editor-Engine.dll!USkeletalMeshComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 600	C++
 	UE4Editor-UnrealEd.dll!UDebugSkelMeshComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) Line 728	C++
 	UE4Editor-Engine.dll!UActorComponent::ConditionalTickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction & ThisTickFunction) Line 1139	C++
 	UE4Editor-Engine.dll!FActorComponentTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 679	C++
 	UE4Editor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 141	C++
 	UE4Editor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 779	C++
 	UE4Editor-Core.dll!FTaskThread::ProcessTasks(int QueueIndex, bool bAllowStall) Line 539	C++
 	UE4Editor-Core.dll!FTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 340	C++
 	UE4Editor-Core.dll!FTaskGraphImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FGraphEvent>,TInlineAllocator<4,FDefaultAllocator> > & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 1140	C++
 	UE4Editor-Engine.dll!FTaskGraphInterface::WaitUntilTaskCompletes(const TRefCountPtr<FGraphEvent> & Task, ENamedThreads::Type CurrentThreadIfKnown) Line 212	C++
 	UE4Editor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 285	C++
 	UE4Editor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1206	C++
 	UE4Editor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 701	C++
 	UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1150	C++
 	UE4Editor-Persona.dll!FAnimationViewportClient::Tick(float DeltaSeconds) Line 752	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1407	C++
 	UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 361	C++
 	UE4Editor.exe!FEngineLoop::Tick() Line 2427	C++
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 142	C++
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 189	C++
 	UE4Editor.exe!__scrt_common_main_seh() Line 264	C++
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

Variables in use at time of crash:

ExtactionContext -> bExtractRootMotion <unable to read memory>
					CurrentTime <unable to read memory>

Thanks for your help!

I can confirm this crash, though I didn’t need to use a state machine (I think.) I thought it was just because we weren’t meant to use montages directly in anim bps!

My reasons for that were specifically dragging a montage from the animation list to the graph does not add it. Dragging a regular animation does. You then have to change it to a montage in the node properties, as Brain describes.

I’m also experiencing this issue. Any info on this ?

As TTaM said, we aren’t really supposed to be able to do this. I can only assume that the fix will be to hide the montages from the selection list shown in the screenshot and to the best of my knowledge they are still looking into this.

having the same issue, but I really would like to use a mantage inside the state machine, because this way I can do a specific test.

It looks to work if you use a slot node with the montage.

monage → slot → whatever that node is called that you plug everything into.

Yes, I know, but I want the montage to be played inside a machine state… but no problem :smiley:

Yes, use the slot node inside a state machine.

sorry, couldn´t find it =/

Hey braindigitalis,

Thanks for submitting this. I’ve reproduced it and entered it in our system as UE-25715. Just wanted to note that you’re not supposed to be able to enter a montage there anyways, so the likely solution will be to remove montages from that list.

-.