Hi Dmitry,
I have yet not been able to reproduce a crash with the changes. If it really is the iterator/actor channel map that is crashing, you could try switching to iterating on the open channels list instead (should generally be safer in case this is a garbage collection problem):
for (UChannel* Channel : ServerConnection->OpenChannels)
{
UActorChannel* ActorChannel = Cast(Channel);
if (ActorChannel)
{
ActorChannel->CleanupReplicators();
}
}
It may be worth adding logging to the replicator cleanup loop with the contents of UChannel::Describe() to help track down what is or is not being cleaned up before the crash, but it would be a lot of log spam in the normal working scenario.