Iris - ObjectReferenceCache doesn't cleanup references to non-replicated subobjects

Hello,

It would appear that FObjectReferenceCache will only clean up replicated subobjects on the client. Say for example UCharacterMovementComponent::ClientAdjustPosition is executed on the server with a NewBase pointed at a non-replicated primitive component of a replicated actor. In that scenario the primitive component object reference will get quantized/serialized and the client will resolve it no problem since it’s network stable. However, once the server tells the client to destroy the actor associated with that primitive component the actor and it’s replicated subobjects will all be cleared from the ObjectReferenceCache while the primitive component will remain associated with previous net ref handle. Can I get verification that this is indeed the behavior as of 5.6 and if so is it intentional?

Edit:

FObjectReferenceCache::ResolveObjectReferenceHandleInternal -

After looking at this further, maybe the idea is that because FCachedNetObjectReference holds a weak pointer to the underlying object that means that even if it’s in the map we can still clean up properly since the weak pointer’s underlying object will have been destroyed?

Thanks,

Nick

[Attachment Removed]

Hi,

Thank you for the report! I believe what you’re describing is a known issue, which should be fixed as of CL 53830580 in UE5/Main.

Thanks,

Alex

[Attachment Removed]

Thanks Alex.

Looking at that CL, it would seem it is built on on other CLs that we do not have. We’re currently on 5.6 with no plans to pull in anymore major version updates before ship. This may be off topic for the thread but assuming the CL in question is included in 5.7 or 5.8 do you think it a crazy idea for us to try and upgrade from 5.6 to 5.8 for the Iris module only?

[Attachment Removed]

Hi,

I don’t believe upgrading engine versions for a single module is something others have tried before. Cherry-picking relevant changes is how we generally recommend projects get targeted upgrades like this.

Thanks,

Alex

[Attachment Removed]