Nativize Error - Ensure Condition Failed @ Line 127

I can’t compile the game when ‘Nativize Assets’ option is enabled. It gives some errors but I am unable to address it.

[2016.09.05-21.22.35:166][  0]LogBlueprint:Warning: Compiler Warning A node that generated no code of it's own ( ForEachLoop ) tried to inject code into  Add . K2Node_BreakStruct /Temp/__TEMP_BP__/Game/RORContent/Blueprints/TrackGenerator.TrackGenerator:EdGraph_73.K2Node_BreakStruct_195
[2016.09.05-21.22.35:322][  0]LogStats: FPlatformStackWalk::StackWalkAndDump -  0.029 s
[2016.09.05-21.22.35:322][  0]LogOutputDevice:Error: 
begin: stack for UAT
[2016.09.05-21.22.35:324][  0]LogOutputDevice:Warning: === Handled error: ===

Ensure condition failed: !ClassSubobjectsMap.Contains(Object) [File:d:\build\++ue4+release-4.12+compile\sync\engine\source\developer\blueprintcompilercppbackend\private\BlueprintCompilerCppBackendUtils.h] [Line: 127]

Stack: 
UE4Editor-Core.dll
UE4Editor-Core.dll
UE4Editor-Core.dll
UE4Editor-BlueprintCompilerCppBackend.dll
UE4Editor-BlueprintCompilerCppBackend.dll
UE4Editor-BlueprintCompilerCppBackend.dll
UE4Editor-BlueprintCompilerCppBackend.dll
UE4Editor-BlueprintCompilerCppBackend.dll
UE4Editor-BlueprintCompilerCppBackend.dll
UE4Editor-KismetCompiler.dll
UE4Editor-KismetCompiler.dll
UE4Editor-KismetCompiler.dll
UE4Editor-BlueprintNativeCodeGen.dll
UE4Editor-BlueprintNativeCodeGen.dll
UE4Editor-BlueprintNativeCodeGen.dll
UE4Editor-UnrealEd.dll
UE4Editor-UnrealEd.dll
UE4Editor-UnrealEd.dll
UE4Editor-UnrealEd.dll
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
UE4Editor-Cmd.exe
KERNEL32.DLL
ntdll.dll
ntdll.dll

[2016.09.05-21.22.35:324][  0]LogOutputDevice:Error: 
end: stack for UAT
[2016.09.05-21.22.35:324][  0]LogStats:                SubmitErrorReport -  0.000 s
[2016.09.05-21.22.35:951][  0]LogStats:                    SendNewReport -  0.627 s
[2016.09.05-21.22.35:951][  0]LogStats:             FDebug::EnsureFailed -  0.665 s
[2016.09.05-21.22.36:089][  0]LogBlueprint:Warning: Compiler Warning [0137.56] Compile of TrackGenerator successful, but with 301 Warning(s) [in 1,591 ms] 

Here is Cook-2016.09.06-00.23.28.txt :

and here is UAT_Log.txt :

Hello,

I see this message: LogBlueprint:Warning: Compiler Warning A node that generated no code of it’s own ( ForEachLoop ) tried to inject code into Add

Do you have a ForEachLoop in any of your blueprints that could potentially be causing this issue? It seems like it may have something to do with adding elements to an array while running a ForEachLoop. Does this sound like something you may have in your project? If so, please provide a screenshot of that blueprint.

Thank you

There are more than one hundred ForEachLoops in that blueprint. How can I find the buggy one by using this code?

Add . K2Node_BreakStruct /Temp/__TEMP_BP__/Game/RORContent/Blueprints/TrackGenerator.TrackGenerator:EdGraph_73.K2Node_BreakStruct_195

Nativization issues can be difficult to track down particularly for that reason.

I have one suggestion and one question:

  • Try opening a copy of the project in 4.13, as there have been a few bugs fixed that may relate to this issue.
  • Are you able to package the project successfully without Nativize Blueprint Assets enabled?

Also, if you take a look at your logs, you’ll see several divide by zero warnings, as well as other error messages that I’d like you to look into resolving as I continue to look into this.

Let me know the results of the 4.13 test, and if you are not able to package without Nativize Blueprints enabled please provide that output log as well.

Yes I can package the project without Nativize Blueprint Assets enabled.

I can’t open a copy in 4.13, because some plugin are still not compatible with 4.13. I will do this when they’ve released the updates.

Are divide by zero warnings critical? There are hundreds of divide and modulus functions in the blueprint, it is really hard for me to find them out. Isn’t there an easier way to detect which divide or modulus nodes are causing these issues? It gives me this warning but it is too generic to detect:

[2016.09.05-21.22.00:615][  0]LogScriptCore:Warning: Divide by zero
Script call stack:
	Function /Game/RORContent/Blueprints/TrackGenerator.TrackGenerator_C:UserConstructionScript
	Function /Game/RORContent/Blueprints/TrackGenerator.TrackGenerator_C:BuildTrackElement
	Function /Game/RORContent/Blueprints/TrackGenerator.TrackGenerator_C:GenerateProceduralSplineMesh

Also these lines don’t even say the class that they are in:

[2016.09.05-21.22.00:013][  0]LogScriptCore:Warning: Divide by zero: Divide_Vector2DFloat

[2016.09.05-21.22.00:013][  0]LogScriptCore:Warning: Divide by zero: Divide_Vector2DFloat

[2016.09.05-21.22.00:013][  0]LogScriptCore:Warning: Divide by zero: Divide_Vector2DFloat

[2016.09.05-21.22.00:013][  0]LogScriptCore:Warning: Divide by zero: Divide_Vector2DFloat

Divide by zero warnings can definitely cause issues, but it’s strange that you’re able to package it normally if those sort of errors exist.

If you look at these errors, it will tell you at least what graph you should be looking at: TrackGenerator_C:BuildTrackElement
So you can start there.

The reason that I’d like you to look into resolving the errors is because at the current time you’re working with a complex setup, and it will be difficult to determine the root cause of the issue without narrowing it down a bit.

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day