Description

UNetDriver::DestroyedStartupOrDormantActors maintains a list of deleted startup (and dormant) actors.

This is used to notify clients that have joined the server of Actors that need to be destroyed or marked dormant to synchronize state with the server.

However, these entries are stored as GUIDs that can be used against the PackageMap (not actor pointers), and are not removed when the owning sublevel is unloaded.

Since the package map / guids aren't necessarily cleared, this can leave dangling references to the actor.

Steps to Reproduce
  1. Download the attached project.
  2. Start a Server instance
    /Path/To/UE4Editor.exe /Path/To/SublevelCrash.uproject MainLevel?listen -game -WINDOWED
  3. On the server do the following sequence of events: Press 1 (Load the Sublevel), Press 3 (Delete the Actor), Press 2 (Unload the Sublevel), Press 1 (Load the Sublevel).
  4. Start a Client instance
    /Path/To/UE4Editor/exe /Path/To/SublevelCrash.uproject 127.0.0.1 -game -WINDOWED

Expected:
Client connects to the server with no issues.

Actual:
Server crashes when client tries to connect.

Callstack
Assertion failed: ObjectOuter != NULL [File:D:\Builds\J.Nabozny_Dev-Networking\Engine\Source\Runtime\Engine\Private\PackageMapClient.cpp] [Line: 586] 



UE4Editor_Core!FDebug::AssertFailed() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_Engine!UPackageMapClient::InternalWriteObject() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\packagemapclient.cpp:587]
UE4Editor_Engine!UPackageMapClient::ExportNetGUID() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\packagemapclient.cpp:940]
UE4Editor_Engine!UPackageMapClient::WriteObject() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\packagemapclient.cpp:228]
UE4Editor_Engine!UActorChannel::SetChannelActorForDestroy() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\datachannel.cpp:1910]
UE4Editor_Engine!UNetDriver::ServerReplicateActors_ProcessPrioritizedActors() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\networkdriver.cpp:2964]
UE4Editor_Engine!UNetDriver::ServerReplicateActors() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\networkdriver.cpp:3255]
UE4Editor_Engine!UNetDriver::TickFlush() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\networkdriver.cpp:362]
UE4Editor_Engine!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float)>::ExecuteIfSafe() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:858]
UE4Editor_Engine!TBaseMulticastDelegate<void,float>::Broadcast() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
UE4Editor_Engine!UWorld::Tick() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\leveltick.cpp:1525]
UE4Editor_Engine!UGameEngine::Tick() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\engine\private\gameengine.cpp:1147]
UE4Editor!FEngineLoop::Tick() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\launch\private\launchengineloop.cpp:3181]
UE4Editor!GuardedMain() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\builds\j.nabozny_dev-networking\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]

Have Comments or More Details?

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

2
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.114.124.134.144.154.164.174.18
Target Fix4.18
Fix Commit3575518
Main Commit3596435
Release Commit3643070
CreatedJul 13, 2017
ResolvedAug 17, 2017
UpdatedAug 10, 2018
View Jira Issue