Summary: It seems nativization in 4.16 breaks the asyncloader in our project. Assets are not loading properly and causing a variety of issues described below.
Note1: The project loads and works fine when packaged without nativization.
Note2: The project works fine when nativization is enabled in 4.15.
Issue Description:
Nativized package crashes on 4.16 Preview 3, very early in the loading process after about 1 second or it will load but break the game in different parts.
Blueprint Nativization Method: Exclusive
List of Blueprint assets to Nativize: With the list populated or with an empty list has the same result as long as nativization is enabled for packaging.
Here is one example of a Crash Report:
LowLevelFatalError [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 651]
Attempt to process /Game/Gameplay/Objectives/Missions/MissionUnitWave/MissionUnitWave before it has been added.
> GalaxySample_Win64_Shipping!FDebug::AssertFailed() GalaxySample_Win64_Shipping!FEDLBootNotificationManager::NotifyRegistrationEvent()
> GalaxySample_Win64_Shipping!NotifyRegistrationEvent()
> GalaxySample_Win64_Shipping!GetStaticStruct()
> GalaxySample_Win64_Shipping!FMissionUnitWave__pf905351736::StaticStruct()
> GalaxySample_Win64_Shipping!ConstructDynamicType() GalaxySample_Win64_Shipping!FAsyncPackage::EventDrivenCreateExport()
> GalaxySample_Win64_Shipping!FAsyncPackage::ProcessImportsAndExports_Event()
> GalaxySample_Win64_Shipping!FAsyncPackage::Event_ProcessImportsAndExports()
> GalaxySample_Win64_Shipping!FObjectAndNameAsStringProxyArchive::operator<<()
> GalaxySample_Win64_Shipping!FAsyncLoadEventQueue::PopAndExecute()
> GalaxySample_Win64_Shipping!FAsyncLoadingThread::ProcessAsyncLoading()
> GalaxySample_Win64_Shipping!FAsyncLoadingThread::TickAsyncThread()
> GalaxySample_Win64_Shipping!FAsyncLoadingThread::TickAsyncLoading()
> GalaxySample_Win64_Shipping!FlushAsyncLoading()
> GalaxySample_Win64_Shipping!LoadPackageInternal()
> GalaxySample_Win64_Shipping!ResolveName()
> GalaxySample_Win64_Shipping!StaticLoadObjectInternal()
> GalaxySample_Win64_Shipping!StaticLoadObject()
> GalaxySample_Win64_Shipping!ConstructorHelpersInternal::FindOrLoadObject<UBehaviorTree>()
> [c:\program files\epic
> games\ue_4.16\engine\source\runtime\coreuobject\public\uobject\constructorhelpers.h:35]
> GalaxySample_Win64_Shipping!AH2_FactionAiController::AH2_FactionAiController()
> [c:\4.16\galaxysample\source\galaxysample\private\core\h2_factionaicontroller.cpp:13]
> GalaxySample_Win64_Shipping!UClass::CreateDefaultObject()
> GalaxySample_Win64_Shipping!UObjectForceRegistration()
> GalaxySample_Win64_Shipping!ProcessNewlyLoadedUObjects() GalaxySample_Win64_Shipping!FEngineLoop::PreInit() GalaxySample_Win64_Shipping!GuardedMain()
> GalaxySample_Win64_Shipping!GuardedMainWrapper()
> GalaxySample_Win64_Shipping!WinMain()
> GalaxySample_Win64_Shipping!__scrt_common_main_seh()
> [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
> kernel32 ntdll
The only “relevant” line from our project in the call stack is:
AH2_FactionAiController::AH2_FactionAiController() [c:\4.16\galaxysample\source\galaxysample\private\core\h2_factionaicontroller.cpp:13]
which is defined as:
AH2_FactionAiController::AH2_FactionAiController()
{
bWantsPlayerState = true;
//NOTE:Test on final release
static ConstructorHelpers::FObjectFinder<UBehaviorTree> BehaviorRef (TEXT("BehaviorTree'/Game/Gameplay/Ai/FactionAi/BT_StandardFactionAi.BT_StandardFactionAi'"));
DefaultBehavior = BehaviorRef.Object;
}
After further testing, by commenting the above code and setting DefaultBehavior = nullptr; in the constructor
the project will crash on other parts or will finish loading into the game (if we leave the list of assets to nativize empty in project settings) but assets are not loaded properly : for example umg button widgets on the HUD don’t function or don’t display their text and the game is unstable / will crash on various things like changing maps.
Beside sharing our project which is very large I am not sure how to go about reproducing this so it can be fixed. I have tried disabling the event loader and the async loader from project settings but it has not had any effect. Any ideas?