# UWorldPartitionStreamingPolicy::UpdateStreamingSources check fail due to size mismatch in LocalStreamingSources and CurrentState.StreamingSources 

**URL:** <https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [October 14, 2025, 10:08am UTC](https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043 "2025-10-14T10:08:00Z")\
**Posts on this page:** 5\
**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 14, 2025, 10:08am UTC](https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043/1 "2025-10-14T10:08:00Z")

</div>

Hey,

So we have a performance test which basically does a fly-through of the world, with the client connecting to a server (development cooked builds).

On tear-down we get this crash / check fail.

On the face of it, it looks like it’s due to the hashes incorrectly matching up, so rather than replacing the existing current state, it tries to do a delta update.

After adding a bit of logging:

```auto
!!!!!! OH NO !!!!!!
LocalStreamingSources.Num() != CurrentState.StreamingSources.Num()
Hash = 0x12d6cbfe
LocalStreamingSources
-------------
.Num = 1
[0].Name = GamePlayerController_0
CurrentState.StreamingSources
-------------
.Num = 0

```

While this is in of itself sort of weird and probably has deeper implications the actual fast path seems to do more work?

```auto
const UWorldPartitionSubsystem* WorldPartitionSubsystem = GetWorld()->GetSubsystem<UWorldPartitionSubsystem>();
	const uint32 NewUpdateStreamingSourcesHash = WorldPartitionSubsystem->GetStreamingSourcesHash();
	if (bCanOptimizeUpdate && (UpdateStreamingSourcesHash == NewUpdateStreamingSourcesHash))
	{
		TArray<FWorldPartitionStreamingSource> LocalStreamingSources;
		WorldPartitionSubsystem->GetStreamingSources(WorldPartition, LocalStreamingSources);
		check(LocalStreamingSources.Num() == CurrentState.StreamingSources.Num());
		const FTransform WorldToLocal = WorldPartition->GetInstanceTransform().Inverse();
		for (int32 i=0; i<LocalStreamingSources.Num(); i++)
		{
			check(CurrentState.StreamingSources[i].Name == LocalStreamingSources[i].Name);
			CurrentState.StreamingSources[i].Velocity = WorldToLocal.TransformVector(LocalStreamingSources[i].Velocity);
		}
		return;
	}
 
	CurrentState.StreamingSources.Reset();
	WorldPartitionSubsystem->GetStreamingSources(WorldPartition, CurrentState.StreamingSources);
	UpdateStreamingSourcesHash = NewUpdateStreamingSourcesHash;

```

If the hashes match, `WorldPartitionSubsystem-\>GetStreamingSources` is called and the existing sources velocity is updated via a transform.

If they don’t match `WorldPartitionSubsystem-\>GetStreamingSources` is called, without any transform.

Is this correct? It certainly seems like a weird thing to do?

Locally I “fixed” this by changing `bCanOptimizeUpdate` to be false at the top of the function, not sure if that’s actually valid?

Many thanks,

Alister

---

<div class="post-metadata">

**Author:** ![Svegn2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svegn2/32/924220_2.png) [@Svegn2](https://forums.unrealengine.com/u/Svegn2)\
**Post date:** [October 14, 2025, 5:56pm UTC](https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043/2 "2025-10-14T17:56:43Z")

</div>

Hi Alistair,

Are you running with _wp.Runtime.UpdateStreaming.EnableAsyncUpdate_ activated? If so, could you reproduce the problem with the debugger attached and share the PNG of the Parallel Stack? This looks like a race condition where the StreamingSource array in the Subsystem is being modified concurrently to _UWorldPartitionStreamingPolicy::UpdateStreamingSources()_.

Martin

---

<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 15, 2025, 9:11am UTC](https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043/3 "2025-10-15T09:11:01Z")

</div>

Hey Martin,

`_wp.Runtime.UpdateStreaming.EnableAsyncUpdate`_ is not enabled.

But in an annoying turn of events, when I now remove my fix, it doesn’t seem to crash anymore (use to be a 10/10).

---

<div class="post-metadata">

**Author:** ![Svegn2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svegn2/32/924220_2.png) [@Svegn2](https://forums.unrealengine.com/u/Svegn2)\
**Post date:** [October 15, 2025, 7:03pm UTC](https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043/4 "2025-10-15T19:03:36Z")

</div>

We think we have found the source of the problem but haven’t confirmed it yet. You can keep on using the workaround until we have a firm fix.

---

<div class="post-metadata">

**Author:** ![RichMawlow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RichMawlow](https://forums.unrealengine.com/u/RichMawlow)\
**Post date:** [October 15, 2025, 7:28pm UTC](https://forums.unrealengine.com/t/uworldpartitionstreamingpolicy-updatestreamingsources-check-fail-due-to-size-mismatch-in-localstreamingsources-and-currentstate-streamingsources/2675043/5 "2025-10-15T19:28:10Z")

</div>

Hi Alister,

A fix was submitted in our main branch (CL 46949279).

Richard
