Fatal Error Packaged Game

\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp

	if (IsBlueprintFinalizationPending())
	{
		// have to prematurely set the CDO's linker so we can force a Preload()/
		// Serialization of the CDO before we regenerate the Blueprint class
		{
			if (DeferredCDOIndex != INDEX_NONE)
			{
				const EObjectFlags OldFlags = BlueprintCDO->GetFlags(); <-- Access violation
				BlueprintCDO->ClearFlags(RF_NeedLoad | RF_NeedPostLoad);
				BlueprintCDO->SetLinker(this, DeferredCDOIndex, /*bShouldDetatchExisting =*/false);
				BlueprintCDO->SetFlags(OldFlags);
			}
		}

Dump Call Stack : (Download)

The BlueprintCDO is nullptr.
How can I fix it?


AGameMode_InGame::AGameMode_InGame(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
	if (!ItemDataLibrary)
	{
		ItemDataLibrary = UObjectLibrary::CreateLibrary(UObject::StaticClass(), false, false);
		ItemDataLibrary->AddToRoot();
	}
	ItemDataLibrary->LoadAssetDataFromPath(TEXT("/Game/Items")); // -> changed to /Game/Items/Textures
	const bool bFullyLoad = true;
	if (bFullyLoad)
	{
		ItemDataLibrary->LoadAssetsFromAssetData();
	}
}

“/Game/Items” folder contains some blueprint classes.
I solved the problem by changing the path(LoadAssetDataFromPath()).

Hey Johnapoor-

Is this code in a custom class for your project or an engine class? If this is an engine class, which class are getting this from and how are you accessing this code? Also, please include the logs from packaging the project for additional information.

Hello. I solved my problem but I added more information in my question.

" I solved the problem by changing the path(LoadAssetDataFromPath())."