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 FastArrayTestActor.h and FastArrayTestActor.cpp to a new project.
  2. Add "NetCore" to the "PublicDependencyModuleNames" list, in the projects "*.Build.cs" file.
  3. Compile.
  4. Create a new level.
  5. Use the "Place Actors" tab to add a FastArrayTestActor to the level.
  6. Run a PIE session as a client (Net Mode = Play As Client).
  7. After the client connects to the server, wait around 10 seconds.
  8. 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 Questions & Answers just mention UE-118168 in the post.

7
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.26
Target Fix5.0
Fix Commit18643809
Main Commit19402940
Release Commit18643809
CreatedJun 14, 2021
ResolvedJan 18, 2022
UpdatedJan 26, 2023
View Jira Issue