Blueprint Reinstancing Bug with Objects in Hidden Sub Levels

Found a particularly nasty re-instancing bug with Blueprints and sub-levels. It appears that Blueprints in non-visible sub-levels (which are loaded) are not re-instanced correctly. I tracked down repro steps which I’ve tested in both 4.11 and 4.12 preview.

  1. Create a new map. Save it (Map_P)
  2. Add a sub level to Map_P (SubLevel)
  3. Change streaming method to Always Loaded for SubLevel
  4. SaveAll
  5. Create a new Blueprint based on Actor (BP_TestReinstance)
  6. Save the BP
  7. Add BP_TestReinstance to SubLevel
  8. Set SubLevel’s visibility to false (click the eye in the Levels window)
  9. SaveAll
  10. Open BP_TestReinstance
  11. Add a PointLight component as a child of the DefaultSceneRoot (PointLight)
  12. On “Event Tick” for BP_TestReinstance, use “Print String” to display PointLight’s AttenuationRadius
  13. Compile the Blueprint and Save (order may be important, so compile then save)
  14. Close the editor without saving SubLevel (very important!)
  15. Open the editor, open Map_P
  16. Enter PIE

The output window should be spammed with something to the effect of:

[2016.05.11-16.10.14:731][315]PIE:Error: Error Blueprint Runtime Error: Accessed None trying to read property PointLight from function: ‘ExecuteUbergraph_BP_TestReinstance’ from node: Print String in graph: EventGraph in object: BP_TestReinstance
[2016.05.11-16.10.14:731][315]LogBlueprintUserMessages: [BP_TestReinstance_86] 0.0

SubLevel still has an old version of the BP instanced (it doesn’t appear to have the PointLight component) but is using the newest version of the Blueprint. If you make the level visible, the placed object will be reinstanced and everything will work fine.

Hey Michael,

I’ve attempted to reproduce the issue following your steps, but I was unable to do so.

Could you provide a test project that displays this issue?

I switched to the master branch on Git, still repro’ing with the steps I provided. Attached project, just load up Map_P and enter PIE. Should be printing “0.0” to screen and error’ing in the logs.

ReinstanceIssues

Hey Michael,

We’ve still been unable to reproduce this issue on our end, and unfortunately the test project you’ve provided does not seem to contain Map_P. Would you be able to create a test project in the 4.12.1 binary version and send that one over to see if there is some issue with attempting to open the project in a different version?

Thank you

Strange, the map is there (if you look in Windows Explorer) but the Engine does not want to show it in the CB.

I pulled 4.12 binaries through the launcher, repro’d with the same steps. Here’s the new project. Open it, open Map_P, run PIE, see 0.0 printed to screen.

ReinstanceTest412

Hey Michael,

I’ve been able to reproduce this issue using the new test project you’ve provided, and have entered a bug report, UE-31776. Thank you for your report and for providing the project.

Have a great day