Manual sync does not work reliably for late joiners
tracked
Thad Gyther
Every now and then, late joiners do not receive data for manual synced variables on UdonSharpBehaviours. This can be severly breaking for some worlds! Just imagine a locked private room suddenly being accessible for a late joiner.
I found one way to trigger it relatively often:
- put a few manual synced objects into an otherwise empty world (for example the attached InteractionCounter script).
- Do a Build & Test, interact with some objects to change and serialize their state
- Start a second client, the client receives data normally. Don't interact with anything
- Quit the first client without interacting with anything
- Start a third client. Often, this one already doesn't get any data on any of the objects.
- If sync still works, just repeat the process by closing the second client and starting a fourth and so on and try interacting with something again with the client that you are about to close. Or have another regular game client running in the background in a heavy world. For some reason that does seem to have a big influence, too.
It is still a bit random, but that way the bug usually happens pretty fast. Note that after it happens, the player can still call RequestSerialization to properly send the data to late joiners, they just don't receive it automatically on join. Also note that it usually affects successive late joiner after it happened once. Also note that doing a RequestSerialization in OnOwnershipTransferred usually avoids that bug. Which is interesting, because it suggests that another RequestSerialization helps even before the new player joins. However, this would only take care of the cases where the actual owner leaves. From observations, I'm almost sure there are more scenarios that can trigger late join sync issues.
This issue is similar to:
But different in the way that it is not just OnDeserialization not being called: The values of the variables do not change either.
Log In
StormRel
updated the status to
tracked