Description

User comments in crash group:

  • Enabled Flat Tesselation on a Terrain Material.
  • I saved the material.
 1628       		if (HasTessellationEnabled)
 1629       		{
 1630 ***** 			UMaterialInstance* NonTessellatedLandscapeMI = Cast<UMaterialInstance>(AvailableMaterials[MaterialIndexToDisabledTessellationMaterial[i]]);
 1631       
 1632       			// Make sure that the Material instance we are going to use has the tessellation disabled
 1633       			UMaterialInstanceDynamic* NonTessellatedLandscapeMID = Cast<UMaterialInstanceDynamic>(NonTessellatedLandscapeMI);
 1634       			ULandscapeMaterialInstanceConstant* NonTessellatedLandscapeMIC = Cast<ULandscapeMaterialInstanceConstant>(NonTessellatedLandscapeMI);
 1635       
 1636       			if (NonTessellatedLandscapeMID != nullptr)
 1637       			{
 1638       				NonTessellatedLandscapeMIC = Cast<ULandscapeMaterialInstanceConstant>(NonTessellatedLandscapeMID->Parent);
 1639       			}
Steps to Reproduce

The issue was happening when creating a new landscape with a material (but not having a layer info object assigned to any layer, then simply enable flat tessellation in the landscape material.

 

It would crash as it was assumed we needed something painted on the landscape to apply tessellation.

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

UE4Editor_Landscape!FLandscapeComponentSceneProxy::DrawStaticElements() [landscaperender.cpp:1631]
UE4Editor_Renderer!FPrimitiveSceneInfo::AddStaticMeshes() [primitivesceneinfo.cpp:152]
UE4Editor_Renderer!FPrimitiveSceneInfo::AddToScene() [primitivesceneinfo.cpp:211]
UE4Editor_Renderer!FScene::AddPrimitiveSceneInfo_RenderThread() [rendererscene.cpp:653]
UE4Editor_Renderer!<lambda_62fe13b83733dfa58d31fcd06f4bbe45>::operator() [rendererscene.cpp:880]
UE4Editor_Renderer!TGraphTask<TEnqueueUniqueRenderCommandType<`FScene::AddPrimitive'::`2'::AddPrimitiveCommandName,<lambda_62fe13b83733dfa58d31fcd06f4bbe45> > >::ExecuteTask() [taskgraphinterfaces.h:829]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [taskgraph.cpp:679]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [taskgraph.cpp:575]
UE4Editor_RenderCore!RenderingThreadMain() [renderingthread.cpp:333]
UE4Editor_RenderCore!FRenderingThread::Run() [renderingthread.cpp:467]
UE4Editor_Core!FRunnableThreadWin::Run() [windowsrunnablethread.cpp:76]

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - LD & Modeling - Terrain - Landscape
Affects Versions4.21
Target Fix4.22
Fix Commit4678127
Main Commit4837001
Release Commit4862694
CreatedNov 5, 2018
ResolvedJan 3, 2019
UpdatedFeb 12, 2019
View Jira Issue