Performance optimization causes ServerReplicateActors to fail an ensure

I have a 100% blueprint project running on 4.8 Preview 2, but this issue has popped up occasionally in the past.

I have a multiplayer project where a client can connect to a host just fine and all systems are functional, however if I add in about 15 or more static mesh cubes with simulate physics enabled as well as replicate movement, the host crashes when trying to replicate these actors to the client. Specifically it crashes with:

Ensure condition failed: ConsiderList.Num() < ConsiderList.Max() [File:D:\allarjealdepot\Engine\Source\Runtime\Engine\Private\NetworkDriver.cpp] [Line: 2007]

Upon further inspection, ConsiderList is being reserved to have space for World->GetNetRelevantActorCount() + 2. It appears that GetNetRelevantActorCount() is either not returning the correct count or perhaps the + 2 isn’t accurate and needs to be higher in some cases. Perhaps these static mesh actors are not being included in the count and the ConsiderList array is being resized when the actors are added, thus not leaving extra space for the WorldSettings to be added?

In any case, commenting out this ensure and allowing the ConsiderList to add WorldSettings results in expected behavior, minus preventing the ConsiderList from being reallocated.

If I only add 5 or 6 static mesh actors that replicate movement, seems to work just fine. There seems to be some sort of threshold which will cause this to break down though.

Hi Allar,

I wasn’t able to reproduce this in a new blank project in 4.7.6 or in 4.8p2. Are you able to reproduce this in a new project, or does it only occur in your current project? If you’re able to make this happen in a new test project, please upload it somewhere like Dropbox or Google Drive and get us a download link so we can take a look. Thanks!

I’m able to reproduce this in any project running on any version of 4.8, a few others also crashing too.

Sample project:

Video showing the crash (Sorry for the music, didn’t realize it was being piped through OBS)

I also have this issue in an existing project. After some debugging it seems that level->iFirstNetRelevantActor is not set properly because the actors have their RemoteRole set to ROLE_None. I did find a workaround: after converting the static mesh cubes to a blueprint it seems to work fine.

Hi all,

Thanks for the report! I was able to reproduce a crash under the same circumstances (not sure why I didn’t the first time), and I’ve entered a bug report for it (UE-15831). My call stack looks different than yours, Allar, so if you don’t mind I’d like to get the log from a project after this crash occurs, as well as an image of the Crash Reporter dialogue so I can look that up (the video was too blurry for me to read it). Then I can add that to the report.

I’ll let you know as soon as I see any update on this, or if we have any other questions for you. Thanks again!