Description

This is not a Regression. Tested in //UE5/Release-5.0 CL23058290.

Crash occurs when creating a USkeletalMeshComponent inside a UMotionControllerComponent when applied to a Character. Commenting out mccHandMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("mccHandMesh")); prevents the crash from occurring.

Steps to Reproduce
  1. Create a new C++ Blank project
  2. Select Tools > New C++ Class
  3. Select All Classes then search for and select Motion Controller Component
  4. Name the Class MyControllerComponent
  5. Wait for the wizard to finish and open the IDE then close the Editor
  6. In MyMotionControllerComponent.h after GENERATED_BODY() add:
    public:
    
    	UMyMotionControllerComponent();
    
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Test")
    	class USkeletalMeshComponent* mccHandMesh;
    
  7. In the MyMotionControllerComponent.cpp add the #include "Components/SkeletalMeshComponent.h"
  8. Then add these lines of codes:
    UMyMotionControllerComponent::UMyMotionControllerComponent()
    {
        mccHandMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("mccHandMesh"));
    }
    
  9. Build the project in the IDE
  10. Open the editor then press Ctrl+Alt+F11 then wait for Live Coding to finish
  11. In the C++ Classes folder find the MyMotionControllerComponent right click then select Create Child Blueprint Class saving it in the Content folder
  12. Create a new Blueprint Character
  13. Add the MyMyMotionControllerComponent to the character
  14. Compile the Blueprint

Expected Results:
The component is added and the blueprint compiles or a warning is given regarding the component

Actual Results:
The editor crashes with an Assertion:

Assertion failed: Pair != nullptr [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Map.h] [Line: 656]
Callstack
Assertion failed: Pair != nullptr [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Map.h] [Line: 656]
UnrealEditor-Engine!FAnimUpdateRateManager::CleanupUpdateRateParametersRef(USkinnedMeshComponent *) [SkinnedMeshComponent.cpp:173]
UnrealEditor-Engine!USkinnedMeshComponent::OnUnregister() [SkinnedMeshComponent.cpp:650]
UnrealEditor-Engine!UActorComponent::ExecuteUnregisterEvents() [ActorComponent.cpp:1707]
UnrealEditor-Engine!UActorComponent::BeginDestroy() [ActorComponent.cpp:726]
UnrealEditor-Engine!UPrimitiveComponent::BeginDestroy() [PrimitiveComponent.cpp:1451]
UnrealEditor-Engine!USkinnedMeshComponent::BeginDestroy() [SkinnedMeshComponent.cpp:3785]
UnrealEditor-CoreUObject!UObject::ConditionalBeginDestroy() [Obj.cpp:1024]
UnrealEditor-CoreUObject!UnhashUnreachableObjects(bool,double) [GarbageCollection.cpp:2616]
UnrealEditor-CoreUObject!CollectGarbageInternal(EObjectFlags,bool) [GarbageCollection.cpp:2422]
UnrealEditor-CoreUObject!CollectGarbage(EObjectFlags,bool) [GarbageCollection.cpp:2671]
UnrealEditor-Kismet!FBlueprintCompilationManagerImpl::CompileSynchronouslyImpl(FBPCompileRequestInternal const &) [BlueprintCompilationManager.cpp:315]
UnrealEditor-Kismet!FBlueprintCompilationManager::CompileSynchronously(FBPCompileRequest const &) [BlueprintCompilationManager.cpp:3294]
UnrealEditor-UnrealEd!7fff8f380000  + b93fae
UnrealEditor-Kismet!FBlueprintEditor::Compile() [BlueprintEditor.cpp:4060]
UnrealEditor-Kismet!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,1,void ,FDefaultDelegateUserPolicy>::ExecuteIfSafe() [DelegateInstancesImpl.h:312]
UnrealEditor-Slate!7fffba350000  + e0a01
UnrealEditor-Slate!7fffba350000  + 1f18e7
UnrealEditor-Slate!7fffba350000  + 1c9e24
UnrealEditor-Slate!7fffba350000  + 2705f6
UnrealEditor-Slate!7fffba350000  + 296793
UnrealEditor-Slate!7fffba350000  + 2a3e8
UnrealEditor-Slate!7fffba350000  + ffca
UnrealEditor-Slate!7fffba350000  + 76743
UnrealEditor-Slate!7fffba350000  + 65223
UnrealEditor-Slate!7fffba350000  + 5aecc
UnrealEditor-ApplicationCore!FWindowsApplication::ProcessDeferredMessage(FDeferredWindowsMessage const &) [WindowsApplication.cpp:2219]
UnrealEditor-ApplicationCore!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,1> &,HWND__ *,unsigned int,unsigned __int64,__int64,int,int,unsigned int) [WindowsApplication.cpp:2726]
UnrealEditor-ApplicationCore!FWindowsApplication::ProcessMessage(HWND__ *,unsigned int,unsigned __int64,__int64) [WindowsApplication.cpp:1895]
UnrealEditor-ApplicationCore!FWindowsApplication::AppWndProc(HWND__ *,unsigned int,unsigned __int64,__int64) [WindowsApplication.cpp:925]
USER32!7ff82aac0000  + e7e8
USER32!7ff82aac0000  + e47e
InkObj!202a3550000  + e7e59
atlthunk!7ff81c560000  + 1028
USER32!7ff82aac0000  + e7e8
USER32!7ff82aac0000  + e229
UnrealEditor-ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages(bool) [WindowsPlatformApplicationMisc.cpp:142]
UnrealEditor!7ff600d30000  + 7332
UnrealEditor!7ff600d30000  + 2287d
UnrealEditor!7ff600d30000  + 2296a
UnrealEditor!7ff600d30000  + 25680
UnrealEditor!7ff600d30000  + 371b4
UnrealEditor!7ff600d30000  + 3a516
KERNEL32!7ff82b900000  + 17614
ntdll!7ff82be10000  + 526a1

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Anim - Runtime
Affects Versions5.1
Target Fix5.2
Fix Commit24098100
Main Commit24100357
Release Commit24098100
CreatedJan 11, 2023
ResolvedFeb 9, 2023
UpdatedApr 29, 2023