Description

This is an issue with inconsistencies over rig names and how control names are generated. We expect that a control name will be appended with _CONTROL or _CURVE_CONTROL. But because URigHierarchy::SanitizeName limits control names to 100 characters, this is not always the case. If a user has a bone name of ~100 charactes, some or all of the appended string can be removed. But we have other code (ie. UFKControlRig::GetControlName) which appends these strings without checking the length.
So we end up in situations like with this crash, where in UFKControlRig::Execute_Internal we are generating a control name from GetControlName which has _CONTROL appended. But when we call URigHierarchy::GetIndex we fail to find the control because the stored name has been truncated.

Steps to Reproduce
  1. Open the attached project
  2. Open L__19134712.umap (in developers folder)
  3. Open LS_19134712.uasset
  4. In Sequencer, r-click on the skeletal mesh track and hit bake to control rig, selecting FK Control Rig as the target
  5. The editor will crash
Callstack
	UnrealEditor-ControlRig-Win64-Debug.dll!CastChecked<FRigControlElement>(FRigBaseElement * InElement) Line 1076	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!UFKControlRig::Execute_Internal::__l15::<lambda_3>::operator()(FRigBaseElement * InElement, bool & bContinue) Line 212	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefCaller<`UFKControlRig::Execute_Internal'::`15'::<lambda_3>,void,FRigBaseElement *,bool &>::Call(void * Obj, FRigBaseElement * & <Params_0>, bool & <Params_1>) Line 321	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<0>,void __cdecl(FRigBaseElement *,bool &)>::operator()(FRigBaseElement * <Params_0>, bool & <Params_1>) Line 471	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3036	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(FRigBaseElement * InElement, bool bTowardsChildren, TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction) Line 3043	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!URigHierarchy::Traverse(TFunction<void __cdecl(FRigBaseElement *,bool &)> PerElementFunction, bool bTowardsChildren) Line 3067	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!UFKControlRig::Execute_Internal(const FName & InEventName) Line 235	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!UControlRig::Execute(const FName & InEventName) Line 1154	C++
 	UnrealEditor-ControlRig-Win64-Debug.dll!UMovieSceneControlRigParameterSection::LoadAnimSequenceIntoThisSection(UAnimSequence * AnimSequence, const FFrameNumber & SequenceStart, UMovieScene * MovieScene, UObject * BoundObject, bool bKeyReduce, float Tolerance, bool bResetControls, const FFrameNumber & InStartFrame, EMovieSceneKeyInterpolation InInterpolation) Line 3385	C++
 	UnrealEditor-ControlRigEditor-Win64-Debug.dll!FControlRigParameterTrackEditor::LoadAnimationIntoSection(TSharedPtr<ISequencer,1> & SequencerPtr, UAnimSequence * AnimSequence, USkeletalMeshComponent * SkelMeshComp, FFrameNumber StartFrame, bool bReduceKeys, const FSmartReduceParams & ReduceParams, bool bResetControls, UMovieSceneControlRigParameterSection * ParamSection) Line 1118	C++
 	UnrealEditor-ControlRigEditor-Win64-Debug.dll!FControlRigParameterTrackEditor::BakeToControlRig(UClass * InClass, FGuid ObjectBinding, UObject * BoundActor, USkeletalMeshComponent * SkelMeshComp, USkeleton * Skeleton) Line 1274	C++
 	UnrealEditor-ControlRigEditor-Win64-Debug.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int,0,1,2,3>,FGuid,UObject *,USkeletalMeshComponent *,USkeleton *>::ApplyAfter<void (__cdecl FControlRigParameterTrackEditor::*const &)(UClass *,FGuid,UObject *,USkeletalMeshComponent *,USkeleton *),FControlRigParameterTrackEditor * &,UClass *>(void(FControlRigParameterTrackEditor::*)(UClass *, FGuid, UObject *, USkeletalMeshComponent *, USkeleton *) & Func, FControlRigParameterTrackEditor * & <Args_0>, UClass * && <Args_1>) Line 317	C++
 	UnrealEditor-ControlRigEditor-Win64-Debug.dll!TBaseRawMethodDelegateInstance<0,FControlRigParameterTrackEditor,void __cdecl(UClass *),FDefaultDelegateUserPolicy,FGuid,UObject *,USkeletalMeshComponent *,USkeleton *>::ExecuteIfSafe(UClass * <Params_0>) Line 535	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!TDelegate<void __cdecl(UClass *),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>(UClass * <Params_0>) Line 634	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!SClassViewer::OnClassViewerSelectionChanged(TSharedPtr<FClassViewerNode,1> Item, ESelectInfo::Type SelectInfo) Line 1837	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter<void (__cdecl SClassViewer::*const &)(TSharedPtr<FClassViewerNode,1>,enum ESelectInfo::Type),SClassViewer * &,TSharedPtr<FClassViewerNode,1>,enum ESelectInfo::Type>(void(SClassViewer::*)(TSharedPtr<FClassViewerNode,1>, ESelectInfo::Type) & Func, SClassViewer * & <Args_0>, TSharedPtr<FClassViewerNode,1> && <Args_1>, ESelectInfo::Type && <Args_2>) Line 317	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!TBaseSPMethodDelegateInstance<0,SClassViewer,1,void __cdecl(TSharedPtr<FClassViewerNode,1>,enum ESelectInfo::Type),FDefaultDelegateUserPolicy>::ExecuteIfSafe(TSharedPtr<FClassViewerNode,1> <Params_0>, ESelectInfo::Type <Params_1>) Line 301	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!TDelegate<void __cdecl(TSharedPtr<FClassViewerNode,1>,enum ESelectInfo::Type),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>(TSharedPtr<FClassViewerNode,1> <Params_0>, ESelectInfo::Type <Params_1>) Line 634	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!SListView<TSharedPtr<FClassViewerNode,1>>::Private_SignalSelectionChanged(ESelectInfo::Type SelectInfo) Line 1007	C++
 	UnrealEditor-ClassViewer-Win64-Debug.dll!STableRow<TSharedPtr<FString,1>>::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 597	C++
 	UnrealEditor-Slate-Win64-Debug.dll!FSlateApplication::RoutePointerUpEvent::__l8::<lambda_2>::operator()(const FArrangedWidget & TargetWidget, const FPointerEvent & Event) Line 5346	C++
 	UnrealEditor-Slate-Win64-Debug.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,`FSlateApplication::RoutePointerUpEvent'::`8'::<lambda_2>>(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::__l8::<lambda_2> & Lambda, ESlateDebuggingInputEvent DebuggingInputEvent) Line 456	C++
 	UnrealEditor-Slate-Win64-Debug.dll!FSlateApplication::RoutePointerUpEvent(const FWidgetPath & WidgetsUnderPointer, const FPointerEvent & PointerEvent) Line 5332	C++
 	UnrealEditor-Slate-Win64-Debug.dll!FSlateApplication::ProcessMouseButtonUpEvent(const FPointerEvent & MouseEvent) Line 5917	C++
 	UnrealEditor-Slate-Win64-Debug.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button, const UE::Math::TVector2<double> CursorPos) Line 5873	C++
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 2271	C++
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,1> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 2783	C++
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1124	C++
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!WindowsApplication_WndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 939	C++
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 945	C++
 	user32.dll!00007ffda41def5c()	Unknown
 	user32.dll!00007ffda41de684()	Unknown
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!WinPumpMessages() Line 117	C++
 	UnrealEditor-ApplicationCore-Win64-Debug.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) Line 148	C++
 	UnrealEditor-Win64-Debug.exe!FEngineLoop::Tick() Line 5806	C++
 	UnrealEditor-Win64-Debug.exe!EngineTick() Line 70	C++
 	UnrealEditor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine) Line 191	C++
 	UnrealEditor-Win64-Debug.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 266	C++
 	UnrealEditor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 317	C++
 	[Inline Frame] UnrealEditor-Win64-Debug.exe!invoke_main() Line 102	C++
 	UnrealEditor-Win64-Debug.exe!__scrt_common_main_seh() Line 288	C++
 	kernel32.dll!00007ffda3ea7374()	Unknown
 	ntdll.dll!00007ffda43fcc91()	Unknown 

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - Anim - Rigging - Control Rig
Affects Versions5.5
CreatedMay 15, 2025
UpdatedMay 16, 2025
View Jira Issue