Game flickers objects in and out of streaming, then gives up and stops streaming EVERYTHING

Game starts to struggle with keeping instances streamed in, then everything just streeams out from the client. Only client-sided instances remain in the world, and server gameplay simulates and continues normally as expected. The clients behaviors clearly indicate a streaming issue, they keep behaving as if they were streamed out (not invisible or not rendered - UI waits for characters, only remote event replicated independent VFX and actions play, client physics simulation is paused)



It also might be a clue but the moment it happens is the only place we explicitly clear to ReplicationFocus = nil.
besides that in other scenarios we usually explicitly have a replication focus set either on the players character model or a world-part during loading.
might also help - our server size player.Character models are put in ReplicatedStorage by the client, we hide it on the client and create our own copy.

Expected behavior

All instances are streamed in and the game works properly.
Reports started coming 3 hours ago.

It’s been reported both on PC and mobile devices

What place id is this occurring on?

Can you clarify what the replication focus is set to on the client and the server in the problematic situation?

1 Like

running a command on the server that explicitly sets the replication focus to my player instantly resolves the issue and streams everything back in.

local p = game.Players[“Wingboy0”]; p.ReplicationFocus = p.Character.PrimaryPart

I can confirm the sequence that causes this bug is:

  • game sets replication focus to a part in workspace (our world loading stage)
  • then replication focus is set to nil (worked normally, started breaking 3 hours ago)
  • I set the replication focus to my character manually via command, this fixes the issue (i did just now in a live game)

100484168444874 and 105077286193224

Could you reasonably set the replication focus as you did in your test?

It sounds as if you are creating an intentional desynchronization between server and client on the character model. As this is used to determine where streaming should deliver instances when no focus is set, this seems potentially problematic.

I’m releasing a patch that sets the focus explicitly as I did with the command, it should get fixed on my end.

I’ll update how it goes

I can confirm a patch that explicitly sets replication focus to player.Character fixed the issue for everybody.

I understand its probably related to us desyncing the character model on the client (by putting it in repstorage locally) but It’s worked flawlessly for more than a year since we released, this is a risky change that might affect some rare games, I think its worth announcing or giving a notice in some way.

The issue is resolved on our end. Knowing more about the recent changes and what to look out for would be appreciated so I can keep it in mind for the future

Glad to hear that resolved the issue.

I also understand where you’re coming from; it was working, so why did it stop? I see how that would be frustrating. This was a minor change that we did not expect to be risky (intended to better identify where streaming should be centered), and would fix some specific issues other developers have encountered. We will be monitoring carefully for any other affected places. It is possible that if there are more (especially not quite so easily resolved), we would consider reverting the change.

To be honest, your description of how you handle the player character and focus had us scratching our heads here on the Streaming team wondering how it wasn’t broken already. We will be looking at this further to better understand on our end. This will include examining whether our documentation needs further detail to help developers like you avoid such an issue.

2 Likes

Much appreciated.

I think a clue that might help is that in our lobby servers this bug didn’t occur, even tho we run the same code path for fights. In this place specifically the sequence plays out near the initial character spawn, while in the bugged places the sequence teleports players far away from their initial spawn.

A local characters model is desynced on first spawn and I believe for the client (when we move it to replicated storage) its position stays there and stops replicating live. This could be what matters since server and client now disagree on the automatic replication focuses location