# Ensure in FReplicationReader around tracking unresolved object references 

**URL:** <https://forums.unrealengine.com/t/ensure-in-freplicationreader-around-tracking-unresolved-object-references/2874335>\
**Category:** Multiplayer & Networking\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [October 27, 2026, 8:49am UTC](https://forums.unrealengine.com/t/ensure-in-freplicationreader-around-tracking-unresolved-object-references/2874335 "2026-10-27T08:49:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 27, 2026, 8:49am UTC](https://forums.unrealengine.com/t/ensure-in-freplicationreader-around-tracking-unresolved-object-references/2874335/1 "2026-10-27T08:49:11Z")

</div>

Hey,

We regularly see the ensure(false) in FReplicationReader::ResolveAndDispatchUnresolvedReferencesForObjects line 2040, with the error “Trying to resolve references for non-existing object ( InternalIndex: %u )”.

The context is we have player pawns which can be conditionally replicated to a client, which are referenced by an always relevant player state for each player (via an AbilitySystemComponent on the player state), and so when a player pawn stops being replicated to a client Iris keeps track of the unresolved references to the pawns in FReplicationReade::UnresolvedHandleToDependents.

Seems that what might be happening is that this map can end up with duplicate owner-\>networkhandle entries over time, and when the owner is destroyed (eg, in this case when a player leaves a session and their replicated player states are destroyed for other players), the map can end up with stale entries for the duplicates.

There’s a comment on line 1864 to the effect that it’s intentional that the map can contain duplicates but that TMultiMap::Remove() should be used when clearing entries for the map, but I see that RemoveSingle() is used in a couple of places when removing tracked handles.

1. I see one instance of Remove() being used on that map in FReplicationReader::UpdateObjectReferenceTracking\_Fast, and I haven’t seen the ensure fire with fast object tracking enabled. The CVar mentions it’s still in testing though so would you recommend against using it?
2. Alternatively should Remove() be used other places, or do you have any other suggestions around this? (edit: I notice that the comment above about Remove() relates to the fast object tracking code path, so is it a bug with the normal route that duplicate entries can exist in the first place?)

Thanks

Alistair

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 27, 2026, 8:49am UTC](https://forums.unrealengine.com/t/ensure-in-freplicationreader-around-tracking-unresolved-object-references/2874335/2 "2026-10-27T08:49:14Z")

</div>

**Steps to Reproduce** [Attachment Removed]

---

<div class="post-metadata">

**Author:** ![akoumandarakis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/akoumandarakis/32/1087813_2.png) [@akoumandarakis](https://forums.unrealengine.com/u/akoumandarakis)\
**Post date:** [October 29, 2026, 3:56pm UTC](https://forums.unrealengine.com/t/ensure-in-freplicationreader-around-tracking-unresolved-object-references/2874335/3 "2026-10-29T15:56:37Z")

</div>

Hi,

Thank you for the report!

I believe this issue should be fixed in 5.8. As of CL 48553105 in UE5/Main, the Replication Reader was refactored to only use the fast object reference tracking, removing the “net.Iris.UseOptObjectRefTracking” CVar. As part of this change, FReplicationReader::UpdateObjectReferenceTracking was removed as well, along with the calls to RemoveSingle.

This change was made not long after the release of 5.7, and I wasn’t able to find any significant changes made to FReplicationReader between 5.7 and CL 48553105. I believe you should be fine to enable this CVar in 5.7 to avoid the ensure, but if you run into any issues, please don’t hesitate to reach out.

Thanks,

Alex

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 29, 2026, 5:43pm UTC](https://forums.unrealengine.com/t/ensure-in-freplicationreader-around-tracking-unresolved-object-references/2874335/4 "2026-10-29T17:43:29Z")

</div>

Thanks very much for your help!

[Attachment Removed]
