Assert failed in UNetDriver::ServerReplicateActors()
Sometimes when I start multiplayer PIE session my Editor crashes with assertion failed inside UNetDriver::ServerReplicateActors().
This is the line with assert:
Here is explanation of what's going on:
When Editor setups PIE session it spawns a bunch of actors, and some of them get added to NetworkActors array of each World. One of those actors is AAbstractNavData.
Here is screenshot of debugger when it happens (File: World.cpp):
By the time execution reaches NetworkDriver::ServerReplicateActors() this AAbstractNavData gets garbage collected, but pointer in the array still exists (Notice pointer addresses of items with index  in both screenshots): Then this actor pointer is removed from NetworkActors array because its NetDriverName not equals to this (Line 1953) and everything works fine after that.
But sometimes garbage collection starts a litlle bit earlier – just before second PIE world is created. When Editor spawns actors for it, memory allocator could give a chunk of memory previously occupied by AbstractNavData to a new Actor. Though this new Actor never get directly added to NetworkActors array of another World pointer to it is already there.
This was tested on 4.8.2 version downloaded with launcher.
I'm still looking into this crash and trying to reproduce it so that I can get it reported but I've had no success thus far. In the meantime, can both of you try making a copy of your project to see if this issue persists in 4.9 Preview 1? It is possible that it has been inadvertently fixed.
answered Jul 30 '15 at 05:57 PM
Matthew J ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here