Async loading event graph contained a cycle?UE4-27

My blueprints project works with nativization disabled. With inclusive nativization the program builds, but it won’t boot on the device.
I’m what I’d call a terrible programmer, I mostly know html java and jass script. I can understand about 80% of C++ after staring at code for 15mins. I really just want to produced nativized packaged versions and keep the project as blueprints for now.

When I open a terminal window and run it with ./ValkyrieSoldier.sh

Looking for binary: ../../../ValkyrieSoldier/Config/BinaryConfig.ini
Failed to find symbol file, expected location:
"/run/media/user/New_Volume/ue4/packaged/LinuxNoEditor/ValkyrieSoldier/Binaries/Linux/ValkyrieSoldier-Linux-Shipping.sym"
LowLevelFatalError [File:Unknown] [Line: 981] 
Async loading event graph contained a cycle, see above.
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554 
CommonUnixCrashHandler: Signal=11
Malloc Size=131160 LargeMemoryPoolOffset=196744 
Malloc Size=131160 LargeMemoryPoolOffset=327928 
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
./ValkyrieSoldier.sh: line 5:  8940 Segmentation fault      (core dumped) "$UE4_PROJECT_ROOT/ValkyrieSoldier/Binaries/Linux/ValkyrieSoldier-Linux-Shipping" ValkyrieSoldier "$@"

on android it seems to think there’s a loop going on somewhere

This is the android log starting at line 1139

[2022.05.08-13.39.59:179][  0]LogAudio: Display: Audio Device (ID: 1) registered with world 'Untitled'.
[2022.05.08-13.39.59:182][  0]LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden
[2022.05.08-13.39.59:185][  0]LogInit: Display: Game Engine Initialized.
[2022.05.08-13.39.59:187][  0]LogInit: Display: Starting Game.
[2022.05.08-13.39.59:187][  0]LogNet: Browse: /Game/Levels/title?Name=Player
[2022.05.08-13.39.59:187][  0]LogLoad: LoadMap: /Game/Levels/title?Name=Player
[2022.05.08-13.39.59:188][  0]LogWorld: BeginTearingDown for /Temp/Untitled_3
[2022.05.08-13.39.59:195][  0]LogWorld: UWorld::CleanupWorld for Untitled, bSessionEnded=true, bCleanupResources=true
[2022.05.08-13.39.59:195][  0]LogSlate: InvalidateAllWidgets triggered.  All widgets were invalidated
[2022.05.08-13.39.59:234][  0]LogAudio: Display: Audio Device unregistered from world 'None'.
[2022.05.08-13.39.59:240][  0]LogUObjectHash: Compacting FUObjectHashTables data took   2.98ms
[2022.05.08-13.40.00:594][  0]LogStats: FPlatformStackWalk::StackWalkAndDump -  0.180 s
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: === Handled ensure: ===
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: 
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: Ensure condition failed: GetShadowIndex() == 0 [File:/home/user/UnrealEngine-4.27.2-release/Engine/Source/Runtime/Core/Public/HAL/IConsoleManager.h] [Line: 1314]
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: 
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: Stack: 
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x0000000080B5C9F4 libUE4.so(0x000000000A2FB9F4)!TConsoleVariableData<bool>::GetValueOnGameThread() const::'lambda'()::operator()() const  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x0000000080AFB8EC libUE4.so(0x000000000A29A8EC)!UMovieSceneCompiledDataManager::CompileTrack(FMovieSceneCompiledDataEntry*, FMovieSceneBinding const*, UMovieSceneTrack*, FTrackGatherParameters const&, TSet<FGuid, DefaultKeyFuncs<FGuid, false>, FDefaultSetAllocator>*, FMovieSceneGatheredCompilerData*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x0000000080AF9208 libUE4.so(0x000000000A298208)!UMovieSceneCompiledDataManager::Compile(FMovieSceneCompiledDataID, UMovieSceneSequence*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x0000000080AFB4D4 libUE4.so(0x000000000A29A4D4)!UMovieSceneCompiledDataManager::Compile(UMovieSceneSequence*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007D0A2004 libUE4.so(0x0000000006841004)!UcombatText_C__pf3975599377::__CustomDynamicClassInitialization(UDynamicClass*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E202CD4 libUE4.so(0x00000000079A1CD4)!UClass::CreateDefaultObject()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E20D3E4 libUE4.so(0x00000000079AC3E4)!UDynamicClass::CreateDefaultObject()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E1445F8 libUE4.so(0x00000000078E35F8)!FAsyncPackage::EventDrivenCreateExport(int)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E140900 libUE4.so(0x00000000078DF900)!FAsyncPackage::ProcessImportsAndExports_Event()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E1401F8 libUE4.so(0x00000000078DF1F8)!FAsyncPackage::Event_ProcessImportsAndExports()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E14DC88 libUE4.so(0x00000000078ECC88)!FAsyncLoadingThread::ProcessAsyncLoading(int&, bool, bool, float, FFlushTree*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E157408 libUE4.so(0x00000000078F6408)!FAsyncLoadingThread::TickAsyncThread(bool, bool, float, bool&, FFlushTree*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007E15931C libUE4.so(0x00000000078F831C)!FAsyncLoadingThread::Run()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007DB9F638 libUE4.so(0x000000000733E638)!FRunnableThreadPThread::Run()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x000000007DA7445C libUE4.so(0x000000000721345C)!FRunnableThreadPThread::_ThreadProc(void*)  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x00000000B190B134 libc.so(0x00000000000A6134)![Unknown]()  []
[2022.05.08-13.40.00:594][  0]LogOutputDevice: Error: [Callstack] 0x00000000B18C5744 libc.so(0x0000000000060744)![Unknown]()  []
[2022.05.08-13.40.00:595][  0]LogOutputDevice: Error: 
[2022.05.08-13.40.00:595][  0]LogStats:                SubmitErrorReport -  0.000 s
[2022.05.08-13.40.00:595][  0]LogStats:                    SendNewReport -  0.000 s
[2022.05.08-13.40.00:595][  0]LogStats:             FDebug::EnsureFailed -  0.182 s
[2022.05.08-13.40.00:595][  0]LogTexture: Error: Texture2D /Game/effects/dustgrey3.dustgrey3 contains no miplevels! Please delete. (Format: 0)
[2022.05.08-13.40.00:595][  0]LogTexture: Error: Texture2D /Game/MobileStarterContent/Textures/T_Explosion_SubUV.T_Explosion_SubUV contains no miplevels! Please delete. (Format: 0)
[2022.05.08-13.40.00:597][  0]LogTexture: Error: Texture2D /Game/enemies/ghostfish/ghostfishSNORKELLINGdies.ghostfishSNORKELLINGdies contains no miplevels! Please delete. (Format: 0)
[2022.05.08-13.40.00:597][  0]LogTexture: Error: Texture2D /Engine/VREditor/LaserPointer/VR_LaserPower_01.VR_LaserPower_01 contains no miplevels! Please delete. (Format: 0)
[2022.05.08-13.40.00:598][  0]LogTexture: Error: Texture2D /Paper2D/PlaceholderTextures/FlatNormalMap.FlatNormalMap contains no miplevels! Please delete. (Format: 0)
[2022.05.08-13.40.00:601][  0]LogTexture: Error: Texture2D /Engine/EngineVolumetrics/Fogsheet/Materials/T_EV_BlankWhite_01.T_EV_BlankWhite_01 contains no miplevels! Please delete. (Format: 0)
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 2 Export_Create   /Game/projectiles/BossFireball/Default__BossFireball_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/enemyfireball1 -557 Import_Create   /Game/projectiles/BossFireball/Default__BossFireball_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/enemyfireball1 1 Export_StartIO   /Game/projectiles/enemyfireball1/enemyfireball1_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/enemyfireball1 1 Export_Serialize   /Game/projectiles/enemyfireball1/enemyfireball1_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/enemyfireball1 2 Export_Create   /Game/projectiles/enemyfireball1/Default__enemyfireball1_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/enemyfireball1 2 Export_StartIO   /Game/projectiles/enemyfireball1/Default__enemyfireball1_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/enemyfireball1 2 Export_Serialize   /Game/projectiles/enemyfireball1/Default__enemyfireball1_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball -19 Import_Create   /Game/projectiles/enemyfireball1/Default__enemyfireball1_C/PaperFlipbook/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball -19 Import_Serialize   /Game/projectiles/enemyfireball1/Default__enemyfireball1_C/PaperFlipbook/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 4 Export_Create   /Game/projectiles/BossFireball/BossFireball_C/PaperFlipbook_GEN_VARIABLE/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 3 Export_StartIO   /Game/projectiles/BossFireball/BossFireball_C/InheritableComponentHandler/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 3 Export_Serialize   /Game/projectiles/BossFireball/BossFireball_C/InheritableComponentHandler/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 1 Export_StartIO   /Game/projectiles/BossFireball/BossFireball_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 1 Export_Serialize   /Game/projectiles/BossFireball/BossFireball_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/projectiles/BossFireball 2 Export_Create   /Game/projectiles/BossFireball/Default__BossFireball_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/widgets/titlemenu -559 Import_Create   /Game/projectiles/BossFireball/Default__BossFireball_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/widgets/titlemenu 1 Export_StartIO   /Game/widgets/titlemenu/titlemenu_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/widgets/titlemenu 1 Export_Serialize   /Game/widgets/titlemenu/titlemenu_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/widgets/titlemenu 2 Export_Create   /Game/widgets/titlemenu/Default__titlemenu_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/Levels/title -59 Import_Create   /Game/widgets/titlemenu/Default__titlemenu_C/
[2022.05.08-13.40.00:615][  0]LogStreaming: Error: Cycle Node /Game/widgets/titlemenu 0 Package_ExportsSerialized   
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: === Critical error: ===
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: 
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: Fatal error: [File:/home/user/UnrealEngine-4.27.2-release/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading.cpp] [Line: 981] 
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: Async loading event graph contained a cycle, see above.
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: [Callstack] 0x000000007E133088 libUE4.so(0x00000000078D2088)![Unknown]()  []
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: [Callstack] 0x0000000000000000 (0x0000000000000000)!UnknownFunction []
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: [Callstack] 0x0000000000000000 (0x0000000000000000)!UnknownFunction []
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: [Callstack] 0x0000000000000000 (0x0000000000000000)!UnknownFunction []
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: [Callstack] 0x0000000000000000 (0x0000000000000000)!UnknownFunction []
[2022.05.08-13.40.00:615][  0]LogAndroid: Error: [Callstack] 0x0000000000000000 (0x0000000000000000)!UnknownFunction []

Okay, from what I’ve read, and tried, build nativization doesn’t seem to work. Most users from what I’ve read are just converting their ticks, complex functions & repeating events to C++ functions and running the rest through blueprints.
This one guy, when he DID get nativization working, he had inconsistent unrecoverable errors that seemed to break his project.

As I’ve mentioned before, I am a relative newcomer to the engine. I could be mistaken.

Hey dude, for some reason I got an email ping after you linked my thread, so I might as well respond: I never got nativization working, it is buggy and probably not what you’re looking for. Not only that, but about 1 year later I ran into another issue with Blueprints where the project crashed at startup because of an issue related to the nativization issue.

I luckily solved that second issue and I think that was why nativization never worked, so let me try to explain real quick in case you are having the same issue. When you load a Blueprint, the engine creates “reference graphs” about what other Blueprints that specific Blueprint needs to know about. Say you have class A that is the world, Class B that is a campfire, and Class C that is the player. Now, you probably want the player to be able to sit near the campfire, so you might have a function that refers to the campfire in some way (Check what’s looked at → Cast to CampFire). In the same way, you might want the campfire to check for the player whenever someone steps on it (Cast To PlayerCharacter on Overlap) and hurt the player accordingly.

Now this is me taking a chance based on what went wrong for me, but I think with this little endeavour, you have now created a “cycle in the event graph”, as CampFire refers to PlayerCharacter and vice versa. To check this, open the Blueprint, go to Asset->SizeMap. This is what the engine needs to keep in memory in order to keep an instance of this Actor loaded. If you see two things referring to each other: Congratulations, you’ve found an issue that you should immediately stop doing in the future! The SizeMap should optimally ONLY show its own variables and not a huge cascade of references.

So how do B and C talk to each other? The answer is Interfaces. Interfaces don’t give a ■■■■ what the other object is, they call a function but only if they are on that object. You can create interfaces in both Blueprints and C++. They can also have return values, and if so they show up as functions. For example, create an interface for damage, and one function DealDamage: Input float DamageDealt, output bool DealtDamage. Go to PlayerCharacter->Class Settings->Interfaces → Add the DamageInterface to the character. Set up so when the campfire detects an overlap, it simply sends a message via the interface called “DealDamage”. For the CampFire, create an interface called PlayerInteraction or something and define in the Campfire what happens when it is interacted with. Also define that when the function returns true, that means we found something we can interact with, and do what is needed in the player character. If you’ve gotten to this point, you might be able to do the nativization, but more importantly: You won’t run into the wall I did where your project crashes at startup! (a much more serious issue)

Let me also clarify that this persist as long as there is any reference at all between these blueprints. A single local variable in a function creates a connection in the reference graph. these can sometimes be a pain to find and patch, so the earlier you get rid of this habit the better.

With all this in mind… I should also mention nativization is pretty buggy on its own, takes an incredibly long time to compile, and also can vastly affect performance (my loading times between levels tripled with nativization). It is not a replacement for writing proper C++ code. unless you’ve gotten very far on your game, I’d suggest trying to convert as much as possible to C++ base classes, then make the Blueprints child Blueprints off of that.

In short, if you got to this point, please check that you aren’t about to run into the issue I just had! Chances are you can’t use Nativization in the way you were hoping, but this is as far as I got and what I did to circumvent my issues. That’s all I can say, hope this helps in some way!

My original thread where I solved this issue:

1 Like

Thanks for pointing out a likely possible culprit in my blueprints. I have many actors that inter-communicate (especially during startup) and I’ve been trying to remove the ticks and actor creation events.

Now this is me taking a chance based on what went wrong for me, but I think with this little endeavour, you have now created a “cycle in the event graph”, as CampFire refers to PlayerCharacter and vice versa. To check this, open the Blueprint, go to Asset->SizeMap. This is what the engine needs to keep in memory in order to keep an instance of this Actor loaded. If you see two things referring to each other: Congratulations, you’ve found an issue that you should immediately stop doing in the future! The SizeMap should optimally ONLY show its own variables and not a huge cascade of references.

I think my main problem with my 2dNinjaCharacter BP is that it created all these widgets and assigns a variables to them, and then those widgets go and assign 2dNinjaCharacter to a variable, creating the cycle in the event graph somehow.
I have one interface for 2dNinjaCharacter set up from a previous tutorial, so I’ll check out how i did it and familiarize myself with interface objects. It’s true that i use cast way too often.

Thanks for the genuinely encouraging response. You’ve given me a lot to think about for the next couple days, although nativization doesn’t sound like the solution I’m looking for. The whole point of this was to reduce loading times, but from what you’re saying, nativization would only increase loading times.

I really appreciate how you go into detail in that post you linked. This is stuff I definitely needed to know.

1 Like

I had this problem when BP character had reference to ABP and vice versa. So i just made child class of BP and put all references to ABP there(including set this ABP in mesh settings) so it fixed circular dependencies when blueprint nativization is turned on