Assertion fail on NetGUID in DataReplication under certain conditions (with repro )

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!

Hey cancel-

It appears that the simulated lag is affecting the replication after server travel. I have entered a ticket (UE-25208) for further investigation.

Cheers

I am getting these same warnings with real network conditions (not simulated). Any idea how to resolve? It happens on seamless travel sometimes and the client with eventually crash because of it.

Hey erebel55-

The original issue reported was not able to be reproduced internally. It would be helpful if you’re able to provide the callstack and logs from the crash, or simple reproduction steps to help me setup a fresh project locally.

i’m getting it too, suddenly, in 4.15. no idea what happened

Hey SlimeQ-

Can you provide any details about the behavior you’re seeing? If you’re able to reproduce this, please provide steps to help me reproduce the behavior on my end.

We are getting this sometimes in real network tests and would appreciate any information on how to prevent it.

I was able to fix this issue by adding a transition level instead of relying on a default. I added a cube and a point light, not sure if those were necessary though.

I’ve only tested this fix on my own project, but it did go from nearly always failing to never failing. I’m not sure if this is a real fix for a logic error, or just moves the dial slightly on a race condition.