# CRASH caused by unsafe C-style subclass cast in UCharacterMovementComponent::CapsuleTouched

**URL:** <https://forums.unrealengine.com/t/crash-caused-by-unsafe-c-style-subclass-cast-in-ucharactermovementcomponent-capsuletouched/2736029>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine, closed, crash, bug-report, CPP\
**Created:** [July 16, 2026, 3:02am UTC](https://forums.unrealengine.com/t/crash-caused-by-unsafe-c-style-subclass-cast-in-ucharactermovementcomponent-capsuletouched/2736029 "2026-07-16T03:02:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edenlia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Edenlia](https://forums.unrealengine.com/u/Edenlia)\
**Post date:** [July 16, 2026, 3:02am UTC](https://forums.unrealengine.com/t/crash-caused-by-unsafe-c-style-subclass-cast-in-ucharactermovementcomponent-capsuletouched/2736029/1 "2026-07-16T03:02:08Z")

</div>

### Summary

I’m writing my own mesh component with Multiple BodyInstance and hit a crash in UCharacterMovementComponent::CapsuleTouched when enable Overlap for (Character Capsule ↔ my Component)

Though Stack I find a very dangerous C-style subclass cast in

```
	if (OtherBodyIndex != INDEX_NONE)
	{
		BoneName = ((USkinnedMeshComponent*)OtherComp)->GetBoneName(OtherBodyIndex);
	}

```

After some investigation, I find there also have several NOT SkinnedMeshComponent but that may have not INDEX\_NONE BodyIndex, so simply change to safe Cast is not enough.

Other Components are:  
UInstancedStaticMeshComponent  
UGeometryCollectionComponent  
also my comp UEdenRigidRopeComponent

So, that should be a general bug, I think make a virtual function for this or Use IPhysicsBodyInstanceOwner::GetBodyInstance is better.

(But if gonna use IPhysicsBodyInstanceOwner::GetBodyInstance also need some refactor since currently for USkeletalMeshComponent just ignore the Index Param)

### What Type of Bug are you experiencing?

Gameplay

### Steps to Reproduce

Use UE5.8, clone my example project

> **[GitHub - Edenlia/UnrealEdenRope: A UnrealEngine5 Physics Rope Plugin, Implement...](https://github.com/Edenlia/UnrealEdenRope)**
>
> A UnrealEngine5 Physics Rope Plugin, Implement Rigid Body Based Rope and Native XPBD Physics Rope

Open L\_CapsuleTouchBug, Hit Play, should reproduce then

### Expected Result

Not crash anymore, also provide virtual function is nessasary

### Observed Result

Editor Crash

### Affects Versions

5.8  
5.7  
5.6  
5.5  
5.4

### Platform(s)

Android  
iOS  
Linux  
Mac  
OpenXR  
visionOS  
Windows

### For crash reports, include your callstack

`USkinnedMeshComponent::OutdatedKnownSkinnedAssetDetected'::`2’::\<lambda\_1\>::operator()() SkinnedMeshComponent.cpp:6050  
USkinnedMeshComponent::OutdatedKnownSkinnedAssetDetected() SkinnedMeshComponent.cpp:6050  
USkinnedMeshComponent::GetSkinnedAsset() SkinnedMeshComponent.cpp:2837  
USkinnedMeshComponent::GetBoneName(int) SkinnedMeshComponent.cpp:2502  
UCharacterMovementComponent::CapsuleTouched(UPrimitiveComponent \*, AActor \*, UPrimitiveComponent \*, int, bool, const FHitResult &) CharacterMovementComponent.cpp:11694  
UFunction::Invoke(UObject \*, FFrame &, void \*const) Class.cpp:7595  
[Blueprint] CharacterMovementComponent: CapsuleTouched Function /Script/Engine.CharacterMovementComponent:CapsuleTouched  
UObject::ProcessEvent(UFunction \*, void \*) ScriptCore.cpp:2232  
[Inlined] TScriptDelegate::ProcessDelegate(void \*) ScriptDelegates.h:1016  
TMulticastScriptDelegate::ProcessDelegate\<…\>(void \*) ScriptDelegates.h:1446  
[Inlined] UE::Core::Private::TDelegateFunctionWrapper::CallWrapperImpl(const TDynamicMulticastDelegate\<…\> &, TIntegerSequence\<…\>, UPrimitiveComponent \*, AActor \*, UPrimitiveComponent \*, int, bool, const FHitResult &) ScriptDelegates.h:454  
[Inlined] UE::Core::Private::TDelegateFunctionWrapper::CallWrapper(const TDynamicMulticastDelegate\<…\> &, UPrimitiveComponent \*, AActor \*, UPrimitiveComponent \*, int, bool, const FHitResult &) ScriptDelegates.h:478  
[Inlined] TDynamicMulticastDelegate::Broadcast(UPrimitiveComponent \*, AActor \*, UPrimitiveComponent \*, int, bool, const FHitResult &) DelegateSignatureImpl.inl:1504  
TSparseDynamicDelegate::Broadcast\<…\>(UPrimitiveComponent \*, AActor \*, UPrimitiveComponent \*, int, bool, FHitResult) SparseDelegate.h:333  
UPrimitiveComponent::BeginComponentOverlap(const FOverlapInfo &, bool) PrimitiveComponent.cpp:4135  
UPrimitiveComponent::UpdateOverlapsImpl(const TArrayView\<…\> \*, bool, const TArrayView\<…\> \*) PrimitiveComponent.cpp:4496  
USceneComponent::UpdateOverlaps(const TArrayView\<…\> \*, bool, const TArrayView\<…\> \*) SceneComponent.cpp:1096  
USceneComponent::EndScopedMovementUpdate(FScopedMovementUpdate &) SceneComponent.cpp:1307  
FScopedMovementUpdate::~FScopedMovementUpdate() ScopedMovementUpdate.cpp:77  
UCharacterMovementComponent::PerformMovement(float) CharacterMovementComponent.cpp:3105  
UCharacterMovementComponent::ControlledCharacterMove(const UE::Math::TVector\<…\> &, float) CharacterMovementComponent.cpp:6457  
UCharacterMovementComponent::TickComponent(float, ELevelTick, FActorComponentTickFunction \*) CharacterMovementComponent.cpp:1757  
[Inlined] FActorComponentTickFunction::ExecuteTick::**l2::\<lambda\_1\>::operator()(float) ActorComponent.cpp:1701  
[Inlined] FActorComponentTickFunction::ExecuteTickHelper(UActorComponent \*, bool, float, ELevelTick, const \<lambda\_1\> &) Actor.h:4891  
FActorComponentTickFunction::ExecuteTick(float, ELevelTick, Type, const TRefCountPtr\<…\> &) ActorComponent.cpp:1699  
[Inlined] FTickFunctionTask::DoTask(Type, const TRefCountPtr\<…\> &) TickTaskManager.cpp:334  
TGraphTask::ExecuteTask() TaskGraphInterfaces.h:703  
UE::Tasks::Private::FTaskBase::TryExecuteTask() TaskPrivate.h:524  
[Inlined] FBaseGraphTask::Execute(TArray\<…\> &, Type, bool) TaskGraphInterfaces.h:493  
FNamedTaskThread::ProcessTasksNamedThread(int, bool) TaskGraph.cpp:807  
FNamedTaskThread::ProcessTasksUntilIdle(int) TaskGraph.cpp:706  
[Inlined] FTaskGraphCompatibilityImplementation::ProcessThreadUntilIdle(Type) TaskGraph.cpp:1447  
FTaskGraphCompatibilityImplementation::ProcessUntilTasksComplete(const TArray\<…\> &, Type, const TFunction\<…\> &) TaskGraph.cpp:1585  
FTickTaskSequencer::ReleaseTickGroup(ETickingGroup, bool, TArray\<…\> &) TickTaskManager.cpp:1040  
FTickTaskManager::RunTickGroup(ETickingGroup, bool) TickTaskManager.cpp:2133  
[Inlined] UWorld::RunTickGroup(ETickingGroup, bool) LevelTick.cpp:786  
UWorld::Tick(ELevelTick, float) LevelTick.cpp:1750  
UEditorEngine::Tick(float, bool) EditorEngine.cpp:2169  
UUnrealEdEngine::Tick(float, bool) UnrealEdEngine.cpp:543  
FEngineLoop::Tick() LaunchEngineLoop.cpp:5859  
[Inlined] EngineTick() Launch.cpp:60  
GuardedMain(const wchar\_t \*) Launch.cpp:192  
LaunchWindowsStartup(HINSTANCE** \*, HINSTANCE\_\_ \*, char \*, int, const wchar\_t \*) LaunchWindows.cpp:266  
WinMain(HINSTANCE\_\_ \*, HINSTANCE\_\_ \*, char \*, int) LaunchWindows.cpp:338

---

<div class="post-metadata">

**Author:** ![Bug-Reporter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bug-reporter/32/997076_2.png) [@Bug-Reporter](https://forums.unrealengine.com/u/Bug-Reporter)\
**Post date:** [October 27, 2026, 9:00pm UTC](https://forums.unrealengine.com/t/crash-caused-by-unsafe-c-style-subclass-cast-in-ucharactermovementcomponent-capsuletouched/2736029/3 "2026-10-27T21:00:41Z")

</div>

UE-406968 has been ‘Closed’ as a duplicate of an existing known issue. Origin Issue: UE-392989, Origin Topic: [Crash when CharacterMovementComponent's CapsuleTouched processes overlap with a GeometryCollectionComponent](https://forums.unrealengine.com/t/crash-when-charactermovementcomponents-capsuletouched-processes-overlap-with-a-geometrycollectioncomponent/2763431)
