In an attempt to optimize a VR game I started messing around with project settings. I wasn’t really too happy with the results, so I opened another level of the game to play around with it. As soon as I did, the editor crashed with the following error.
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 674] Array index out of bounds: 0 from an array of size 0
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_ContentBrowser
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_Slate
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
UE4Editor_ApplicationCore
user32
user32
UE4Editor_ApplicationCore
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
Trying to build the project for Win64 also results in the same error. While the error itself hints at an innapropriate access of an empty array, looking it up it seems this often happens when a mesh has no material slots. I haven’t added any new meshes and certainly never added a mesh without a material slot.
But it made me think about materials and I have a hunch the actual issue is related to a PostProcess volume which I had in all levels which seem to be crashing. You see, one of the settings I changed for the project was disabling the Early Z-Pass (on which the material node SceneDepth apparently depends). All levels which are currently causing this crash had a PostProcess volume with a material in them which used the SceneDepth node.
Some things I’ve tried so far are:
- Making copies/Opening autosave backups of these levels.
- Reverting my Z-Pass change
- Replacing the broken material with a random simple one which doesn’t use the SceneDepth node.
None of this has stopped the crashes. I’d really appreciate any guidance since a couple of these levels were quite large and remaking them will mean tens of hours of work.