Description

Received a report from a licensee using Network Prediction Plugin and Mover. 

There is a strong likelihood of a crash occurring when using NPP's smoothing option and spawning new NPP-simulating instances. This can trigger a reallocation of smoothing instance data, invalidating cached pointers as used in FNetworkPredictionStateView. 

One case where this crash can occur is for Mover actors using based movement, which attempts to read and modify the smoothed presentation state, which is now pointing to invalid memory.

Steps to Reproduce

Although Mover is not required, it would be easiest to use MoverExamples characters in a test map.

In Project Settings, set Network Prediction to used Fixed Tick mode with Smoothing enabled.

In a test map, create some BP scripting that spawns a new character every few seconds, such as AnimatedMannyPawn.  The characters should be spawned above a dynamic (moveable) platform, which forces them to fall onto it and use based movement.

After some number of spawns, we will have created enough to trigger a reallocation of the smoothing service's sparse array  (see TFixedSmoothingService::RegisterInstance -> Instances.InsertUninitialized)

This is likely to cause a dangling pointer in FNetworkPredictionStateView and a crash to occur on the next based movement update of any existing character (in ReadPresentationSyncState).

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - Gameplay - Network Prediction
Affects Versions5.5
Target Fix5.6
CreatedApr 4, 2025
UpdatedApr 8, 2025
View Jira Issue