Download

Editor exception on map change

I’m getting an exception when I change maps. I think it’s related to a transient, temporary actor I’ve spawned, added to root and then later remove from root when it’s done doing its thing. If I don’t destroy it then this error happens every time, but if I do it happens while the actor still exists.


[2016.08.09-01.16.04:864][107]Cmd: MAP LOAD FILE="../../../../../../UnrealEngine/Projects/OctaneUE4Importer_411/Content/DT_Bedroom/Maps/Bedroom.umap" TEMPLATE=0 SHOWPROGRESS=1 FEATURELEVEL=3[2016.08.09-01.16.04:865][107]LightingResults: New page: Lighting Build
[2016.08.09-01.16.04:880][107]LoadErrors: New page: Loading map: Bedroom.umap
[2016.08.09-01.16.04:881][107]MapCheck: New page: Map Check
[2016.08.09-01.16.04:881][107]LightingResults: New page: Lighting Build
[2016.08.09-01.16.04:887][107]LogReferenceChain: Searching referencers for meshdupetest. This may take several minutes.
[2016.08.09-01.16.04:943][107]LogReferenceChain: Generating reference graph ...
[2016.08.09-01.16.04:946][107]LogReferenceChain: Level 0 has 8 nodes ...
[2016.08.09-01.16.04:951][107]LogReferenceChain: Level 1 added 26 nodes ...
[2016.08.09-01.16.04:955][107]LogReferenceChain: Level 2 added 40 nodes ...
[2016.08.09-01.16.04:960][107]LogReferenceChain: Level 3 added 34 nodes ...
[2016.08.09-01.16.04:966][107]LogReferenceChain: Level 4 added 0 nodes ...
[2016.08.09-01.16.04:966][107]LogReferenceChain: Generating reference chains ...
[2016.08.09-01.16.04:966][107]LogReferenceChain:   
[2016.08.09-01.16.04:966][107]LogReferenceChain: Internal Referencers:
[2016.08.09-01.16.04:966][107]LogReferenceChain:   
[2016.08.09-01.16.04:966][107]LogReferenceChain: (root) MaterialCaptureActor /Game/meshdupetest.meshdupetest:PersistentLevel.MaterialCaptureActor_0->Outer
[2016.08.09-01.16.04:966][107]LogReferenceChain:   Level /Game/meshdupetest.meshdupetest:PersistentLevel->OwningWorld
[2016.08.09-01.16.04:966][107]LogReferenceChain:     (target) World /Game/meshdupetest.meshdupetest
Fatal error: [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Editor\UnrealEd\Private\EditorServer.cpp] [Line: 1829] 
/Game/meshdupetest.meshdupetest still around trying to load ../../../../../../UnrealEngine/Projects/OctaneUE4Importer_411/Content/DT_Bedroom/Maps/Bedroom.umap
   (Object is not currently rooted)

Questions:

  1. What can I do to avoid this? I feel like I should be using FGCObject::AddReferencedObjects to track this object properly.
  2. Is there an editor level change event I could hook into to destroy the transient actor?

Edit: not adding the transient object to root seemed to help. I don’t think it’s being prematurely garbage collected so that may have solved it.