Opportunistic streaming while ReplicationFocus is far away after character death completely breaks

Reproduction Steps

Repro:

  1. Create a place with CharacterAutoLoads = false
  2. Spawn the character.
  3. Reset the character, and set the camera and the ReplicationFocus to a far away part.

Expected Behavior

Expected: should cleanly stream to the area

Actual Behavior

The streaming will try to fight over the new region and the old region, causing massive network lag and even softlocks the client if ClientPhysicsPause is on

Issue Area: Engine
Issue Type: Freezing
Impact: High
Frequency: Constantly

3 Likes

Thanks for the bug report. Are you able to create a simple repro place that shows the issue?

Not sure if this issue is related, but when teleporting from lets say 2000 studs or more with StreamingEnabled on some mobile devices, the character turns completely invisible on the client until you reset. (You can still move around and play, your local character is just completely invisible.)

I believe OP and my issue are caused by discrepancies between Camera and Character world position within the streaming system. Should I make a separate bug report for this issue as well?

1 Like

If you can make a separate bug report and repro we would appreciate it. Thanks

1 Like

I can’t seem to create a replication of this bug, it seems to only happen with my game and it only happens when I toggle opportunistic on.

In my game however running RequestStreamAroundAsync at the location of the ReplicationFocus fixes it 90% of time.

Are you setting the replication focus on the client or the server?

On the server. Replication focus is always set to nil when your character exists and set to a part far away from the map when it is not.

replicationtest.rbxl (942.7 KB)
Here’s a failed attempt on replicating the bug. You can modify the place to suit your needs.

Can you give more detail? Why are you setting the focus to something far away from the map? Is the character editor area where the replication focus is? Do the client and server agree on what the part is, and where it is?

Essentially what my game does is:

Upon joining the game, you have a loading screen in the main menu screen (while running RequestStreamAroundAsync on a preview pedestal pad position) which shows a scene of the map until you press play.

The replication focus is in a reference part located in the map. Upon pressing play, the client sends a signal to the server telling it to change the replication focus to the pedestal pad for your local rig. Which then set your camera to the customization area.

This is a customization area in which your character does not spawn, but rather is a local copy of a character rig that you can view and edit. This customization area is far away from the map. Upon spawning in the map however, the client sends a signal to the server to spawn the character and to set the replication focus to nil. Upon resetting, it is set back to preview pad.

This is the place in question.

I’m also getting an issue where Replication Focus isnt being respected after death sometimes.

Same issue here… character just completed disappears and player de synced. For some reason humanoid.died is fired too…

How easy was this to repro in your specific game?

I don’t want you to impact your users, but is there any way you can privately send me the set up that caused this. Or, even, is there a way you can publish a separate branch of this game with the settings that cause this problem enabled so that I or other staff could enter it and debug?

Thanks for trying to provide a simple repro, but it feels to me like zeroing in on your specific use-case is more useful at this point.