# Garbage Collection Fatal Error, on AsyncLoad during ServerTravel

**URL:** <https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654>\
**Category:** Platform & Builds\
**Tags:** server-travel, asynchronous-asset-l, garbage-collection, unreal-engine, question\
**Created:** [October 27, 2016, 6:45pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654 "2016-10-27T18:45:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [October 27, 2016, 6:45pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/1 "2016-10-27T18:45:05Z")

</div>

I am looking for help tracing down a bug that only seems to be occurring in our modified project and not in ShooterGame.

During ServerTravel (seamless) we are running into an inconsistent crash (maybe 5%):

Going up the chain, the assets it is crashing on seem to be random. Including Standard Assets that do not have cyclic references. Some assets do which is suspicious but I am not seeing any kind of pattern in regards to the kind of assets other than they are blueprints.

```
!UStructProperty::ContainsObjectReference() [\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1472]
!UArrayProperty::EmitReferenceInfo() [\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1642]
!UStructProperty::EmitReferenceInfo() [\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1733]
!UStructProperty::EmitReferenceInfo() [\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1733]
!UClass::AssembleReferenceTokenStream() [\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1819]
!UBlueprintGeneratedClass::PostLoad() [\engine\source\runtime\engine\private\blueprintgeneratedclass.cpp:114]
!UObject::ConditionalPostLoad() [\engine\source\runtime\coreuobject\private\uobject\obj.cpp:812]
!FAsyncPackage::PostLoadDeferredObjects() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:2260]
!FAsyncLoadingThread::ProcessLoadedPackages() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:807]
!FAsyncLoadingThread::TickAsyncLoading() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:892]
!ProcessAsyncLoading() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:2688]
!StaticTick() [\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:428]
!UGameEngine::Tick() [\engine\source\runtime\engine\private\gameengine.cpp:1004]
!FEngineLoop::Tick() [\engine\source\runtime\launch\private\launchengineloop.cpp:2834]
!GuardedMain() [\engine\source\runtime\launch\private\launch.cpp:156]
!GuardedMainWrapper() [\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
!WinMain() [\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [October 27, 2016, 10:14pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/2 "2016-10-27T22:14:56Z")

</div>

Also crashed in “Preload” the crash above was in “Postload”. This test was in a packaged build. I have seen the crash in development and debug as well.

```
Access violation - code c0000005 (first/second chance not available)

Win64_Shipping!UStructProperty::ContainsObjectReference() [\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1484]
Win64_Shipping!UStruct::Link() [\engine\source\runtime\coreuobject\private\uobject\class.cpp:687]
Win64_Shipping!UFunction::Link() [\engine\source\runtime\coreuobject\private\uobject\class.cpp:4377]
Win64_Shipping!UStruct::Serialize() [\engine\source\runtime\coreuobject\private\uobject\class.cpp:1295]
Win64_Shipping!UFunction::Serialize() [\engine\source\runtime\coreuobject\private\uobject\class.cpp:4295]
Win64_Shipping!FLinkerLoad::Preload() [\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3410]
Win64_Shipping!FAsyncPackage::CreateExports() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:1930]
Win64_Shipping!FAsyncPackage::Tick() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:1399]
Win64_Shipping!FAsyncLoadingThread::ProcessAsyncLoading() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:722]
Win64_Shipping!FAsyncLoadingThread::Run() [\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:975]
Win64_Shipping!FRunnableThreadWin::Run() [\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [October 27, 2016, 10:26pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/3 "2016-10-27T22:26:23Z")

</div>

[https://github.com/EpicGames/UnrealEngine/commit/2fb69465](https://github.com/EpicGames/UnrealEngine/commit/2fb69465)

> **[Assertion Failed: Index \>= 0 in AsyncLoading::PostLoadDeferredObjects()](https://forums.unrealengine.com/questions/416178/assertion-failed-index-0-in-asyncloadingpostloadde.html)**
>
> So we have a large level which contains about 34 streaming levels, each with a reasonable number of objects within them, with a streaming distance of ~34000. Randomly moving the character throughout this level causes the following assert to happen...

← this looks like a similar issue but we are on 4.13.1 and I did also test by bringing over the memory alignment change in 4.13.2 which did fix a crash we were getting but not this one.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_61b4a355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_61b4a355](https://forums.unrealengine.com/u/anonymous_user_61b4a355)\
**Post date:** [October 28, 2016, 1:11pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/4 "2016-10-28T13:11:22Z")

</div>

Hey BW6ense,

Internally, we have two crashes with the same callstack but they do not provide any link to existing bugs. Because of this, it is exceptionally difficult for me reproduce what you are seeing.

Can you provide me any reference to the code you are using or a list of steps for me to see the same issue?

Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [October 28, 2016, 6:34pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/5 "2016-10-28T18:34:57Z")

</div>

Hi!

I was able to create a reproduction case!

I created two new levels {level1, level2} and set the gamemode on each to be seamless.

**important** place a blueprint asset into the level, i used standard assets Blueprint\_WallSconce (and it ends up being the object it crashes on)

In the level blueprint of each, On BeginPlay, I execute the command “ServerTravel level1/2” respectively. (I added a one second delay before calling, this probably has no effect, and no logic as to why i even bothered to do it).

Package to build (I used "Development)

Launch and attach VS Debugger and let it go until it crashes.

The VS Callstack:

```
 	!UStructProperty::ContainsObjectReference() Line 1472	C++
 	!UStructProperty::EmitReferenceInfo(UClass & OwnerClass, int BaseOffset) Line 1725	C++
 	!UClass::AssembleReferenceTokenStream(bool bForce) Line 1819	C++
 	!UClass::Serialize(FArchive & Ar) Line 3279	C++
 	!UBlueprintGeneratedClass::Serialize(FArchive & Ar) Line 1114	C++
 	!FLinkerLoad::Preload(UObject * Object) Line 3410	C++
>	!FAsyncPackage::CreateExports() Line 1930	C++
 	!FAsyncPackage::Tick(bool InbUseTimeLimit, bool InbUseFullTimeLimit, float & InOutTimeLimit) Line 1399	C++
 	!FAsyncLoadingThread::ProcessAsyncLoading(int & OutPackagesProcessed, bool bUseTimeLimit, bool bUseFullTimeLimit, float TimeLimit) Line 722	C++
 	!FAsyncLoadingThread::Run() Line 975	C++
 	!FRunnableThreadWin::Run() Line 74	C++
 	!FRunnableThreadWin::GuardedRun() Line 31	C++
 	[External Code]

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [October 28, 2016, 7:12pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/6 "2016-10-28T19:12:35Z")

</div>

Also. I got the crash quickly the first try, and now it’s gone for many minutes without crashing. I would suggest putting as many blueprint assets in as possible to maybe increase the chances of it crashing

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_61b4a355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_61b4a355](https://forums.unrealengine.com/u/anonymous_user_61b4a355)\
**Post date:** [October 28, 2016, 7:37pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/7 "2016-10-28T19:37:48Z")

</div>

When you say, “place a blueprint asset into the level”, what class is the Blueprint inheriting from?

Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [October 28, 2016, 8:47pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/8 "2016-10-28T20:47:45Z")

</div>

Ok it did crash again after 45 minutes, this time it was BP\_Sky\_Sphere\_C.  
The parent class is Actor for these blueprints. I only mention that it should be a blueprint because using StaticMeshActors didn’t seem to crash it, but it might… I mean with the inconsistency with time to reproduce I wouldn’t rule it out.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_61b4a355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_61b4a355](https://forums.unrealengine.com/u/anonymous_user_61b4a355)\
**Post date:** [October 31, 2016, 7:45pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/9 "2016-10-31T19:45:16Z")

</div>

Hey BW6ense,

Just wanted to let you know that I have tested on my end (for about 45 minutes) and didn’t have any crash.

I will test overnight and let you know tomorrow what happens.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_61b4a355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_61b4a355](https://forums.unrealengine.com/u/anonymous_user_61b4a355)\
**Post date:** [November 1, 2016, 3:10pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/10 "2016-11-01T15:10:42Z")

</div>

Hey again,

So I ran the test for hours and didn’t get the crash.

Can you possibly get the crash reported to execute? I think you should be able to by not attaching the process in Visual Studio and by building your project with Crash Reporter.

You can do this by going to Settings → Packaging and make sure “Include Crash Reporter” is checked.

If you can get Crash Reporter to open, can you post your Epic and/or Machine ID?

Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a18ac916](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a18ac916](https://forums.unrealengine.com/u/anonymous_user_a18ac916)\
**Post date:** [November 1, 2016, 4:51pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/11 "2016-11-01T16:51:32Z")

</div>

Yes it happened just now. Thank you for continuing to look into this!!

MachineId:91E2BBA546C25A185BF6058B17364170  
EpicAccountId:a8e1e5ee7d0b488896bc092405fda426

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_61b4a355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_61b4a355](https://forums.unrealengine.com/u/anonymous_user_61b4a355)\
**Post date:** [November 3, 2016, 3:24pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/12 "2016-11-03T15:24:30Z")

</div>

Hey BW6ense,

Thanks for the ID’s.

Sadly, I still cannot reproduce it on my end so the only option I have left is to ask you for the project you are using so I can test with that; as the differences in what I understand as the issue and what you are seeing can vary.

You can either attach a sample project to this thread (as long as its under 5MB) or use something like Google Drive or Dropbox and post a link.

If you cannot do this, there isn’t anymore I can do on my end and the issue doesn’t happen on my end.

thanks.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [November 7, 2016, 2:16pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/13 "2016-11-07T14:16:02Z")

</div>

Hey BW6ense,

As stated, without a repro case we will need to look at the project you’re using.

If you’d like to do this, please PM me a link to the project through the forums at this link: [https://forums.unrealengine.com/member.php?160394-Sean-Flint](https://forums.unrealengine.com/member.php?160394-Sean-Flint)

Otherwise, we are unable to take any further action with this issue.

Have a great day

---

<div class="post-metadata">

**Author:** ![Lee-CL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lee-CL](https://forums.unrealengine.com/u/Lee-CL)\
**Post date:** [November 7, 2016, 5:41pm UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/14 "2016-11-07T17:41:27Z")

</div>

UStructProperty::ContainsObjectReference isn’t thread safe and it is being called from both the Game Thread and the FASyncLoading thread. This causes the static EncounteredStructProps array to be accessed and modifed concurrently by multiple threads.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_57b7d24e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_57b7d24e](https://forums.unrealengine.com/u/anonymous_user_57b7d24e)\
**Post date:** [February 16, 2017, 3:16am UTC](https://forums.unrealengine.com/t/garbage-collection-fatal-error-on-asyncload-during-servertravel/374654/15 "2017-02-16T03:16:39Z")

</div>

I have a same problem in my project with 4.13.2. How to resolve it ,thx at all
