Assertion failed: !ObjectNetGUID.IsDefault() && ObjectNetGUID.IsValid() [DataReplication.cpp] [Line: 248]
This occurs under the following situation:
- A game instance, Instance A, is running as a listen server. It uses seamless travel when changing levels.
- A game instance, Instance B, connects to Instance A.
- There are adverse network conditions for the connection between Instance A and B.
- The game code replicates Actor subobjects, either explicitly through custom UObject subclasses (with the proper overrides for subobject replication) or through Actor components set for replication.
- Instance A performs a seamless travel to the current level, restarting the match.
- The map loads quickly, and then immediately spawns the replicated Pawn actor(s) with the replicated subobjects and properties.
- There is a chance that Instance B will exit with the assertion above.
The chance is small, and depends on networking conditions. Setting these on the server instance:
- Net PktLag=150
- Net PktLagVariance=50
seems to give a roughly 10% chance to trigger the assertion on each level travel on the remote client. The initial travel to connect to the server seems to never trigger the assertion.
Additionally, a related warning appears immediately before the assertion is triggered:
[2016.01.11-05.22.37:579][187]LogNetPackageMap:Warning: GetObjectFromNetGUID: Attempt to reassign -only guid. FullNetGUIDPath: [188]GameplayPawn_8.[192]TestSubobject
I have created a simple project that can reproduce the issue. There are no Blueprint assets, just two simple levels and C++ code. Download the project as a .zip
Build the project and run two instances with -game. In the instance you intend to act as a server, press H to travel to the ‘gameplay’ level. This instance will now be listening for clients. In the other instance, press J, which will open a connection to 127.0.0.1, joining the listen server that you started in the other instance.
In the console on the listen server, run these commands (these are the same as above):
- Net PktLag=150
- Net PktLagVariance=50
It’s only necessary to set these on the server instance, not the client.
Finally, on the server instance, press R to reload the current map. You will likely need to repeat pressing R several times before the assertion is triggered on the client instance.
Thanks for reading!