[Bug Report] Game instance not cleaned correctly on RestartLevel or OpenLevel

Hi,

I’d like to report a bug. The Game Instance is not correctly cleaned in this special case:

  1. Your game instance contains a reference to an actor in a streaming level.
  2. The streaming level in question is not visible, but is loaded.
  3. Restart level or Open another level.

I have created a project that contains these specific requirement for the crash that you can download here.

Reproduction steps:

  1. Start the game with PIE
  2. Move your character to the west-most trigger box next to you.
  3. Press “T”

Click here to see the video.

What the project actually does:

  1. StreamingLevel1: On beginplay, store a reference to a StaticActorMesh into the GameInstance.
  2. LevelStreamer: When you run on the west-most triggerbox, the StreamingLevel1 is set to not visible, but is still loaded.
  3. When you press “T”, the command “RestartLevel” is executed.

When you look at the .log, you can clearly see that the engine crashes because of an external reference in StreamingLevel1 in the Game Instance, which leads me to think that the cleanup is faulty, since it works well when the streaming level is not visible and unloaded.


I would love to see this bug fixed. In the meantime, is there any ways (other than cleaning everything up manually) to clean the Game Instance before restarting the level?

Thank you, have a great day!

Hey CyanBalloon,

I was able to reproduce the crash, and have entered a bug report which you can track here:

Thanks for your report and your detailed repro.

Have a great day