Engine versions: 4.22 and 4.24
Background: I’m currently working on a project where I started out with Blueprints, and I’ve been working with 99% blueprints ever since. Recently, I decided to try out the “Nativization” setting, and boy have that been problematic. It works if I select nothing to nativize (apart from an Enum-Switch case not working) but when I use nativization like it’s supposed to, I’m having so many issues I don’t really know what to name this thread, it’s just as if nothing works and I feel helpless. The error messages give me nothing to go on and all hail from a single file throwing assertion errors: Runtime\CoreUObject\Private\Serialization/AsyncLoading.h .
What: The program I compile crashes at startup when using Nativization. Compiling gives no error messages.
Is there an error message?: Yes, but there is a built-in assertion throwing the error. It gives me no indication of **why **it crashes or where the error has occured that caused the error to be raised. Compilation shows no error other than a warning that a referenced directory missing, which it does when compiling for blueprints as well, and in that case it works fine. “Fixing” this transforms it into a more dangerous warning that there are now two competing directories for the plugin. I won’t touch that further.
What I have tried: Countless configurations. What works is if I nativize the project but don’t include any files, or only files that don’t reference anything else. When including the blueprints I really want to nativize, the only difference seems to happen between Inclusive/Exclusive nativization.
Exclusive nativization: When using exclusive nativization, I get the crash with the error “Async loading event graph contained a cycle, see above.”. It was suggested to me that this is because of using “Exclusive nativization” on only a few blueprints, and the cross-referencing between C++ and blueprints caused a disallowed cycle. Thus I started trying “Inclusive nativization”. No googled threads solved the issue. In 4.24, It says “Assertion failed: !bCheckAdded || NodeRef.bAddedToGraph”. Full logs at bottom.
Inclusive nativization: Now, the project still compiles fine, but the compile time goes from 1 hour to 7 hours, making it hard to debug. When starting the program, I now get another error: Assertion failed: “RecursionNotAllowed.Increment() == 1”. That is without changing anything, which doesn’t make sense.
Error logs:
4.22, Exclusive nativization (Async loading event graph contained a cycle, see above.)
4.22, Inclusive nativization (Assertion failed: RecursionNotAllowed.Increment() == 1)
4.22, Another startup map (Error: Cycle Node in log) (New!)
4.24, Exclusive nativization (Assertion failed: !bCheckAdded || NodeRef.bAddedToGraph)
4.24, Inclusive nativization is exactly the same as 4.22
There is no difference between these versions and the 4.24 project is directly upgraded from 4.22. Some nodes were disconnected in this process due to an engine bug and were not reconnected before compiling.
My project is 99% blueprints and compiles fine without nativization, so I believe the C++ code is fine. I do not claim that my programming is perfect, I had a ton of nodes looking like this and a user suggested I remove it, but it has not solved either of the errors I’m getting. Where do I start with debugging this? I have tried my best to reproduce it either by removing huge chunks of the project and compiling these separately or by starting a new project and trying to make it crash, and I can’t do it. It’s only in this project, and I can’t figure out what’s gone wrong.
Where to I start debugging this? What is the point of the assertions if they don’t tell what is wrong? I have no clues to go by and I need desperate help.