Crash when applying auto convex collision (Convex Decomposition window) on static mesh

I submitted a couple of bug reports from the editor as well. The repro steps:

  1. Edit Static Mesh
  2. Collision | Remove Collision
  3. Collision | Auto convex collision
  4. Convex Decomposition window | Apply button

Crash:
bSuccess = InterfaceVHACD->Compute(Verts, 3, NumVerts, Tris, 3, NumTris, VHACD_Params);

UE4Editor-UnrealEd.dll!VHACD::VHACD::MergeConvexHulls(class VHACD::IVHACD::Parameters const &)	Unknown
UE4Editor-UnrealEd.dll!VHACD::VHACD::ComputeACD<float>(float const * const,unsigned int,unsigned int,int const * const,unsigned int,unsigned int,class VHACD::IVHACD::Parameters const &)	Unknown

UE4Editor-UnrealEd.dll!DecomposeMeshToHulls(UBodySetup * InBodySetup, const TArray<FVector,FDefaultAllocator> & InVertices, const TArray<unsigned int,FDefaultAllocator> & InIndices, float InAccuracy, int InMaxHullVerts) Line 165 C++
UE4Editor-StaticMeshEditor.dll!FStaticMeshEditor::DoDecomp(float InAccuracy, int InMaxHullVerts) Line 1711 C++
UE4Editor-StaticMeshEditor.dll!SConvexDecomposition::OnApplyDecomp() Line 197 C++
UE4Editor-StaticMeshEditor.dll!TMemberFunctionCaller<SConvexDecomposition,FReply (__cdecl SConvexDecomposition::)(void) __ptr64>::operator()<>() Line 161 C++
UE4Editor-StaticMeshEditor.dll!TTupleImpl<TIntegerSequence<> >::ApplyAfter_ExplicitReturnType<FReply,TMemberFunctionCaller<SConvexDecomposition,FReply (__cdecl SConvexDecomposition::
)(void) __ptr64> >(TMemberFunctionCaller<SConvexDecomposition,FReply (__cdecl SConvexDecomposition::*)(void)> && Func) Line 113 C++
UE4Editor-StaticMeshEditor.dll!TBaseSPMethodDelegateInstance<0,SConvexDecomposition,0,FReply __cdecl(void)>::Execute() Line 282 C++
UE4Editor-Slate.dll!TBaseDelegate::Execute() Line 440 C++
UE4Editor-Slate.dll!SButton::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 236 C++
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent::__l15::(const FArrangedWidget & TargetWidget, const FPointerEvent & Event) Line 4276 C++
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,FReply (const FArrangedWidget &, const FPointerEvent &) >(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::l15::FReply (const FArrangedWidget &, const FPointerEvent &) & Lambda) Line 214 C++
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent(FWidgetPath & WidgetsUnderPointer, FPointerEvent & PointerEvent) Line 4279 C++
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(FPointerEvent & MouseEvent) Line 4663 C++
UE4Editor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button) Line 4641 C++
UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1404 C++
UE4Editor-Core.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND
* InHWnd, unsigned int InMessage, unsigned int64 InWParam, int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 1709 C++
UE4Editor-Core.dll!FWindowsApplication::ProcessMessage(HWND
* hwnd, unsigned int msg, unsigned int64 wParam, int64 lParam) Line 707 C++
UE4Editor-Core.dll!FWindowsApplication::AppWndProc(HWND
* hwnd, unsigned int msg, unsigned int64 wParam, int64 lParam) Line 629 C++
[External Code]
UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Line 884 C++
UE4Editor.exe!FEngineLoop::Tick() Line 2416 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE
* hInInstance, HINSTANCE
* hPrevInstance, int nCmdShow) Line 142 C++
UE4Editor.exe!WinMain(HINSTANCE
* hInInstance, HINSTANCE
* hPrevInstance, char * __formal, int nCmdShow) Line 189 C++
[External Code]

Locals:

  •   InBodySetup	0x00000000b3564a00 {AggGeom={SphereElems={AllocatorInstance={Data=0x0000000000000000 <NULL> } ArrayNum=...} ...} ...}	UBodySetup *
    
  •   InVertices	{AllocatorInstance={Data=0x00000000fd7740c0 {...} } ArrayNum=758 ArrayMax=816 }	const TArray<FVector,FDefaultAllocator> &
    
  •   InIndices	{AllocatorInstance={Data=0x00000000fd78c0c0 {...} } ArrayNum=2292 ArrayMax=3034 }	const TArray<unsigned int,FDefaultAllocator> &
      InAccuracy	Variable is optimized away and not available.	
      InMaxHullVerts	16	int
      Tris	Variable is optimized away and not available.	
    
  •   VHACD_Callback	{...}	FVHACDProgressCallback
    
  •   InterfaceVHACD	0x00000000eeb82780 {...}	VHACD::IVHACD *
      bSuccess	Error reading register value.	
    
  •   VHACD_Params	{m_concavity=0.15000000596046448 m_alpha=0.050000000000000003 m_beta=0.050000000000000003 ...}	VHACD::IVHACD::Parameters
      NumHulls	Variable is optimized away and not available.	
      HullIdx	Variable is optimized away and not available.	
      Hull	Variable is optimized away and not available.	
    
  •   ConvexElem	{VertexData={AllocatorInstance={Data=0x0000000000000000 <NULL> } ArrayNum=-1202514910 ArrayMax=2046 } ...}	FKConvexElem
      VertIdx	Variable is optimized away and not available.	
    
  •   V	{X=-0.00822781026 Y=2.867e-042#DEN Z=-0.00643197680 }	FVector
    

Hi Andy,

Can you provide your Machine and Epic ID that come up with the Call Stack in the Crash Reporter as well? This will allow me to pull up the crash in our crash reporter system, but I cannot otherwise.

Using your steps, I’m not getting a crash with the editor. I used the TemplateFloor asset from a blank project.

  • Are you using a specific asset or one that you’ve created? If so, do you see the crash happen using some of the basic assets included in the Starter Content pack or basic engine assets?
  • Are you changing any of the values int eh Convex Decomposition window to increase accuracy or Max Hull Verts?

Thank you!

Tim

MachineId:6F64ADA841F014BD0631BFA582C266D7
EpicAccountId:d0c170f7d7b947c9b9933f9b26a9f650

It is an asset that we’ve created.Let me know how I can send it to you if that would help.

You can share the asset here in a private message to me on the Forums: https://forums.unrealengine.com/private.php?do=newpm&u=4894

Are you changing any of the values int eh Convex Decomposition window to increase accuracy or Max Hull Verts?

I was able to get the crash with your mesh and with another one from our Stater Content. I entered the ticket UE-24553 for this crash and will update here once a fix has been submitted.

With the mesh that you sent me the scale on the mesh was extremely small. I imagine this is where the crash is happening by having to setup collision on a mesh that is not large enough. For instance, I was able to recreate the crash with SM_Statue from the Starter Content, but only if I set the Build Scale to ~0.001 in size.

Any updates on this crash? I’m trying switch to UE4 from Unity, and this bug is what is stopping me…

This was actually just verified recently as being fixed. It’s slated to go into 4.12 with the fix. I’ll check and see if this can be moved to 4.11, but I cannot guarantee that it can be merged though.

The fix will be in 4.11 now. The fix should be in the next preview release for P4, If the fix is not in that one it will be in P5. P4 should be out relatively soon, so I’m not sure it actually made it into that one.