Description

Reported behavior:
Given Level_A which contains object_X, where object_X references Level_B

  • Deleting object_X causes AssetRenameManger to check if we need to patch up other levels
  • Level_B is loaded via LoadPackage. The issue occurs when Level_B has no references to fix up (Not confirmed if this still occurs if fixup actions are performed)
  • If, subsequently, Level_B is loaded in World Composition or Levels panel, Level_B will contain no actors
  • When a level loads in this manner (no actors), saving may/will cause data loss. Instead unloading and reloading it will cause actors to load normally.

Initial report indicates that `LOAD_EditorOnly` flag is absent when loading the map for the soft reference instigated by FAssetRenameManager::LoadReferencingPackages. A workaround was provided whereby simply unloading the level if it was found not to have references requiring a fixup. This workaround appears to have protected against the potential for data corruption, but a solid repro and further investigation into a proper fix is necessary.

See UDN thread for additional details.

Steps to Reproduce
  1. Create a new project. Have a default level (FirstPersonExampleMap etc), does not matter what's in it, just that you have a level.
  2. Add 2 new levels to the project (Level_A and Level_B), which are co-located on disk with the previously mentioned level.
  3. Create 2 blueprint actors, Object_A and Object_B.
    • It can be helpful to add a static mesh to each of the actors for display purposes, but is not necessary to produce the error.
  4. Open blueprint editor for Object_A and add a SoftActorReference variable "ReferenceToB" (Add Variable, Click type node, hover over "actor" and select "Soft Object Reference").
  5. Ensure the Object_A::ReferenceToB variable is public (Open Eye icon)
  6. Compile, Save and close Blueprint editor for Object_A.
  7. With the default level loaded, open the World Settings panel (Window - World settings) and Check "Enable World Composition". Click yes if there is a warning
  8. Open the Levels panel (Window - Levels) and verify that Level_A and Level_B appear nested under the Persistent Level entry.
  9. Select Level_A (double click on it in Levels window) and then place an instance of Object_A into the scene. Save.
  10. Select Level_B (double click on it in Levels window) and then place an instance of Object_B into the scene. Save.
  11. Select the instance of Object_A in the scene
  12. In the Details window, Modify the "ReferenceToB" variable of the Object_A instance by clicking on the eye-dropper. Use the eyedropper to select the instance of Object_B in the scene. It should display the instanced name of Object_B.
  13. Save all and close, then restart the Editor.
  14. Verify that Level_A and Level_B are not loaded. Hit Tidle '`' and enter the "getall Level name" command, observe Output log.
  15. Open the Levels window and double click on Level_B to load it. You should see Object_B appear in the scene.
  16. Select the instance of Object_B in the scene, and delete it. Confirm the reference warning.
    Double click Level_A in the levels window to load it.
    Expected: Level_A loads which causes an instance of Object_A to appear in the scene.
    Actual: Level_A loads and the instance of Object_A is absent.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-61910 in the post.

1
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.18
Target Fix4.21
Fix Commit4242509
Main Commit4289353
Release Commit4399518
CreatedJul 18, 2018
ResolvedJul 30, 2018
UpdatedOct 2, 2018
View Jira Issue