Description

This is a somewhat common crash that has existed since at least 4.14.. It appears related to an Undo operation on geometry.

User Descriptions

  • Undoing a move of a boxbrush wall and staircase
  • undoing in a last version project that had ben converted. Only changing geometry and light. This was a greybox level, so hade few meshes. 90% geometry
  • Somehow managed to select both a box and a foliage-block. Moved them both by accident and did ctrl+z to undo.

Source Context

 150       void UModelComponent::CommitSurfaces()
  151       {
  152       	TArray<int32> InvalidElements;
  153       
  154       	// Find nodes that are from surfaces which have been invalidated.
  155       	TMap<uint16,FModelElement*> InvalidNodes;
  156       	for(int32 ElementIndex = 0;ElementIndex < Elements.Num();ElementIndex++)
  157       	{
  158       		FModelElement& Element = Elements[ElementIndex];
  159       		TArray<uint16> NewNodes;
  160       		for(int32 NodeIndex = 0;NodeIndex < Element.Nodes.Num();NodeIndex++)
  161       		{
  162 ***** 			FBspNode& Node = Model->Nodes[Element.Nodes[NodeIndex]];
  163       			FBspSurf& Surf = Model->Surfs[Node.iSurf];
  164       			if(Surf.Material != Element.Material)
  165       			{
  166       				// This node's material changed, remove it from the element and put it on the invalid node list.
  167       				InvalidNodes.Add(Element.Nodes[NodeIndex],&Element);
  168       
  169       				// Mark the node's original element as being invalid.
  170       				InvalidElements.AddUnique(ElementIndex);
  171       			}
  172       			else
  173       			{
  174       				NewNodes.Add(Element.Nodes[NodeIndex]);
  175       			}
  176       		}
Steps to Reproduce

repro steps currently unknown, but seems to occur during a geometry Undo

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: 836 from an array of size 816

UE4Editor_Engine!UModelComponent::CommitSurfaces() [modelcomponent.cpp:163]
UE4Editor_Engine!ULevel::CommitModelSurfaces() [level.cpp:1493]
UE4Editor_Engine!UWorld::CommitModelSurfaces() [world.cpp:1817]
UE4Editor_UnrealEd!UEditorEngine::Tick() [editorengine.cpp:1777]
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-51632 in the post.

1
Login to Vote

Won't Fix
CreatedOct 26, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue