Description

This is a trending crash coming out of 4.18, and may be a regression. Users have not provided any descriptions of their actions when the crash occurred.

Source Context

  57       const TArray<FVector>& FBaseMeshPaintGeometryAdapter::GetMeshVertices() const
   58       {
   59       	return MeshVertices;
   60       }
   61       
   62       const TArray<uint32>& FBaseMeshPaintGeometryAdapter::GetMeshIndices() const
   63       {
   64       	return MeshIndices;
   65       }
   66       
   67       void FBaseMeshPaintGeometryAdapter::GetVertexPosition(int32 VertexIndex, FVector& OutVertex) const
   68       {
   69 ***** 	OutVertex = MeshVertices[VertexIndex];
   70       }
   71       
   72       TArray<uint32> FBaseMeshPaintGeometryAdapter::SphereIntersectTriangles(const float ComponentSpaceSquaredBrushRadius, const FVector& ComponentSpaceBrushPosition, const FVector& ComponentSpaceCameraPosition, const bool bOnlyFrontFacing) const
   73       {
   74       	TArray<uint32> OutTriangles;
   75       
   76       	// Use a bit of distance bias to make sure that we get all of the overlapping triangles.  We
   77       	// definitely don't want our brush to be cut off by a hard triangle edge
   78       	const float SquaredRadiusBias = ComponentSpaceSquaredBrushRadius * 0.025f;
   79       
   80       	for (FMeshPaintTriangleOctree::TConstElementBoxIterator<> TriIt(*MeshTriOctree, FBoxCenterAndExtent(ComponentSpaceBrushPosition, FVector(FMath::Sqrt(ComponentSpaceSquaredBrushRadius + SquaredRadiusBias)))); TriIt.HasPendingElements(); TriIt.Advance())
   81       	{
   82       		// Check to see if the triangle is front facing
   83       		const FMeshPaintTriangle & CurrentTri = TriIt.GetCurrentElement();
   84       		const float SignedPlaneDist = FVector::PointPlaneDist(ComponentSpaceCameraPosition, CurrentTri.Vertices[0], CurrentTri.Normal);
Steps to Reproduce

1) Create a skeletal mesh that has two clothing assets with a large difference in the number of vertices.
2) Enter cloth paint - selecting the asset with the most verts
3) Use the gradient tool to select all verts
4) Switch to the other clothing asset

Callstack
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 610] 
Array index out of bounds: 1600 from an array of size 0

UE4Editor_MeshPaint!FBaseMeshPaintGeometryAdapter::GetVertexPosition() [basemeshpaintgeometryadapter.cpp:70]
UE4Editor_ClothPainter!FClothPaintTool_Gradient::Render() [clothpainttools.cpp:143]
UE4Editor_ClothPainter!FClothPainter::Render() [clothpainter.cpp:333]
UE4Editor_MeshPaint!IMeshPaintEdMode::Render() [imeshpaintmode.cpp:379]
UE4Editor_UnrealEd!FEditorModeTools::Render() [editormodemanager.cpp:837]
UE4Editor_UnrealEd!FEditorViewportClient::Draw() [editorviewportclient.cpp:3591]
UE4Editor_Persona!FAnimationViewportClient::Draw() [animationeditorviewportclient.cpp:357]
UE4Editor_Renderer!FSceneRenderer::FSceneRenderer() [scenerendering.cpp:1398]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::FDeferredShadingSceneRenderer() [deferredshadingrenderer.cpp:217]
UE4Editor_Renderer!FSceneRenderer::CreateSceneRenderer() [scenerendering.cpp:1766]
UE4Editor_Renderer!FRendererModule::BeginRenderingViewFamily() [scenerendering.cpp:2246]
UE4Editor_UnrealEd!FEditorViewportClient::Draw() [editorviewportclient.cpp:3460]
UE4Editor_Engine!FViewport::Draw() [unrealclient.cpp:1207]
UE4Editor_UnrealEd!UEditorEngine::UpdateSingleViewportClient() [editorengine.cpp:2046]
UE4Editor_UnrealEd!UEditorEngine::Tick() [editorengine.cpp:1819]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [unrealedengine.cpp:396]
UE4Editor!FEngineLoop::Tick() [launchengineloop.cpp:3296]
UE4Editor!GuardedMain() [launch.cpp:166]
UE4Editor!GuardedMainWrapper() [launchwindows.cpp:134]
UE4Editor!WinMain() [launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [exe_common.inl:253]
kernel32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Simulation - Physics - Character
Affects Versions4.18
Target Fix4.19
Fix Commit3738337
Main Commit3759284
Release Commit3813083
CreatedNov 2, 2017
ResolvedNov 6, 2017
UpdatedJan 13, 2021