Description

When the client receives a bunch, it will first apply all the new values for replicated properties before calling any repnotify functions for those properties. This means that in between the StaticMesh property being set and OnRep_StaticMesh being called, other OnRep functions may be called. If one of these OnReps results in GetStaticMesh being called, such as by setting a material on the mesh, an ensure will be triggered due to the KnownStaticMesh not matching the current StaticMesh.

Steps to Reproduce

See attached repro project.

Create a replicated actor with a replicated static mesh component.
Include on the actor a replicated property with a repnotify function. Have this repnotify call SetMaterial on the static mesh component.

On the server, change the static mesh of the component and this replicated property in the same update.

On the client, observe the ensure in UStaticMeshComponent::OutdatedKnownStaticMeshDetected get hit when the repnotify function calls SetMaterial.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-156362 in the post.

3
Login to Vote

Backlogged
ComponentUE - Networking
Affects Versions5.0
Main Commit21919698
Release Commit21920513
CreatedJun 10, 2022
UpdatedApr 16, 2025
Pull Requests
9456 - cmsinflexion
View Jira Issue