Crash in Standalone/Packaged Game on Win7 when unloading Lighting Scenario Streaming Level

Unloading Lighting Scenario Crashes the Engine in Standalone Game mode or in a Packaged Game;
Works fine in PIE.

To reproduce:

Create new UE4.14 project. I’ve used the “empty” template.

  • Create 2 Levels. I’ve named them LS and LS2.
  • Attach the levels to the persistent level.
  • Set both LS and LS2 as Lighting Scenarios.
  • Place static point light in LS.
  • Hide the LS2.
  • Build lighting.
  • Hide the LS. Unhide the LS2.
  • Build lighting.
  • Set up simple blueprint to unload and load the levels (see attachement)

  • Launch as standalone or packaged game
  • Press T to load a Lighting Scenario level
  • Press Y to switch the Lighing Scenarios
    - Engine will crash when unloading the Lighting Scenario streaming level (I was able to isolate that cause after some experimenting).

Very excited about this feature! Hope it’s easily fixable (or am I doing something wrong?)
I’ve tested this also with a proper check if the Streaming Level is loaded, decided to leave this out here to simplify the reproduction.

Best,
MBZ

Hey aerloth-

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here Unreal Engine Issues and Bug Tracker (UE-38712) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

The issue seems to be when you unload the first lighting scenario you made visible. A workaround is having an empty lighting scenario that is always loaded and visible. You will get this warning: “MULTIPLE LIGHTING SCENARIO LEVELS ENABLED”, but the program does not crash. I’m unsure what this does to performance.

Interestingly, if instead of loading and unloading the levels. You make them always loaded, and just toggle the “Should be Visible” checkbox. One of the levels will remain visible, even when told to be invisible - and the crash does not occur. In this scenario L2 seems to always be the lighting scenario that remains visible no matter if my first key press is ‘1’ or ‘2’. (Adding a scenario that is always visible also fixes this issue here).

Nice! Thanks for the workaround!
Though should be noted that loading both lightmaps still incur more memory usage and loading time.

Same here.

Can confirm that keeping empty Lighting Scenario always ON - kind of solves the problem.
However the First level becomes unbaked for some reason.

Regarding Should be visible node:
I thought that only switches ON/OFF geometry. However, as I thought, if Lightmaps loaded they are visible anyway.
BUT!!! I might be wrong. Please correct me.

Yes I’m wrong - “Should be visible” node - does the lightmap switch as well.