Description

Crash occurs when casting back to the pawn owner from the Anim Graph. In this case, it is being used for "Copy Pose from Mesh"

Workaround: Cast to Owner from Event Graph, defining variable as the Master Mesh. Then using that variable in the Anim Graph. (See other TestBP and AnimBP in attached project)


Error message:

Assertion failed: (Index >= 0) & (Index < ArrayNum) [Link Removed] [Line: 833] Array index out of bounds: 0 from an array of size 0

Source Context:

   50       if(Value && *Value!=INDEX_NONE)
   51       {
   52       const int32 SourceBoneIndex = *Value;
   53       const int32 ParentIndex = CurrentlyUsedSourceMeshComponent.Get()->SkeletalMesh->RefSkeleton.GetParentIndex(SourceBoneIndex);
   54       const FCompactPoseBoneIndex MyParentIndex = RequiredBones.GetParentBoneIndex(PoseBoneIndex);
   55       // only apply if I also have parent, otherwise, it should apply the space bases
   56       if (ParentIndex != INDEX_NONE && MyParentIndex != INDEX_NONE)
   57       {
   58       const FTransform& ParentTransform = CurrentlyUsedSourceMeshComponent.Get()->GetComponentSpaceTransforms()[ParentIndex];
   59       const FTransform& ChildTransform = CurrentlyUsedSourceMeshComponent.Get()->GetComponentSpaceTransforms()[SourceBoneIndex];
   60       OutPose[PoseBoneIndex] = ChildTransform.GetRelativeTransform(ParentTransform);
   61       }
   62       else
   63       {
   64 ***** OutPose[PoseBoneIndex] = CurrentlyUsedSourceMeshComponent.Get()->GetComponentSpaceTransforms()[SourceBoneIndex];
   65       }
   66       }
   67       }
   68       }
   69       }
   70       
   71       void FAnimNode_CopyPoseFromMesh::GatherDebugData(FNodeDebugData& DebugData)
   72       {
   73       }
   74       
   75       void FAnimNode_CopyPoseFromMesh::ReinitializeMeshComponent(FAnimInstanceProxy* AnimInstanceProxy)
   76       {
   77       CurrentlyUsedSourceMeshComponent = SourceMeshComponent;
   78       BoneMapToSource.Reset();
   79       if (SourceMeshComponent && SourceMeshComponent->SkeletalMesh && !SourceMeshComponent->IsPendingKill())

Most recent user affected CL: 3106830

Logs: [Link Removed]


CrashReporter User Descriptions:

  • EUS Matt.Williams - Cast to Owner from AnimBP Graph
Steps to Reproduce
  1. Open the attached project
  2. Open the "BadTestCharacter" BP in the content browser
  3. Select the "TestMesh" component
  4. In the details panel, set AnimClass to "BadAnimBP"

Result: Crash
Expected: AnimBP is assigned as expected

Callstack
UE4Editor_AnimGraphRuntime!FAnimNode_CopyPoseFromMesh::Evaluate() [animnode_copyposefrommesh.cpp:65]
UE4Editor_Engine!FPoseLink::Evaluate() [animnodebase.cpp:237]
UE4Editor_Engine!FAnimInstanceProxy::EvaluateAnimationNode() [animinstanceproxy.cpp:786]
UE4Editor_Engine!FAnimInstanceProxy::EvaluateAnimation() [animinstanceproxy.cpp:776]
UE4Editor_Engine!UAnimInstance::ParallelEvaluateAnimation() [animinstance.cpp:553]
UE4Editor_Engine!USkeletalMeshComponent::EvaluateAnimation() [skeletalmeshcomponent.cpp:1113]
UE4Editor_Engine!USkeletalMeshComponent::PerformAnimationEvaluation() [skeletalmeshcomponent.cpp:1174]
UE4Editor_Engine!USkeletalMeshComponent::RefreshBoneTransforms() [skeletalmeshcomponent.cpp:1351]
UE4Editor_Engine!USkeletalMeshComponent::InitAnim() [skeletalmeshcomponent.cpp:422]
UE4Editor_Engine!USkeletalMeshComponent::OnRegister() [skeletalmeshcomponent.cpp:338]
UE4Editor_Engine!UActorComponent::ExecuteRegisterEvents() [actorcomponent.cpp:1145]
UE4Editor_Engine!UActorComponent::RegisterComponentWithWorld() [actorcomponent.cpp:878]
UE4Editor_Engine!UActorComponent::RegisterComponent() [actorcomponent.cpp:932]
UE4Editor_Engine!`anonymous namespace'::RegisterInstancedComponent() [simpleconstructionscript.cpp:29]
UE4Editor_Engine!USimpleConstructionScript::ExecuteScriptOnActor() [simpleconstructionscript.cpp:553]
UE4Editor_Engine!AActor::ExecuteConstruction() [actorconstruction.cpp:669]
UE4Editor_Engine!AActor::RerunConstructionScripts() [actorconstruction.cpp:469]
UE4Editor_Engine!AActor::PostEditChangeProperty() [actoreditor.cpp:114]
UE4Editor_Engine!APawn::PostEditChangeProperty() [pawn.cpp:912]
UE4Editor_CoreUObject!UObject::PostEditChange() [obj.cpp:285]
UE4Editor_UnrealEd!FBlueprintEditorUtils::PostEditChangeBlueprintActors() [blueprinteditorutils.cpp:7522]
UE4Editor_Kismet!FBlueprintEditor::NotifyPostChange() [blueprinteditor.cpp:7407]
UE4Editor_PropertyEditor!FPropertyNode::NotifyPostChange() [propertynode.cpp:2067]
UE4Editor_PropertyEditor!FPropertyValueImpl::ImportText() [propertyhandleimpl.cpp:464]
UE4Editor_PropertyEditor!FPropertyValueImpl::ImportText() [propertyhandleimpl.cpp:315]
UE4Editor_PropertyEditor!FPropertyValueImpl::SetValueAsString() [propertyhandleimpl.cpp:737]
UE4Editor_DetailCustomizations!FSkeletalMeshComponentDetails::OnClassPicked() [skeletalmeshcomponentdetails.cpp:363]
UE4Editor_DetailCustomizations!TBaseSPMethodDelegateInstance<0,FSkeletalMeshComponentDetails,0,TTypeWrapper<void> __cdecl() [delegateinstancesimpl.h:317]
UE4Editor_DetailCustomizations!TBaseSPMethodDelegateInstance<0,FSkeletalMeshComponentDetails,0,void __cdecl() [delegateinstancesimpl.h:424]
UE4Editor_ClassViewer!SClassViewer::OnClassViewerSelectionChanged() [sclassviewer.cpp:2197]
UE4Editor_ClassViewer!TBaseSPMethodDelegateInstance<0,SClassViewer,0,TTypeWrapper<void> __cdecl() [delegateinstancesimpl.h:317]
UE4Editor_ClassViewer!TBaseSPMethodDelegateInstance<0,SClassViewer,0,void __cdecl() [delegateinstancesimpl.h:424]
UE4Editor_ClassViewer!TBaseDelegate<void,TSharedPtr<FClassViewerNode,0>,enum ESelectInfo::Type>::ExecuteIfBound() [delegatesignatureimpl.inl:608]
UE4Editor_ClassViewer!SListView<TSharedPtr<FClassViewerNode,0> >::Private_SignalSelectionChanged() [slistview.h:638]
UE4Editor_ClassViewer!STableRow<TSharedPtr<FString,0> >::OnMouseButtonUp() [stablerow.h:449]
UE4Editor_Slate!<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1>::operator() [slateapplication.cpp:4901]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() [slateapplication.cpp:215]
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() [slateapplication.cpp:4890]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [slateapplication.cpp:5348]
UE4Editor_Slate!FSlateApplication::OnMouseUp() [slateapplication.cpp:5328]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [windowsapplication.cpp:1584]
UE4Editor_Core!FWindowsApplication::DeferMessage() [windowsapplication.cpp:1930]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [windowsapplication.cpp:747]
UE4Editor_Core!FWindowsApplication::AppWndProc() [windowsapplication.cpp:669]
user32!<Unknown>
user32!<Unknown>
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [windowsplatformmisc.cpp:905]
UE4Editor!FEngineLoop::Tick() [launchengineloop.cpp:2788]
UE4Editor!GuardedMain() [launch.cpp:156]
UE4Editor!GuardedMainWrapper() [launchwindows.cpp:126]
UE4Editor!WinMain() [launchwindows.cpp:202]
UE4Editor!__scrt_common_main_seh() [exe_common.inl:264]
kernel32!<Unknown>
ntdll!<Unknown>

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-35602 in the post.

0
Login to Vote

Fixed
ComponentOLD - Anim
Affects Versions4.13
Target Fix4.14
Fix Commit3013905
Main Commit3136620
CreatedSep 6, 2016
ResolvedSep 6, 2016
UpdatedMay 18, 2020
View Jira Issue