Crash: Objects have the same fully qualified name but different paths

My situation is as follows:

I have a custom Character class (PWNCharacter extended from ACharacter) and a CharacterStats class (PWNCharacterStats extended from UObject).

CharacterStats is marked as Blueprintable and I’ve created a Blueprint called “PWNCharacterStatsBP”.
I’ve also created a Blueprint of my Character (PWNCharacterBP). The idea is to allow designers to customize a CharacterStats Blueprint and assign it to a character.

To give some more details, In PWNCharacter.h I declare the following:

// Character Stats
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "PWNCharacter", meta = (AllowPrivateAccess = "true"))
	TSubclassOf<class UPWNCharacterStats> CharacterStatsClass;

protected:
	UPROPERTY()
	UPWNCharacterStats* CharacterStats;

And in PWNCharacter.cpp I create an instance of PWNCharacterStats class as follows:

// Sets default values
APWNCharacter::APWNCharacter()
{	
	// Other stuff above

	// Stats - Provide a default value for the class to spawn
	CharacterStatsClass = UPWNCharacterStats::StaticClass();
}

void APWNCharacter::OnConstruction(const FTransform & Transform)
{
	Super::OnConstruction(Transform);
	
	// Spawn CharacterStats
	CharacterStats = NewObject<UPWNCharacterStats>(this, CharacterStatsClass, TEXT("CharacterStats"));
}

So now in the Editor, on my PWNCharacterBP I assign the PWNCharacterStatsBP to the CharacterStatsClass variable, and as soon as I do that the engine crashes with the following:

Objects have the same fully qualified name but different paths.
	New Object: PWNCharacterStatsBP_C /Engine/Transient.World_3:PersistentLevel.PWNCharacterBP_C_1.CharacterStats
	Existing Object: PWNCharacterStats /Engine/Transient.World_3:PersistentLevel.PWNCharacterBP_C_1.CharacterStats

Any ideas what’s happening here? I’ve already tried:

  • Deleting Intermediate folder and regenerating VS files
  • Moving the Blueprints to different folders
  • Deleting the Blueprints and recreating them

Has anyone found a solution to this?

Its bug which is fixed in 4.18.1
Bug

Not fixed, still happening in 4.22

I am encountering it in 4.25 as well

5.1…

i encountered this error in Unreal Engine 5.3 while using a Plugin i have created.When i started to change plugin C++ codes, i have created a widget (in plugin directory).And then i created a Blueprint (WidgetBlueprint) based on the class that is created via C++ (in plugins folder). which gave me this error.

If You delete "binaries , Intermediate ,saved folders " on both project folder and plugins folder ("binaries , Intermediate on plugin folder) and then if you click on project name and select “Generate Visual Studio Project Files” .Unreal engine recreates generated.h files and then you click on project name and open project.It will ask you to rebuild project and plugin …Say okey to this.

Then this problem is solved.
It may happen again. You must apply same procedure again…
At least this is how i solved this problem in unreal engine 5.3