Description

Crashes after editing properties of TwoBoneIK node. If following the reproduction steps, the binding of NodePropertyDelegateHandle will not be removed, causing illegal access on the second editing.

Workaround

Can avoid crashes by not using NodePropertyDelegateHandle. (see the following code)

 

void FTwoBoneIKEditMode::EnterMode(UAnimGraphNode_Base* InEditorNode, FAnimNode_Base* InRuntimeNode)
{
    TwoBoneIKRuntimeNode = static_cast<FAnimNode_TwoBoneIK*>(InRuntimeNode);
    TwoBoneIKGraphNode = CastChecked<UAnimGraphNode_TwoBoneIK>(InEditorNode);

// NodePropertyDelegateHandle = TwoBoneIKGraphNode->OnNodePropertyChanged().AddSP(this, &FTwoBoneIKEditMode::OnExternalNodePropertyChange);
    PreviousBoneSpace = TwoBoneIKGraphNode->Node.EffectorLocationSpace;

    FAnimNodeEditMode::EnterMode(InEditorNode, InRuntimeNode);
}

void FTwoBoneIKEditMode::ExitMode()
{
    // TwoBoneIKGraphNode->OnNodePropertyChanged().Remove(NodePropertyDelegateHandle);

    TwoBoneIKGraphNode = nullptr;
    TwoBoneIKRuntimeNode = nullptr;

    FAnimNodeEditMode::ExitMode();
}

 

Steps to Reproduce
  1. Open ThirdPerson project in editor.
  2. Open AnimBlueprint "ThirdPerson_AnimBP.uasset".
  3. Add and connect "TwoBoneIK" node to "Output Pose".
  4. Select TwoBoneIK node and enable "Enable Debug Draw".
  5. Compile blueprint.
  6. Close and reopen AnimBlueprint tab.
  7. Select TwoBoneIK node and disable "Enable Debug Draw".

Then, crash in editor.

Callstack
LoginId:a28409704427cc781fafa5b458893007
EpicAccountId:4d49d23287c94dd7bee3dbfe98e8728eUnhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000UE4Editor_AnimGraph!FTwoBoneIKEditMode::OnExternalNodePropertyChange() [D:\Build\++UE4\Sync\Engine\Source\Editor\AnimGraph\Private\EditModes\TwoBoneIKEditMode.cpp:191]
UE4Editor_AnimGraph!TBaseSPMethodDelegateInstance<0,FTwoBoneIKEditMode,0,void __cdecl(FPropertyChangedEvent &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
UE4Editor_AnimGraph!UAnimGraphNode_Base::PostEditChangeProperty() [D:\Build\++UE4\Sync\Engine\Source\Editor\AnimGraph\Private\AnimGraphNode_Base.cpp:66]
UE4Editor_AnimGraph!UAnimGraphNode_SkeletalControlBase::PostEditChangeProperty() [D:\Build\++UE4\Sync\Engine\Source\Editor\AnimGraph\Private\AnimGraphNode_SkeletalControlBase.cpp:452]
UE4Editor_CoreUObject!UObject::PostEditChangeChainProperty() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Obj.cpp:454]
UE4Editor_PropertyEditor!FPropertyNode::NotifyPostChange() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyNode.cpp:2342]
UE4Editor_PropertyEditor!FPropertyValueImpl::ImportText() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyHandleImpl.cpp:522]
UE4Editor_PropertyEditor!FPropertyValueImpl::ImportText() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyHandleImpl.cpp:291]
UE4Editor_PropertyEditor!FPropertyValueImpl::ImportText() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyHandleImpl.cpp:120]
UE4Editor_PropertyEditor!FPropertyHandleBool::SetValue() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyHandleImpl.cpp:3649]
UE4Editor_PropertyEditor!SPropertyEditorBool::OnCheckStateChanged() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\UserInterface\PropertyEditor\SPropertyEditorBool.cpp:85]
UE4Editor_PropertyEditor!TBaseSPMethodDelegateInstance<0,SPropertyEditorBool,0,void __cdecl(enum ECheckBoxState),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
UE4Editor_Slate!SCheckBox::ToggleCheckedState() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SCheckBox.cpp:355]
UE4Editor_Slate!SCheckBox::OnMouseButtonUp() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SCheckBox.cpp:244]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_cc5aea9e7377b04ce85c30c65ec3889b> >() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:378]
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4815]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5356]
UE4Editor_Slate!FSlateApplication::OnMouseUp() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5321]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2178]
UE4Editor_ApplicationCore!FWindowsApplication::DeferMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2642]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1046]
UE4Editor_ApplicationCore!FWindowsApplication::AppWndProc() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:878]
user32
user32
UE4Editor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:130]
UE4Editor!FEngineLoop::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4748]
UE4Editor!GuardedMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
UE4Editor!GuardedMainWrapper() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
UE4Editor!WinMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
UE4Editor!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Anim - Rigging
Affects Versions4.264.27
Target Fix4.27.1
Fix Commit17617258
Release Commit17617258
CreatedSep 22, 2021
ResolvedSep 24, 2021
UpdatedDec 1, 2022
View Jira Issue