UE4/UE5 lighting build fails "Lightmass crashed" to solve "array index out of bounds"

When building global illumination, the "Lightmass crashed" error often occurs, causing the lighting construction to fail. This article will analyze the causes of this problem and give suggestions for solving it.

UE4 版本4.26
报错如下:
<None> === Lightmass crashed: ===
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: 60 from an array of size 36
0x00007ffdb619cf19 KERNELBASE.dll!UnknownFunction [].......


1. Cause of the problem

"Lightmass crashed" is technically a crash caused by array out-of-bounds during Lightmass operations. To put it simply, when Lightmass performs lighting operations, the array index that needs to be accessed exceeds the array range, causing the program to crash.

Common causes of this problem include:

1. The resolution of the light map is too large and exceeds the range that Lightmass can handle.

2. The system has insufficient memory and cannot support the computing requirements of Lightmass.

3. There is a conflict in the Lightmass process. Opening multiple swarm agents causes process confusion.

2. Solution

For the above reasons, you can start to solve the "Lightmass crashed" problem from the following points:

1. Reduce the resolution of the light map appropriately, such as from 4096 to 2048.

2. Upgrade the system memory and make sure there is at least 8GB of RAM.

3. Clear the Derived Data cache, delete the Cache folder and rebuild it.

4. Perform Cache cleaning and Validate verification in the Swarm Agent menu.

Open Swarm Agent > Menu > Cache > Clean, click Clean, and then click Validate to verify.

5. Check the Swarm Agent process on the taskbar to avoid conflicts caused by repeated opening.

6. Reduce the lighting quality settings and reduce the amount of Lightmass calculations.

7. Update the UnrealEngine version and obtain the bug-fixed version.

In summary, the "Lightmass crashed" error can be solved by optimizing light maps, system memory, Swarm Agent settings, etc. However, the lighting calculation itself takes up more resources, so the scene scale and machine configuration must be fully considered. 

 

Guess you like

Origin blog.csdn.net/qq_21153225/article/details/132324776