Engine crash following light build while encoding textures

I’ve had the same frustrating error all summer: after a successful light build, the engine crashes while encoding textures. I have tried numerous settings with the same results, as listed below. I cannot reproduce the problem in a fresh project. However, a number of situations have resulted in a successful light build, but with undesirable results:

  • building the light only, with all other actors hidden (successful, but useless)
  • building the light for the project, but with all the light actors hidden (also successful, but just as useless)
  • build the light for the project, but with all the lights and actors set to “dynamic” (successful, but not a viable option due to unacceptable frame rates)
  • copied all maps and assets to a new project (unsuccessful)
  • upgrading project to preview version 4.23 (unsuccessful)
  • changing various lightmass settings under world settings (unsuccessful)

I have copied the call stack below. Any ideas?

Assertion failed: LCI->GetResourceCluster()->UniformBuffer [File:D:\Build++UE4\Sync\Engine\Source\Runtime\Renderer\Private\LightMapRendering.cpp] [Line: 49]

UE4Editor_Core!FWindowsErrorOutputDevice::Serialize() [d:\build++ue4\sync\engine\source\runtime\core\private\windows\windowserroroutputdevice.cpp:79]
UE4Editor_Core!FOutputDevice::LogfImpl() [d:\build++ue4\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:71]
UE4Editor_Core!AssertFailedImplV() [d:\build++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:101]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [d:\build++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:439]
UE4Editor_Renderer!FUniformLightMapPolicy::GetVertexShaderBindings() [d:\build++ue4\sync\engine\source\runtime\renderer\private\lightmaprendering.cpp:122]
UE4Editor_Renderer!FMeshPassProcessor::BuildMeshDrawCommands,FBaseHS,FBaseDS,TBasePassPixelShaderPolicyParamType,FMeshMaterialShader,FMeshMaterialShade() [d:\build++ue4\sync\engine\source\runtime\renderer\public\meshpassprocessor.inl:64]
UE4Editor_Renderer!FBasePassMeshProcessor::Process() [d:\build++ue4\sync\engine\source\runtime\renderer\private\basepassrendering.cpp:970]
UE4Editor_Renderer!FBasePassMeshProcessor::AddMeshBatch() [d:\build++ue4\sync\engine\source\runtime\renderer\private\basepassrendering.cpp:1504]
UE4Editor_Renderer!FPrimitiveSceneInfo::CacheMeshDrawCommands() [d:\build++ue4\sync\engine\source\runtime\renderer\private\primitivesceneinfo.cpp:274]
UE4Editor_Renderer!FPrimitiveSceneInfo::AddStaticMeshes() [d:\build++ue4\sync\engine\source\runtime\renderer\private\primitivesceneinfo.cpp:428]
UE4Editor_Renderer!FPrimitiveSceneInfo::AddToScene() [d:\build++ue4\sync\engine\source\runtime\renderer\private\primitivesceneinfo.cpp:511]
UE4Editor_Renderer!FScene::AddPrimitiveSceneInfo_RenderThread() [d:\build++ue4\sync\engine\source\runtime\renderer\private\rendererscene.cpp:843]
UE4Editor_Renderer!::operator()() [d:\build++ue4\sync\engine\source\runtime\renderer\private\rendererscene.cpp:1215]
UE4Editor_Renderer!TGraphTask > >::ExecuteTask() [d:\build++ue4\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:842]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:686]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:582]
UE4Editor_RenderCore!RenderingThreadMain() [d:\build++ue4\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:333]
UE4Editor_RenderCore!FRenderingThread::Run() [d:\build++ue4\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:464]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build++ue4\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:96]

I had similar crashes but it’s not been consistent and it usually happens if I build lights 2 times in a row.

As far as ideas for you go, how many textures are in the project? Could some of them be problematic in anyway?

I have a number of textures from the Marketplace and starter set, and then a few I use for unique decals. Your question about textures prompted me to try a lightbuild on a portion of my level with all the materials set to the default WorldGridMaterial. This was initially unsuccessful. However, I split the level into two maps – one with only BSP geometry, and the other with only static meshes – and that ended up building a portion of the level without a crash. The engine still crashed when I tried to combine these together.