Description

There is a scenario where delta struct serialized fast arrays can replicate changes that introduce additional elements to the array, but without changelists containing the new data.

This needs further investigation to determine an isolated repro case. It is a regression against the original replication behavior of fast array serialization.

See linked UDN thread for more information:
https://udn.unrealengine.com/s/question/0D54z00006yDw2gCAC/fast-array-struct-delta-serialization-issues

Steps to Reproduce

See code below.

  1. Add the code below to a project, and compile.
  2. Add a FastArrayTestActor to a level.
  3. Run a multiplayer session (either PIE or Standalone, Listen or Dedicated server, doesn't matter which).
  4. After the client connects to the server, wait around 10 seconds.
  5. View the log.

Expected:
In the log, you should see this, indicating that the fast array was replicated twice. The first time with 5 elements, and again with 10 elements. All elements should have valid Objects and Values.

[2022.01.15-19.12.28:834][779]LogTemp: Warning: AFastArrayTestActor::PostNetReceive = [{ Value = 1, Object = FastArrayTestActor_1 },
{ Value = 2, Object = FastArrayTestActor_1 },
{ Value = 3, Object = FastArrayTestActor_1 },
{ Value = 4, Object = FastArrayTestActor_1 },
{ Value = 5, Object = FastArrayTestActor_1 }]
[2022.01.15-19.12.28:835][779]LogTemp: Warning: AFastArrayTestActor::PostNetReceive = [{ Value = 1, Object = FastArrayTestActor_1 },
{ Value = 2, Object = FastArrayTestActor_1 },
{ Value = 3, Object = FastArrayTestActor_1 },
{ Value = 4, Object = FastArrayTestActor_1 },
{ Value = 5, Object = FastArrayTestActor_1 },
{ Value = 6, Object = FastArrayTestActor_1 },
{ Value = 7, Object = FastArrayTestActor_1 },
{ Value = 8, Object = FastArrayTestActor_1 },
{ Value = 9, Object = FastArrayTestActor_1 },
{ Value = 10, Object = FastArrayTestActor_1 }]

Actual:
In the log, you should see this, indicating that the fast array was replicated twice. The first time with 5 elements, and again with 10 elements. In this case, the first 5 elements have valid Values and Objects, but in the second case all Values are 0 and all Objects are None, meaning the structs are using default values.

[2022.01.15-02.42.15:295][108]LogTemp: Warning: AFastArrayTestActor::PostNetReceive = [{ Value = 1, Object = FastArrayTestActor_1 },
{ Value = 2, Object = FastArrayTestActor_1 },
{ Value = 3, Object = FastArrayTestActor_1 },
{ Value = 4, Object = FastArrayTestActor_1 },
{ Value = 5, Object = FastArrayTestActor_1 }]
[2022.01.15-02.42.15:295][108]LogTemp: Warning: AFastArrayTestActor::PostNetReceive = [{ Value = 1, Object = FastArrayTestActor_1 },
{ Value = 2, Object = FastArrayTestActor_1 },
{ Value = 3, Object = FastArrayTestActor_1 },
{ Value = 4, Object = FastArrayTestActor_1 },
{ Value = 5, Object = FastArrayTestActor_1 },
{ Value = 0, Object = None },
{ Value = 0, Object = None },
{ Value = 0, Object = None },
{ Value = 0, Object = None },
{ Value = 0, Object = None }]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to AnswerHub just mention UE-118168 in the post.

6
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.26
Target Fix5.0
Fix Commit18643809
Main Commit18647707
CreatedJun 14, 2021
ResolvedJan 18, 2022
UpdatedJan 18, 2022