This bug is pretty weird and I suppose I can’t give the full explanation now. But I’m open to suggestions on how I can provide more/better information. We use slightly modified 5.5.4, some plugins and world partition.
The first thing is that the bug is reproducible only in packaged build. The bug occurs quite often (but not always) in a fresh game after update or clean content cooking.
What I observe: some actors are not spawned OR are spawned at 0,0,0. If I load the game (a routine which re-opens the level effectively), the issue persists. If I start the new game, the issue seem to be fixed all the time.
Affected actors:
all of them are placed on level and not spawned in runtime
they don’t have data layers, but are spatially loaded
our custom actors with custom logic
the actors that are moved to 0,0,0 have child actor components, which MAY BE related to this issue (need more observation just to be sure)
the actors that are randomly not spawned don’t have child actor components, but are movable. They have static mesh component(s) (among others).
We are currently investigating a problem when actors are parented under an editor only Actor at the Outliner level. The transform of the actors end up being reset during the cook operation. I don’t think this is your problem since you mention that starting a new game will work fine. Could the problem come from the data in the savegame? Knowing more about the nature of the problematic actors could be helpful here.
What is their mobility?
Are those actors properties part of the savegame?
It could also be interesting to review the log in case there are some useful warnings or errors that could help find the source of the problem.
So that’s not related to the save system, but seems like some actors are destroyed right when they should’ve been loaded. The actors mentioned are placed in level instances
Can you clarify the conditions that lead to the actors being destroyed but the garbage collector? Are you reloading a WP level that was already loaded?
I was able to track a fix to a similar problem. We are unsure if this applies to you as the problem was happening during the cooking phase. It is still worth a try. CL#39326612
Could some CAC reference the actors that have(had?) the problem? The fix does force CAC to be destroyed in some cases where they could survive prior to it.
Just to be specific: the actors are not parented under any other actor, they’re part of the level instance, which is placed in the “big world level”
The actors are all movable. I’ll test if making them static may help, but some of them cannot be static/stationary because of underlying logic
Those actors are managed by the savegame (we’re using SPUD) and I’m 90% sure they’re not affected (as they’re not runtime-spawned), but I’m currently checking one very specific case to fill those 10% and will update this post after I do.
Also after the fresh cooks during 5 tests it seems like the actors with child actor components are staying in place if I make them transient as said here.
Giving you the list of scene components that are attached to the actors that disappear and have not child actor component.
Actor A: Static Mesh Component (empty), Interaction Component (custom)
Actor B: Skel Mesh Component, a bunch of static mesh comps, spot light comp, audio components, particle system component, camera view capture, a bunch of custom scene components used for various purposes (targeting proxy, muzzle, etc, shouldn’t really cause the issue)
So the callstack shot I did happened during the load from save, as I believed that saving/loading would not change the order of things, while new game does. But that appeared to be not exactly like this. So one issue was having actors with child actor components spawning at 0 location, but other actors issue is entirely different - I believe it could be a cooking issue, not the loading issue. Though the actors appear to be in the cooked game, they get unloaded for some reason. I’ll investigate further if they will unload during playthrough, while starting new game, etc
This might actually help, as I figured out it could be a cooking issue (some more info in the previous post. Thanks for sharing, I’ll take a look into it. Does it fix the cooking or loading aspect of it?
Hey Martin. I did 4 tests in 4 different cooked instances and it seems like the CL 39326612 fixes the issue. One thing is strange though. The fix only changes how ChildActorComponents(CAC) behave, so I expected to see that out actors with CAC only would be affected. But I wasn’t able to see other actors, which have no CAC, to be unloaded from the game. I suppose it’s just a luck, because the CL cannot affect those actors without CAC, right?