Exclusive nativized build crashes at start

In short:

In exclusive BP nativized option, build always crash at start, according to condition that which blueprint class is selected as nativized.

Description

In this condition, build always crash when start.

  • In Blueprint,
  • Instance of some class get return value from function of the other different class.
  • The return value from function has structure contains same class that got return value.
  • Packaged with exclusive nativized option. (If nativized option is inclusive or disabled, build does not crash.)
  • Only BP class that has function is selected to be nativized. or, None of BP classes selected to be nativized.
    (If only class got return value from function is selected to be nativized, or all of those classes are selected to be nativized, build does not crash.)

Steps to Reproduce

  • Run unreal engine (4.25.4), make empty project.

  • Make two Actor Blueprint. name with “ActorA”, “ActorB”

  • Make Blueprint Structure that contains object refference of ActorA, name with “StructA” (note screenshot#1)

  • In ActorB, make a function, that returns StructA, name with “FunctionB” (note screenshot#2)

  • In ActorA, make a custom event as below: (note screenshot#3)

    -------> Get All Actors Of Class ActorB.

    -------> Get first ActorB instance in array returned above.

    -------> Call FunctionB from ActorB instance.

  • Place ActorA and ActorB in level.

  • Set packaging options as below: (note screenshot#4)

    -------> Set “Blueprint Nativization method” as exclusive.

    -------> Do not add anything to “List of Blueprint assets to nativize”.

  • Package project. (in my case, Windows 64bit.)

  • Run packaged build.

    -------> Result: build crash at start.

    -------> Expected: No crash would occur.

  • Change packaging options as below:

    -------> Keep set “Blueprint Nativization method” as exclusive.

    -------> Add ActorB in “List of Blueprint assets to nativize”.

  • Package project again.

  • Run packaged build.

    -------> Result: build crash at start.

    -------> Expected: No crash would occur.

Crash message and call stack

Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading.cpp] [Line: 1012] Async loading event graph contained a cycle, see above.

ReproduceActorVer!FEventLoadGraph::CheckForCycles()
ReproduceActorVer!FAsyncLoadingThread::CheckForCycles()
ReproduceActorVer!FAsyncLoadingThread::TickAsyncLoading()
ReproduceActorVer!FAsyncLoadingThread::FlushLoading()
ReproduceActorVer!LoadPackageInternal()
ReproduceActorVer!LoadPackage()
ReproduceActorVer!UEngine::LoadMap()
ReproduceActorVer!UEngine::Browse()
ReproduceActorVer!UGameInstance::StartGameInstance()
ReproduceActorVer!FEngineLoop::Init()
ReproduceActorVer!GuardedMain()
ReproduceActorVer!GuardedMainWrapper()
ReproduceActorVer!WinMain()
ReproduceActorVer!__scrt_common_main_seh() [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

Additional comments

  • Problem does not appeared when you play in PIE, Standalone, and build packaged without nativization option.

  • You can use my minimal example projects from here: [Actor version link][1]

  • Object can make this problem. Here is example project, too: [Object and Level Blueprint version link][2] The level blueprint creates instances of two objects. I disconnect the node that calling event, but build crash as same. Because of this, I suspect that the code that detects some condition is working wrong.

  • To make clear this problem, and to make scope minimal, I had to spend last whole week, with over five hundred packaging. Sad thing is, I did not make to know why my own working project crash when I run packaged build. Still it is crashing, It seems there are more other causes. how painful…

  • At this moment, I have only option in nativization: Inclusive. My own working project is ok with inclusive nativization. But I have another problem with inclusive. I posted about this, too: [Inclusive nativized build crashes at start][3]

Questions

  • Is this some kind of anti pattern? Is this what I have to avoid? So EpicGames does prohibit?

  • I saw someone said like this: “Don’t use enum and struct in Blueprint.” I even saw someone said like this: “Avoid returning custom class in Blueprint. Just use built-in class in return” But, in my test, It seems ok when I use enum, struct, and custom class of blueprint as return of function. These problem seems be fixed. Am I right? Is there additional something that official document did not comment, but I have to avoid?

Screenshots

Screenshot#1

Screenshot#2

Screenshot#3

Screenshot#4

Hello,

We’ve made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

Thanks