Lightmass crashed

Bug

-Lightmass crashes when building lighting even with preview lighting quality.
-Sometimes, the editor crashes as well when doing it and I receive a message of Windos telling me that the editor was closed due to a lack of RAM

Cause

-Lightmap resolution: some of my assets are set to a resolution of 32, some of them to 128 and the ones that need more quality to 1024. Lowering the resolution avoids the crashes, but decreases shadow quality.

My specs:

-GTX 660ti
-i5 3570
-8Gb RAM

Log

-Swarm Agent’s log when building the lightmass. Lightmasscrash
-Line of the error: "16:05:50: [UpdateTaskState]: Task Killed locally by DANIEL-PC, counted as failure"

Additional notes

I don’t have any anti-virus software and any other memory-consuming app running in the background. Is there any way I can fix it without buying more RAM? My scene isn’t really complex and 8gb RAM seem enough for it, I don’t know what I’m doing wrong.

Advanced thanks.

PS: Sorry if there’s any grammar mistake, english isn’t my mother tongue.

First, make sure you have a lightmass importance volume in your scene.(this will probably solve your issue if you dont have one already)

Second, you can increase the virtual memory to make up for lack of RAM.

I already had the lightmass importance volume, but increasing the virtual memory solved the problem. Thanks! :smiley:

I know this is an older post, but I thought I may ask here. I am also having the same issue as above. I seem to be having the problem only when I add Foliage to the project such as grass and or trees. I have 16 gig of memory and I have also increased the virtual memory up to 6+ gig more and still seem to be running out of memory. I do have the light-mass importance volume in the project as well. Also have tried reducing the light-map down to 35 and still have this problem. Any ideas why I am having these issues?

Error message from log:

Error === Lightmass crashed: ===
Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.9\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 77]
Ran out of memory allocating 1920390176 bytes with alignment 0

Note: Some reason it is looking for the DVD drive (D:\ above line) not hard drive where Unreal 4 or project is installed.

Hi Tech1187,

Have a look at the Swarm Agent/Lightmass Troubleshooting guide. Try the suggestions to resolve the issue. Also, only use Power of 2 (2, 4, 8, 16, 32, etc) lightmap resolutions.

Here is the following error i am receiving.

=== 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: 3232332 from an array of size 3232332

0x00007ff988e4a388 KERNELBASE.dll!UnknownFunction []
0x00007ff9275cceaa UnrealLightmass-Core.dll!UnknownFunction []
0x00007ff9274329b7 UnrealLightmass-Core.dll!UnknownFunction []
0x00007ff9273762b9 UnrealLightmass-Core.dll!UnknownFunction []
0x00007ff72cd10d80 UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry() []
0x00007ff72cd19822 UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh() []
0x00007ff72cd772ed UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem() []
0x00007ff72cd1f44c UnrealLightmass.exe!Lightmass::BuildStaticLighting() []
0x00007ff72cd4a5dc UnrealLightmass.exe!Lightmass::LightmassMain() []
0x00007ff72cd6d83a UnrealLightmass.exe!main() []
0x00007ff72cdf0fcc UnrealLightmass.exe!__scrt_common_main_seh() []
0x00007ff98a653034 KERNEL32.DLL!UnknownFunction []
0x00007ff98bc93691 ntdll.dll!UnknownFunction []

What will be the issue? The crash started after adding spotlight, even removing all the spotlights and saving all, still problem doesn’t resolved.

Please help.

My PC Config is
i5 4460
16GB Ram
4GB R9 380 AMD Gpu
256GB SSD
1TB HDD

Regards