4.7.2 Lightmass Crash

Error === Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 679]
Array index out of bounds: 4839256 from an array of size 4839256

KERNELBASE.dll!UnknownFunction (0x000007fefcff940d) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007feca3944f4) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007feca272878) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007feca251075) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!Lightmass::FStaticLightingAggregateMesh::AddMesh() (0x000000013f44589c) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem() (0x000000013f42f7f0) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!Lightmass::BuildStaticLighting() (0x000000013f44e951) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!Lightmass::LightmassMain() (0x000000013f484f72) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!main() (0x000000013f4a1950) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!__tmainCRTStartup() (0x000000013f4f6467) + 0 bytes [UnknownFile:0]
kernel32.dll!UnknownFunction (0x0000000076ed59ed) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x000000007700c541) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x000000007700c541) + 0 bytes [UnknownFile:0]

Is there any way to determine the cause of this error? I have read back on similar problems but seem to be doing what they recommend. I have a powerful computer, loads of RAM and using a Lightmass importance volume in my game environment.

Any and all responses will be greatly appreciated.

Hey -

There can be a lot of reasons that Lightmass may crash in such a way and the most common ones end up being hardware or resource related. So, let’s begin by looking at some horses before we look into some zebras:

Hardware Limitations

#ram
When lightmass runs out of RAM it will use the virtual cache setup by your OS to write information to the hard drive. This will exponentially slow down light builds.

###Recommendation: Upgrade RAM where possible or increase Virtual Cache for your OS**

#CPU
By having a fast CPU this can help speed up the process of light builds with Swarm Agent.

##Hard Drive
Lightmass creates and stores Texture files for static lighting and depending on the size of your project, how many lights and how big you have assigned your lightmap resolutions to be, you may run out of hard drive space in order to complete the light build.

###Recommendation: Open Swarm Agent (in the Binaries\DotNET\ subfolder of the Engine Install location) and under the Settings Tab, change the Cache Folder to another hard drive with more free space

#Clean and Validate the Derived Data Cache:

This is a process that will eliminate any problem files or folders that have been generated in previous Light Builds.

  1. Open Swarm Agent (in the Binaries\DotNET\ subfolder of the Engine Install location)
  2. From Swarm Agent’s Taskbar >> Menu >> Cache >> Click Clean and Click Validate
  3. Navigate to the following path and delete all sub-folders while the editor is closed:

C:/Users/[USERNAME]/AppData/Local/UnrealEngine/

Note this folder is a Hidden System Folder, Please make sure that you have unhidden system folders in Windows first to see the folder.

Let me know if these options do not correct your issue -

Thank You

Eric Ketchum