ResavePackages commandlet (buildlighting) fails/asserts on reflection captures in non-visible sub-levels

Any time an artist adds a reflection capture to a sub-level that’s set to non-visible in the persistent scene, light building through the ResavePackages commandlet fails. Is there any way to avoid this, or any command line flag we might be missing?

Building the same setup interactively in editor does not produce any errors or warnings.

The command we’re running looks something like this:

Game\Binaries\Win64\GameEditor-Cmd.exe Game\Game.uproject -run=ResavePackages -buildlighting -Quality=Preview -MapsOnly -ProjectOnly -AllowCommandletRendering -Map=L_CapturesAssert -unattended -buildmachine -stdout -CrashForUAT -NoLogTimes

And this leads to the following failure:

LogInit: Display: Warning/Error Summary (Unique only) LogInit: Display: ----------------------------------- LogInit: Display: LogOutputDevice: Error: begin: stack for UAT LogInit: Display: LogOutputDevice: Error: === Handled ensure: === LogInit: Display: LogOutputDevice: Error: LogInit: Display: LogOutputDevice: Error: Ensure condition failed: !bVerifyOnlyCapturing [File:D:\goals\gls_2\Engine\Source\Runtime\Renderer\Private\ReflectionEnvironmentCapture.cpp] [Line: 1409] LogInit: Display: LogOutputDevice: Error: Stack: LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffa567ce57 GameEditor-Renderer.dll!FScene::CaptureOrUploadReflectionCapture() [D:\goals\gls_2\Engine\Source\Runtime\Renderer\Private\ReflectionEnvironmentCapture.cpp:1409] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffa567831c GameEditor-Renderer.dll!FScene::AllocateReflectionCaptures() [D:\goals\gls_2\Engine\Source\Runtime\Renderer\Private\ReflectionEnvironmentCapture.cpp:961] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffb0252b3e GameEditor-Engine.dll!UReflectionCaptureComponent::UpdateReflectionCaptureContents() [D:\goals\gls_2\Engine\Source\Runtime\Engine\Private\Components\ReflectionCaptureComponent.cpp:1139] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffad7f5dc9 GameEditor-UnrealEd.dll!UEditorEngine::BuildReflectionCaptures() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:3794] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffae29ed94 GameEditor-UnrealEd.dll!FStaticLightingManager::FinishLightingBuild() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\StaticLightingSystem\StaticLightingSystem.cpp:488] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffae30bbf3 GameEditor-UnrealEd.dll!FStaticLightingManager::UpdateBuildLighting() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\StaticLightingSystem\StaticLightingSystem.cpp:410] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffae30bc5c GameEditor-UnrealEd.dll!UEditorEngine::UpdateBuildLighting() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\StaticLightingSystem\StaticLightingSystem.cpp:2785] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffad25cd50 GameEditor-UnrealEd.dll!UResavePackagesCommandlet::PerformAdditionalOperations() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\Commandlets\ContentCommandlets.cpp:2256] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffad23bce8 GameEditor-UnrealEd.dll!UResavePackagesCommandlet::LoadAndSaveOnePackage() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\Commandlets\ContentCommandlets.cpp:840] LogInit: Display: LogOutputDevice: Error: [Callstack] 0x00007fffad25128a GameEditor-UnrealEd.dll!UResavePackagesCommandlet::Main() [D:\goals\gls_2\Engine\Source\Editor\UnrealEd\Private\Commandlets\ContentCommandlets.cpp:1377] [snipped for size limit] LogInit: Display: LogOutputDevice: Error: end: stack for UAT LogInit: Display: 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. LogInit: Display: LogLightmassSolver: Warning: LIGHTMASS: Writing scene settings w/ QualityLevel mismatch! 0 vs 3 (ini setting) LogInit: Display: LogInit: Display: Failure - 26 error(s), 4 warning(s) LogInit: Display: Execution of commandlet took: 8.85 seconds

Steps to Reproduce

  1. Create an empty scene from basic template
  2. Add a sub-level leaving it as blueprint streamed
  3. Add a BoxReflectionCaptureActor to the sub-level
  4. Hide the sub-level
  5. Save everything, exit editor
  6. Try to build lighting using the ResavePackages commandlet from a cmd line launch
  7. Observe failure result

Test scene:

[Image Removed]

Hidden sub-level:

[Image Removed]

Hello,

Thank you for reaching out.

I’ve been assigned this issue, and we will be looking into this ensure in the ResavePackages commandlet for you.

Hello,

Thank you for reporting this. I can confirm this issue can be reproduced as described in the latest CL, and have opened a bug report:

The tracker will be visible after it is approved internally at Epic Games and is publicly accessible.

If you have any further questions, please let us know.