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.
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).
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-265975 in the post.
0 |
Component | UE - Gameplay - Network Prediction |
---|---|
Affects Versions | 5.5 |
Target Fix | 5.6 |
Created | Apr 4, 2025 |
---|---|
Updated | Apr 8, 2025 |