I’ve been running into an issue that sounds very much like UE-214626 and wanted to provide a bit more data in case it helps. Contrary to the issue above, I can reproduce this in editor, but from my testing I see it much more reliably in packaged games.
What I’m trying to achieve is to have a lobby that people can join and from that lobby they start missions together. I want to use seamless travel to achieve this. Unfortunately that seems to crash. I was able to narrow this down to using World Partition maps. If I travel from a basic level lobby to a basic level mission map, I wasn’t able to reproduce. Traveling from an “open world” level to either “open world” or “basic” levels seems to cause the issue.
I was able to reproduce this with UE 5.4.2, but it’s also reproducible on ue5-main, which is what I’ve been using to try and debug this.
There’s a “minimal” test case for this here. Steps to reproduce are:
enable seamless travel in PIE (console: “net.AllowPIESeamlessTravel true”)
set to play with 2 or more players in PIE
You’ll spawn into the basic lobby by default and can use one of three portals to travel seamlessly to other levels. In my testing I was able to jump between “Basic Mission” and “Basic Lobby” without ever crashing, but when I switch to the “Open World Lobby” and/or “Open World Mission”, that’s where the problems start to happen. Note that it doesn’t always reproduce the first time, but it’s fairly consistent after 4-5 travels.
One thing I noticed early on was this warning message:
[2024.06.24-09.41.35:402][706]LogNet: Warning: Actor None was found in the NetworkObjectList, but is PendingKillPending
This was a bit tricky to debug because this actor was (at least partially) freed most of the time (sometimes the callstack would point towards the Actor->GetName() in that log message). Anyway, I ended up adding a extra layer for debugging that keeps track of actor information and this consistently pointed to the WorldDataLayers object being the bad actor here.
The debugging code I added (it’s not terribly pretty, but serves its purpose) can be found in my development branch here.
Unfortunately I haven’t yet solved this. According to the linked UE issue this is a known problem, so I’m hoping that Epic will be able to fix this (a fix is targetted for 5.5, but so far I haven’t seen a fix for this show up in the ue5-main branch). And yes, I’ve seen this happen not only in PIE but also in standalone and packaged games.
One thing I forgot to add is that the “workaround” mentioned in the issue description (i.e. setting the actor to never be dormant) doesn’t work for me. It does seem to solve the immediate issue, but I see a similar crash happen elsewhere.
To add to this, I debugged it a little bit and found that the crash happens because in UNetDriver::ServerReplicateActors_BuildConsiderList we try to access an object that has already been garbage collected (in my testing it was the WorldDataLayers object, not sure if it is always that one but it seems consistent with the original bug report).
Re-adding the bug number here as this post wasn’t linked to the bug report. UE-214626
I have also been able to reproduce the issue, happens with only 1 client connected as well.
From the linked issue tracker entry, set the dormancy to DORM_Never to fix the issue:
In WorldDataLayers.cpp:62, replace SetNetDormancy(DORM_Initial);
with SetNetDormancy(DORM_Never);
I have not tested the fix, will test tomorrow.
I think this has now been fixed in the ue5-main branch, possibly in this commit:
commit 81f7d78d5fe24a447dacc59da52e8ad95c502a5d
Author: richard malo <Richard.Malo@epicgames.com>
Date: Thu Oct 17 10:18:24 2024 -0400
Removed unnecessary call to AWorldDataLayers::ResetDataLayerRuntimeStates when uninitializing a partition world as it was causing a crash in actor replication.
#rb jeanfrancois.dube
#jira UE-197831
[CL 37226074 by richard malo in ue5-main branch]
At least I don’t see the crashes that I was seeing before after upgrading to a commit after the above and reverting the dormancy change that was posted as a workaround earlier in this thread.
I have had a similar issue UE5.4. Currently trying to seamless travel from a lobby map to game map in PIE. The travel works as expected with 2 players but crashes the engine when attempting the travel with 3 players. This is the stack trace on the crash: