Packaging Error (Ensure condition failed: GetSuperClass() [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 1236])

This is the error i get when trying to package my project on 4.16, it packaged fine on 4.15 so i’m unsure what its related any help would be great thanks.

UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: Failure - 120 error(s), 31 warning(s)

i had warnings in 4.15 but no errors, I’m also using some plugin but i have tested them and they package fine on a empty project.

UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: Warning/Error Summary (Unique only)
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: -----------------------------------
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: begin: stack for UAT
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: === Handled ensure: ===
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: 
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: Ensure condition failed: GetSuperClass() [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 1236]
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: Stack: 
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Core.dll!0x000000001EF732B6
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Core.dll!0x000000001ED1DE02
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Core.dll!0x000000001ED34376
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Engine.dll!0x000000001BBBF46C
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022DDA9FD
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022DDA810
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022DDA87D
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022DCCC04
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022E0C96B
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022DF7671
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-UnrealEd.dll!0x00000000198F996D
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-UnrealEd.dll!0x00000000197AB764
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-UnrealEd.dll!0x00000000197B71F4
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-UnrealEd.dll!0x00000000196621B2
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-UnrealEd.dll!0x0000000019686CF1
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Cmd.exe!0x00000000A5487BEF
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Cmd.exe!0x00000000A547EF0A
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Cmd.exe!0x00000000A547F15A
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Cmd.exe!0x00000000A5490DB9
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Cmd.exe!0x00000000A5491ADE
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: KERNEL32.DLL!0x000000006F7F2774
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: ntdll.dll!0x0000000071AB0D61
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: end: stack for UAT
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: Ensure condition failed: ClassDefaultObject [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 1240]
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Engine.dll!0x000000001BBBF4E7
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: Ensure condition failed: GetSuperClass() [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 1220]
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Engine.dll!0x000000001BBBF5EC
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-CoreUObject.dll!0x0000000022DDAA31
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: Ensure condition failed: ClassDefaultObject [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 1224]
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit:Display: LogOutputDevice:Error: UE4Editor-Engine.dll!0x000000001BBBF667

This Function isn’t found in BlueprintGeneratedClass.cpp in 4.15 which is why i can cook fine any idea on what issue its picking up?

bool UBlueprintGeneratedClass::NeedsLoadForServer() const
{
	if (!HasAnyFlags(RF_ClassDefaultObject))
	{
		if (ensure(GetSuperClass()) && !GetSuperClass()->NeedsLoadForServer())
		{
			return false;
		}
		if (ensure(ClassDefaultObject) && !ClassDefaultObject->NeedsLoadForServer())
		{
			return false;
		}
	}
	return Super::NeedsLoadForServer();
}

I had this issue to and you wouldn’t guess what it was, for me it was a class reference to an actor in a data table, the referenced actor was the Ensure condition, the error come from a datatable row handle reference within another actor once this reference was cleared to none the error disappeared, so this issue should be looked into because it seems to be looking at class reference to see if its valid or not and its breaking at some point.

I have the same problem and reported it here. No solution to the problem I’m afraid: Cook fails in 4.16 preview 1 - Blueprint - Unreal Engine Forums
But if you also comment there maybe thats a way to get some attention from the unreal dev team. :slight_smile:

Done thanks,.

I’m also experiencing this issue.

This may be caused by a cyclic dependency in your Blueprints. Unfortunately the call stack does not reveal where the cyclic dependency is, so you are left to start searching with the reference viewer, but I bet you’ll find one. (You want to find a BP in the reference viewer that appears on both the left and right hand side of the centered BP.)

Not sure why has been downvoted, finding the cyclical dependency using the reference viewer was exactly how I found my issue. Thanks!

at 4.17 after 4.15 was some problem, for me help change to true (flagged) Project settings-Editor-Blueprints-Use Compilation Manager

Thank you! This has solved my issue as well.
Circular Dependency Detector makes it easier to detect the problem, especially if there are more than two blueprints involved.

Thank you guys for all the info, this helped me a lot as well. Although I still have some circular dependencies, it seems unreal was unhappy about a few very particular ones. The plugin mentioned above unfortunately just caused the engine to crash for me, but the reference viewer was super helpful (just look at a copy of the same asset on both sides).

While the plugin didn’t work, the info provided on how to fix circular dependencies was super helpful: GitHub - bstt/CircularDependenciesDetector: Documentation and source code of Circular Dependencies Detector UE4 plugin.

All in all, I hope unreal did a better job of warning us about this situation. Especially since it stops you from packaging all together.

For people getting this error , check out your warnings and resolve all warnings that are about inavlid characters in your functions/variables , for me it resolved the probleme .