Array index out of bounds: 0 from an array size of 0 crashes level on load

After tweaking some editor settings in an attemp to optimize performance of my game, I reopened another level to work on, only to be greeted by the following crash.

UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: begin: stack for UAT
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: === Critical error: ===
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error:
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 674]
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: Array index out of bounds: 0 from an array of size 0
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error:
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error:
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffd18f73e49 KERNELBASE.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaf6be9e6 UE4Editor-Core.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaf6c1dc8 UE4Editor-Core.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaf44e53d UE4Editor-Core.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaf3d97b5 UE4Editor-Core.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaf3dbaf0 UE4Editor-Core.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcad6bfc38 UE4Editor-Engine.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcac5efecc UE4Editor-Engine.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcac623d78 UE4Editor-Engine.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcac5a4b87 UE4Editor-Engine.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaed6c272 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaee3de0c UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaee28067 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaee4d4c0 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffcaee4c440 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffca9a7491d UE4Editor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffca9ab5015 UE4Editor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffca9921851 UE4Editor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffca994c57b UE4Editor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ff74e2c363a UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ff74e2bb7ec UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ff74e2bbb5a UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ff74e2ce31d UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ff74e2d040a UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffd1a8f6fd4 KERNEL32.DLL!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: [Callstack] 0x00007ffd1b35cec1 ntdll.dll!UnknownFunction []
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error:
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: end: stack for UAT

Without much mention of what causes this. Looking this error up I’ve found some people mentioning this happens when a mesh has no material slots and this got me thinking about materials.

Now I BELIEVE this is because in thelevels which now crash with the same error I have a post processing volume, with a post process material attached, which used SceneDepth. SceneDepth depends on the PrePass and one of the options I disabled was the Z-pass. I could be wrong but so far the only thing I can think of that is different between the maps which crash and the ones that don’t is the PostProcess with this specific material on it.

Some of the solutions I’ve tried are:

  1. Enable the Z-pass again.
  2. Delete this material from the project (which I was planning on doing anyway).
  3. Create a copy of the map / load a backup of these maps.

None of this has fixed the issue for me. I don’t think the files became corrupted (because even their backups aren’t opening), however I’d love some insight into how I can salvage them.

1 Like