Unreal Engine 4 and 5 Lightmass iussues

Hi,
I have problems building lighting in Unreal Engine 4.27. The same error is also received in 5.x. The lightmass is crashing, have anyone else had this problem?

LightingResults: Error: === Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 703]
Array index out of bounds: 387 from an array of size 387
0x00007fff259d2817 UnrealLightmass-Core.dll!UnknownFunction
0x00007ff7e1c21578 UnrealLightmass.exe!DispatchCheckVerify<void,<lambda_665257cb03ec5816ed3e7b5fb0bd5f90> >()
0x00007ff7e1be6a4a UnrealLightmass.exe!Lightmass::FStaticMeshStaticLightingMesh::GetTriangleIndices()
0x00007ff7e1b5cb1a UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry()
0x00007ff7e1b6640b UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh()
0x00007ff7e1bb79d5 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem()
0x00007ff7e1b6aa69 UnrealLightmass.exe!Lightmass::BuildStaticLighting()
0x00007ff7e1b917f7 UnrealLightmass.exe!Lightmass::LightmassMain()
0x00007ff7e1bb09d3 UnrealLightmass.exe!main()
0x00007ff7e1c193d4 UnrealLightmass.exe!__scrt_common_main_seh()
0x00007ff81d3b7614 KERNEL32.DLL!UnknownFunction
0x00007ff81d9e26a1 ntdll.dll!UnknownFunction
0x00007ff81514c329 CylanceMemDef64.dll!UnknownFunction
0x00007ff81514f62b CylanceMemDef64.dll!UnknownFunction
0x00007ff81b22cd29 KERNELBASE.dll!UnknownFunction
0x00007fff25c9bb06 UnrealLightmass-Core.dll!UnknownFunction
0x00007fff25c9fa77 UnrealLightmass-Core.dll!UnknownFunction
0x00007fff25a70ced UnrealLightmass-Core.dll!UnknownFunction
0x00007fff259d11eb UnrealLightmass-Core.dll!UnknownFunction
0x00007fff259d2850 UnrealLightmass-Core.dll!UnknownFunction
0x00007ff7e1c21578 UnrealLightmass.exe!DispatchCheckVerify<void,<lambda_665257cb03ec5816ed3e7b5fb0bd5f90> >()
0x00007ff7e1be6a4a UnrealLightmass.exe!Lightmass::FStaticMeshStaticLightingMesh::GetTriangleIndices()
0x00007ff7e1b5cb1a UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry()
0x00007ff7e1b6640b UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh()
0x00007ff7e1bb79d5 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem()
0x00007ff7e1b6aa69 UnrealLightmass.exe!Lightmass::BuildStaticLighting()
0x00007ff7e1b917f7 UnrealLightmass.exe!Lightmass::LightmassMain()
0x00007ff7e1bb09d3 UnrealLightmass.exe!main()
0x00007ff7e1c193d4 UnrealLightmass.exe!__scrt_common_main_seh()
0x00007ff81d3b7614 KERNEL32.DLL!UnknownFunction
0x00007ff81d9e26a1 ntdll.dll!UnknownFunction
0x00007ff81514c329 CylanceMemDef64.dll!UnknownFunction
0x00007ff81514f62b CylanceMemDef64.dll!UnknownFunction
Job has failed! Job executable didn’t exit cleanly. Exit code

I receive the error when I have either of the Cesium3DTileset classes loaded such as World terrain or buildings. I have tried to set a lightmass importance volume but no luck. Any ideas?

I don’t know what would cause that. Can you provide us with detailed instructions for reproducing the crash in a new project or in the Cesium for Unreal Samples project?

Thanks for the fast reply! I reproduce this using the following:

  1. Start a new Unreal Engine empty game template for c++.
  2. Copy the CESIUM plugin to the Plugins folder of the new template.
  3. Make sure CESIUM is active (Version 1.21.0)
  4. Make a new level and save it in the content folder.
    5.Connect to Cesium and Add a OSM Buildings Node.I directly get a warning of unbuilt lighting.
  5. Exporting light data 100% done, then when it is building light data i get Light mass crash error.

LightingResults: Warning: No importance volume found and the scene is so large that the automatically synthesized volume will not yield good results. Please add a tightly bounding lightmass importance volume to optimize your scene’s quality and lighting build times.
LogStaticLightingSystem: Running Lightmass w/ ImmediateImport mode ENABLED
LogStaticLightingSystem: Running Lightmass w/ ImmediateProcess mode ENABLED
LogStaticLightingSystem: Running Lightmass w/ Sorting mode ENABLED
LogStaticLightingSystem: Running Lightmass w/ Mapping paddings ENABLED
LogStaticLightingSystem: Running Lightmass w/ Mapping debug paddings DISABLED
LogUnrealMath: Error: FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead.
LogUnrealMath: Error: FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead.
LogEditorBuildUtils: Build time 0:05
LogUnrealMath: Error: FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead.
LogUnrealMath: Error: FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead.
LogShaderCompilers: Display: === FShaderJobCache stats ===
LogShaderCompilers: Display: Total job queries 0, among them cache hits 0 (0.00%)
LogShaderCompilers: Display: Tracking 0 distinct input hashes that result in 0 distinct outputs (0.00%)
LogShaderCompilers: Display: RAM used: 0.00 MB (0.00 GB) of 1638.40 MB (1.60 GB) budget. Usage: 0.00%
LogShaderCompilers: Display: ================================================
LogUObjectHash: Compacting FUObjectHashTables data took 0.63ms
=== Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 703]
Array index out of bounds: 387 from an array of size 387
0x00007fff34302817 UnrealLightmass-Core.dll!UnknownFunction
0x00007ff7677f1578 UnrealLightmass.exe!DispatchCheckVerify<void,<lambda_665257cb03ec5816ed3e7b5fb0bd5f90> >()
0x00007ff7677b6a4a UnrealLightmass.exe!Lightmass::FStaticMeshStaticLightingMesh::GetTriangleIndices()
0x00007ff76772cb1a UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry()
0x00007ff76773640b UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh()
0x00007ff7677879d5 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem()
0x00007ff76773aa69 UnrealLightmass.exe!Lightmass::BuildStaticLighting()
0x00007ff7677617f7 UnrealLightmass.exe!Lightmass::LightmassMain()
0x00007ff7677809d3 UnrealLightmass.exe!main()
0x00007ff7677e93d4 UnrealLightmass.exe!__scrt_common_main_seh()
0x00007ff81d3b7614 KERNEL32.DLL!UnknownFunction
0x00007ff81d9e26a1 ntdll.dll!UnknownFunction
0x00007ff81514c329 CylanceMemDef64.dll!UnknownFunction
0x00007ff81514f62b CylanceMemDef64.dll!UnknownFunction
0x00007ff81b22cd29 KERNELBASE.dll!UnknownFunction
0x00007fff345cbb06 UnrealLightmass-Core.dll!UnknownFunction
0x00007fff345cfa77 UnrealLightmass-Core.dll!UnknownFunction
0x00007fff343a0ced UnrealLightmass-Core.dll!UnknownFunction
0x00007fff343011eb UnrealLightmass-Core.dll!UnknownFunction
0x00007fff34302850 UnrealLightmass-Core.dll!UnknownFunction
0x00007ff7677f1578 UnrealLightmass.exe!DispatchCheckVerify<void,<lambda_665257cb03ec5816ed3e7b5fb0bd5f90> >()
0x00007ff7677b6a4a UnrealLightmass.exe!Lightmass::FStaticMeshStaticLightingMesh::GetTriangleIndices()
0x00007ff76772cb1a UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry()
0x00007ff76773640b UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh()
0x00007ff7677879d5 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem()
0x00007ff76773aa69 UnrealLightmass.exe!Lightmass::BuildStaticLighting()
0x00007ff7677617f7 UnrealLightmass.exe!Lightmass::LightmassMain()
0x00007ff7677809d3 UnrealLightmass.exe!main()
0x00007ff7677e93d4 UnrealLightmass.exe!__scrt_common_main_seh()
0x00007ff81d3b7614 KERNEL32.DLL!UnknownFunction
0x00007ff81d9e26a1 ntdll.dll!UnknownFunction
0x00007ff81514c329 CylanceMemDef64.dll!UnknownFunction
0x00007ff81514f62b CylanceMemDef64.dll!UnknownFunction
*** CRITICAL ERROR! Machine: CSEGOTLD1231G7R
*** CRITICAL ERROR! Logfile: UnrealLight_CSEGOTLD1231G7R_1B3BAAD54E80A23BAFFD4FBF202A7F16.log
*** CRITICAL ERROR! Crash report:
LightingResults: Error: === Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 703]
Array index out of bounds: 387 from an array of size 387
0x00007fff34302817 UnrealLightmass-Core.dll!UnknownFunction
0x00007ff7677f1578 UnrealLightmass.exe!DispatchCheckVerify<void,<lambda_665257cb03ec5816ed3e7b5fb0bd5f90> >()
0x00007ff7677b6a4a UnrealLightmass.exe!Lightmass::FStaticMeshStaticLightingMesh::GetTriangleIndices()
0x00007ff76772cb1a UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry()
0x00007ff76773640b UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh()
0x00007ff7677879d5 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem()
0x00007ff76773aa69 UnrealLightmass.exe!Lightmass::BuildStaticLighting()
0x00007ff7677617f7 UnrealLightmass.exe!Lightmass::LightmassMain()
0x00007ff7677809d3 UnrealLightmass.exe!main()
0x00007ff7677e93d4 UnrealLightmass.exe!__scrt_common_main_seh()
0x00007ff81d3b7614 KERNEL32.DLL!UnknownFunction
0x00007ff81d9e26a1 ntdll.dll!UnknownFunction
0x00007ff81514c329 CylanceMemDef64.dll!UnknownFunction
0x00007ff81514f62b CylanceMemDef64.dll!UnknownFunction
0x00007ff81b22cd29 KERNELBASE.dll!UnknownFunction
0x00007fff345cbb06 UnrealLightmass-Core.dll!UnknownFunction
0x00007fff345cfa77 UnrealLightmass-Core.dll!UnknownFunction
0x00007fff343a0ced UnrealLightmass-Core.dll!UnknownFunction
0x00007fff343011eb UnrealLightmass-Core.dll!UnknownFunction
0x00007fff34302850 UnrealLightmass-Core.dll!UnknownFunction
0x00007ff7677f1578 UnrealLightmass.exe!DispatchCheckVerify<void,<lambda_665257cb03ec5816ed3e7b5fb0bd5f90> >()
0x00007ff7677b6a4a UnrealLightmass.exe!Lightmass::FStaticMeshStaticLightingMesh::GetTriangleIndices()
0x00007ff76772cb1a UnrealLightmass.exe!Lightmass::FEmbreeGeometry::FEmbreeGeometry()
0x00007ff76773640b UnrealLightmass.exe!Lightmass::FEmbreeAggregateMesh::AddMesh()
0x00007ff7677879d5 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem()
0x00007ff76773aa69 UnrealLightmass.exe!Lightmass::BuildStaticLighting()
0x00007ff7677617f7 UnrealLightmass.exe!Lightmass::LightmassMain()
0x00007ff7677809d3 UnrealLightmass.exe!main()
0x00007ff7677e93d4 UnrealLightmass.exe!__scrt_common_main_seh()
0x00007ff81d3b7614 KERNEL32.DLL!UnknownFunction
0x00007ff81d9e26a1 ntdll.dll!UnknownFunction
0x00007ff81514c329 CylanceMemDef64.dll!UnknownFunction
0x00007ff81514f62b CylanceMemDef64.dll!UnknownFunction
Job has failed! Job executable didn’t exit cleanly. Exit code: 1
LogStaticLightingSystem: Warning: Failed to build lighting!!! Lighting build failed.

Also, this was reproduced using the Unreal Engine 4.27 which I forgot to mention.

Thanks @karlsson.adam. Does it also happen if you install Cesium for Unreal as an engine plugin, rather than copying it into your project? I doubt it matters much here, but we usually don’t recommend that people put the built plugin into their project. If you’re putting the plugin in your project, it’s better to include the source in your project and follow the developer setup instructions.

Hey,

I reproduced the exact same setup, however I have the plug-in installed in the engine rather than in the plug-ins folder now. The same error though. Any ideas?

Not sure if it helps but I did the same procedure for the sample project from the Epic Games Store/Launcher. I still receive the error.

I don’t get crash after enable ‘Force No Precomputed Lighting’ in the world settings of level.

Okay thanks, in that case static lighting is off and I guess that is how it is supposed to be? :slight_smile: