Inconsistent Static Lighting Build Failure - 4.24.3

Hi all!

I’m having some problems with lighting a relatively small interior scene in 4.24.3, and wondered if anyone has any insight into it. I’ll provide the relevant details of the scene itself below, including a typical crash log and then what I’ve already attempted to do in order to fix it. I’ve tried looking around but I’ve never found consistent errors and as these problems can have a hundred different variables affecting any one project I’ve finally given up trying to troubleshoot on my own.

This seems to happen more often than not on high/production level of lighting build, but I have had this happen on preview builds multiple times. I thought it might simply be a matter of my PC not being able to cope with the stress of it…but I have managed to build a handful of times so it doesn’t seem to have a 100% repro. More like 95%. I’m also able to work just fine on the project I’m currently working on Professionally (currently working from home) which is MUCH more intensive on the system than this small scene, so I’m convinced it’s something I’ve either missed or don’t know about.



  • Currently all lights are set to static in the scene, with 10 point lights and 1 spot light
  • The lights themselves have been scaled to fit the mesh bulb light sources
  • The meshes with the fluorescent bulbs have the emmissive contributes to static lighting option ticked
  • There is a static skylight in the level, but at the moment it is switched off (unchecked “affects world”)

Lightmass, Lightmaps and Post Processing

  • There is a lightmass importance volume in the level, all default settings apart from the size which encompasses the whole level (this has been scaled using the parameters rather than using the scale widget in the editor window)
  • The post-processing volume in the level has the exposure settings for min and max set to 1, with infinite extents checked - everything else is default values
  • There are currently 0 lightmaps above 512 in size. There are approximately 12 meshes with a 512 setting as these are merged wall/floor assets. All other assets are 128 or under
  • I’ve currently got 4 reflection captures in the scene, 1 master and 3 localised; but these all build fine

World Settings

  • World settings are all default (they had been modified previously, but the same error keeps occurring regardless)

The Error

Below is the actual error. I don’t get this exact error 100% of the time, but this seems to be the most consistent.

[2020.06.26-11.04.02:516][751]*** CRITICAL ERROR! Machine: ANTONY-PC
[2020.06.26-11.04.02:516][751]*** CRITICAL ERROR! Logfile: UnrealLight_ANTONY-PC_61B4E7CA48AC528752CE339C8CFE66AC.log
[2020.06.26-11.04.02:516][751]*** CRITICAL ERROR! Crash report:
[2020.06.26-11.04.02:516][751]Job has failed! The task failure count is non-zero
[2020.06.26-11.04.02:516][751]LightingResults: Error: <None> === Lightmass crashed: ===Unhandled Exception: EXCEPTION_ILLEGAL_INSTRUCTION
Fatal error: [File:/Build/++UE4/Sync/Engine/Source/Programs/UnrealLightmass/Private/Lighting/LightingSystem.cpp] [Line: 1458]
Static lighting thread exception:

0x00007ff711777d88 UnrealLightmass.exe!Lightmass::TOctree<Lightmass::TLightingCache<Lightmass::TFinalGatherSample<2> >::FRecord<Lightmass::TFinalGatherSample<2> >,Lightmass::TLightingCache<Lightmass::TFinalGatherSample<2> >::FRecordOctreeSemantics>::TConstElementBoxIterator<TInlineAllocator<99,TSizedDefaultAllocator<32> > >::AdvanceToNextIntersectingElement() ]

[2020.06.26-11.04.02:530][752]LogStaticLightingSystem: Warning: Failed to build lighting!!! Lighting build failed.
[2020.06.26-11.04.02:823][752]Lights with unbuilt interactions: 14
[2020.06.26-11.04.02:823][752] Light PointLight11
[2020.06.26-11.04.02:823][752] Light PointLight12
[2020.06.26-11.04.02:823][752] Light PointLight15
[2020.06.26-11.04.02:823][752] Light PointLight16
[2020.06.26-11.04.02:823][752] Light SpotLight_1
[2020.06.26-11.04.02:823][752] Light PointLight17
[2020.06.26-11.04.02:823][752] Light PointLight18
[2020.06.26-11.04.02:823][752] Light PointLight13_15
[2020.06.26-11.04.02:823][752] Light PointLight19
[2020.06.26-11.04.02:823][752] Light PointLight20
[2020.06.26-11.04.02:823][752] Light PointLight21
[2020.06.26-11.04.02:823][752] Light PointLight22
[2020.06.26-11.04.02:823][752] Light PointLight23
[2020.06.26-11.04.02:823][752] Light PointLight24
[2020.06.26-11.04.02:823][752]Primitives with unbuilt interactions: 16
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_4.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_2.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_27.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive ModelComponent /Game/ENV_01.ENV_01:PersistentLevel.ModelComponent_0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_3.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_2.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_1.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_6.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_7.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_6.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_53.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_7.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_5.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Cardboard_Boxes_8.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_4.StaticMeshComponent0
[2020.06.26-11.04.02:824][752] Primitive StaticMeshComponent /Game/ENV_01.ENV_01:PersistentLevel.SM_MERGED_Pipe_Sml_3.StaticMeshComponent0
[2020.06.26-11.04.03:112][753]Cmd: MAP CHECK NOTIFYRESULTS
[2020.06.26-11.04.03:112][753]MapCheck: New page: ENV_01 - 26 Jun 2020, 13:04:03
[2020.06.26-11.04.03:112][753]MapCheck: Error: WorldSettings_1 Maps need lighting rebuilt
[2020.06.26-11.04.03:114][753]MapCheck: Map check complete: 1 Error(s), 0 Warning(s), took 1.581ms to complete.

Things I’ve Already Tried

I’ve already tried the following things I’ve found on various other threads. None seem to have consistently worked unfortunately.

  • Validated/Cleared SwarmAgent
  • Used less lights
  • Tried building at lower quality levels
  • Purged lighting in level using Force No Precomputed Lighting, then attempted to rebuild
  • Deleted lightmass importance volume, added another
  • Deleted any extra post processing effects like fog etc
  • Verified the install at the Engine version menu on the Epic Games Launcher
  • Navigtaing to the “LightingSystem.cpp” file mentioned in the error code - can’t find this, assume it’s a rebuild from github source thing
  • Putting lights into separate sub-level as lighting scenario
  • Deleting certain assets and rebuilding
  • Saving Level as new level and attempting to build again
  • Allowing every single UE4/SwarmAgent process I can find through firewall

Things I Have yet to Try

These are some of the things I’ll be trying next:

  • Migrating project over to different engine version
  • Uninstalling and reinstalling - would rather not do this so might be a last resort
  • Replicating and Rebuilding lights in a new scene (I know, should have tried this earlier!)
  • Switching to dynamic lighting - As this is a portfolio project performance isn’t so much an issue, but would rather stick with baked lighting to emulate most commonly used pipelines

If anyone has any suggestions I haven’t already tried or thought of please let me know. I appreciate there’s probably things about the scene I’ve not mentioned, so if you need more information please also let me know.

Thanks in advance everyone!


What are the Build Settings of the structure meshes (walls, floors, ceilings)? Don’t post them, just look at them to see if they’re all the same, or different. I had an issue trying to build lighting for a really small scene in the 3rd person template, where Unreal crashed during it. The log looked different from that, but I think it had something to do with some of the meshes because when I switched from dynamic to static for the lighting and all meshes, certain meshes weren’t being affected by the lighting how they usually are. I had turned off directional light, and kept the skylight on, but I don’t think it was solely that causing it.

One of the things to look for is if Min LM Res is higher than actual LM Res in the mesh editor settings of meshes. Actual has to be higher than Min. Min LM Res is in the Build Settings, and LM Res (or what I’m referring to as actual) is in settings below that. Is the scene using DFAO or DF shadows? Check mesh settings for distance fields, if the project has them enabled. If Project Settings doesn’t have Mesh Distance Fields enabled, or if the meshes don’t have “Generate Mesh Distance Field” checked, then it could be at least a part of the cause of light build failure. One other check to do is if any lights that are point / spot are overlapping scene geometry too much (as in extending to the other side of walls, ceilings, floors, and objects). The doc states that if the influence radius of a light is sized to the other sides of walls, floors and such, then it results in inaccurate lighting. I’d mainly check it for the walls, floors, and ceilings, not so much for objects due to how impossible it is to avoid it for all of those.

Last one I can think of is…if Ray Tracing is on, is it set to Brute Force or Final Gather mode in the PPV? If it’s set to Final Gather, the minimum number of samples is supposed to be set at 16. If it’s Brute Force, I don’t know if there’s a minimum or suggested sample number. If the RT Global Illumination isn’t enabled (checkboxes are all unchecked), then try enabling it, or ignore this.