Lightmass crashed - Ran out of Memory

Hey guys!

I’m trying to build the lighting in my scene, but all I get is the well known “Lighmass crashed” Fatal error.

My Specs are …

  • Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (24 CPUs), ~2.7GHz
  • 12GB RAM
  • 40GB Virtual RAM

We even tried to solve the problem with the Swarm Agent. But two PC with these Specs didn’t solve the problem.

The maximum lightmap resolution on my meshes is 2048 and the polycount of the whole scene is round about 450k, which shouldn’t be a big problem. Lightmass Importance Volumes were placed in the scene too, so I don’t know how to fix this problem.

Error <None> === Lightmass crashed: ===
Fatal error: [File:D:\Git\4.7\Promoted\Engine\Source\Programs\UnrealLightmass\Private\Lighting\LightingSystem.cpp] [Line: 1324] 
Static lighting thread exception:
Fatal error: [File:D:\Git\4.7\Promoted\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 54] 
Ran out of memory allocating 736756416 bytes with alignment 0


KERNELBASE.dll!UnknownFunction (0x000007fefd7aaaad) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed16d4574) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed15b2754) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed14c7867) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed14d05c2) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed1465145) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!UnknownFunction (0x000000013f5a91b6) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!UnknownFunction (0x000000013f5607d8) + 0 bytes [UnknownFile:0]
UnrealLightmass.exe!UnknownFunction (0x000000013f5572db) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed16d3b96) + 0 bytes [UnknownFile:0]
UnrealLightmass-Core.dll!UnknownFunction (0x000007fed16c808d) + 0 bytes [UnknownFile:0]
kernel32.dll!UnknownFunction (0x00000000778059cd) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x000000007793b891) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x000000007793b891) + 0 bytes [UnknownFile:0]

Hi EE_BenM,

The Lightmass crash here is because it ran out of memory as I’m sure you noticed.

Trying using a lower lightmap resolution for your meshes. 2048 is fairly high.

  • Are you using this resolution for every mesh in the scene?
  • Are you using a lot of separate meshes all with this resolution?
  • Is this a single mesh?

Try lowering the lightmap resolution and seeing if you can get a build that does not crash lightmass due to running out of memory.

Let me know.

Tim

Hey Tim!

Thanks for your help! The lightmap resolution was still too high. I’ve decreased the resolution to a maximum of 512 and now it’s working.

Ben

If you ran out of memory try setting up more virtual memory(swap space).
If you’re on windows here is an article from microsoft to change the size of the virtual memory:
https://answers.unrealengine.com/users/7568/azarus.html

It will use your hard disk as a memory so its going to be a lot slower but it will not crash at least.

Yeah I’ve tried to increase the virtual memory, but it still crashes. Maybe I’ve to set up more than 40GB. I’ll give it a try!

Ben