Description

Reparenting a blueprint derived from Trigger Sphere to Trigger Capsule will cause the editor to crash.

This is a regression. This did not occur in 4.11.2.

Source Context:

  163       
  164       if ( bUpdateOverlaps && IsCollisionEnabled() && GetOwner() )
  165       {
  166       UpdateOverlaps();
  167       }
  168       }
  169       }
  170       
  171       
  172       template <EShapeBodySetupHelper UpdateBodySetupAction>
  173       bool InvalidateOrUpdateCapsuleBodySetup(UBodySetup*& ShapeBodySetup, bool bUseArchetypeBodySetup, float CapsuleRadius, float CapsuleHalfHeight)
  174       {
  175       check((bUseArchetypeBodySetup && UpdateBodySetupAction == EShapeBodySetupHelper::InvalidateSharingIfStale) || (!bUseArchetypeBodySetup && UpdateBodySetupAction == EShapeBodySetupHelper::UpdateBodySetup));
  176       check(ShapeBodySetup->AggGeom.SphylElems.Num() == 1);
  177 ***** FKSphylElem* SE = ShapeBodySetup->AggGeom.SphylElems.GetData();
  178       
  179       const float Length = 2 * FMath::Max(CapsuleHalfHeight - CapsuleRadius, 0.f);//SphylElem uses height from center of capsule spheres, but UCapsuleComponent uses halfHeight from end of the sphere
  180       
  181       if (UpdateBodySetupAction == EShapeBodySetupHelper::UpdateBodySetup)
  182       {
  183       SE->SetTransform(FTransform::Identity);
  184       SE->Radius = CapsuleRadius;
  185       SE->Length = Length;
  186       }
  187       else
  188       {
  189       if(SE->Radius != CapsuleRadius || SE->Length != Length)
  190       {
  191       ShapeBodySetup = nullptr;
  192       bUseArchetypeBodySetup = false;
Steps to Reproduce
  1. Open the editor
  2. Create a new Trigger Sphere blueprint
  3. Open the blueprint
  4. Go to Class Settings
  5. Under Parent Class, select Trigger Capsule from the dropdown
  6. When the Reparent Blueprint warning appears, click the Reparent button

Result: Editor crashes

Callstack

Assertion failed: ShapeBodySetup->AggGeom.SphylElems.Num() == 1 [Link Removed] [Line: 177]

UE4Editor_Engine!InvalidateOrUpdateCapsuleBodySetup<0>() capsulecomponent.cpp:178 
UE4Editor_Engine!UCapsuleComponent::UpdateBodySetup() capsulecomponent.cpp:204 
UE4Editor_Engine!UShapeComponent::GetBodySetup() shapecomponent.cpp:60 
UE4Editor_Engine!UPrimitiveComponent::CreatePhysicsState() primitivecomponent.cpp:538 
UE4Editor_Engine!UActorComponent::ExecuteRegisterEvents() actorcomponent.cpp:1119 
UE4Editor_Engine!UActorComponent::RegisterComponentWithWorld() actorcomponent.cpp:873 
UE4Editor_Engine!AActor::IncrementalRegisterComponents() actor.cpp:3967 
UE4Editor_Engine!AActor::RegisterAllComponents() actor.cpp:3906 
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReplaceInstancesOfClass_Inner() kismetreinstanceutilities.cpp:1503 
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReplaceInstancesOfClass() kismetreinstanceutilities.cpp:1305 
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReinstanceInner() kismetreinstanceutilities.cpp:599 
UE4Editor_UnrealEd!FBlueprintCompileReinstancer::ReinstanceObjects() kismetreinstanceutilities.cpp:761 
UE4Editor_UnrealEd!FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:793 
UE4Editor_Kismet!FBlueprintEditor::Compile() blueprinteditor.cpp:3213 
UE4Editor_Kismet!FBlueprintEditor::ReparentBlueprint_NewParentChosen() blueprinteditor.cpp:2746 
UE4Editor_Kismet!FBlueprintGlobalOptionsDetails::OnClassPicked() blueprintdetailscustomization.cpp:4681 
UE4Editor_Kismet!TBaseSPMethodDelegateInstance<0,FBlueprintGlobalOptionsDetails,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:4891 
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() slateapplication.cpp:215 
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() slateapplication.cpp:4880 
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() slateapplication.cpp:5338 
UE4Editor_Slate!FSlateApplication::OnMouseUp() slateapplication.cpp:5318 
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?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
ComponentUE - Simulation - Physics
Affects Versions4.124.13
Target Fix4.16
CreatedAug 15, 2016
ResolvedMar 7, 2017
UpdatedMar 9, 2017