See the attached UDN for more information and a sample project reproducing the issue.
This issue seems to happen due to a specific order of events. First, the component is destroyed, and garbage collection is run before the owning actor is replicated, which may happen with a low NetFrequency. Then, the server processes a bunch received from the client, such as for a movement RPC from a pawn. When the server processes this bunch, the FObjectReplicator referencing the now null component (due to GC) is removed from the channel's ReplicationMap at the end of UActorChannel::ProcessBunch. When the server replicates the actor after this, the destruction of the component isn't sent since the FObjectReplicator for the component is no longer in ReplicationMap.
Open sample project included in the linked UDN.
Play in Editor as Client
After 5 seconds, a component on the pawn will be destroyed on the server.
Expected: The component will no longer exist on the server and clients
Actual: The component will not be destroyed on the client
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-124785 in the post.
0 |
Component | UE - Networking |
---|---|
Affects Versions | 4.27 |
Target Fix | 5.0 |
Created | Aug 31, 2021 |
---|---|
Resolved | Sep 13, 2021 |
Updated | Nov 30, 2021 |