[Bug] Objects have the same fully qualified name but different paths

Hello, I’m posting this as a bug since googling gives only a few results back in 2015 which were apparently bugs that were fixed since then. However I’m getting it again now:

Fatal error: [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2265] 
Objects have the same fully qualified name but different paths.

 New Object: UnitMovementComponent /Game/Units/FinalBoss/BP_FinalBoss_.Default__BP_FinalBoss__C.UnitMovement
 Existing Object: UnitMovementComponent /Game/Units/FinalBoss/BP_FinalBoss_.Default__BP_FinalBoss__C:UnitMovement

BP_FinalBoss_ is a blueprint of an enemy, UnitMovement is just a UPawnMovementComponent. All enemies are childs of my Unit class, which is where UnitMovement is added. So it makes no sense that BP_FinalBoss_ gets this problem and none of the other enemies do. Also nothing else has that name, which is why I renamed it to have the _ at the end, which didn’t solve anything.

The only way to start unreal is to rebuild the whole game (not ue4 engine) from VS. But any hot reloads will cause this to happen again on next launch.

Any idea what may be causing this? It’s a pain to have to rebuild every time UE4 crashes or needs to be re-opened.
Thanks

Sure did, does nothing.

Edit: Just deleted that blueprint and now it displays the same bug on the next enemy blueprint. These are blueprints that haven’t been touched in months.

Did you try the usual Stuff like nuking the Intermediate Folder?

It’s a specific error, surely there should be a reason/fix for this? Really quite a pain to have unreal crash on load with this error every time, then having to close it and recompile from VS first.

Has anyone found a solution to this?

Fixed in 4.18.

Now when opening a project, unreal detects it was previously hot-reloaded and asks to recompile it first, as apposed to just launching it and crashing.

Hi, I seem to be getting this error on 4.18.2, but I always build through VS rather than hot reloading. I wondered if you came across any more information about this issue or other possible solutions?

I can’t work out whether the issue was related to the difference between “__C.UnitMovement” and “__C:UnitMovement”, with the ‘.’ and ‘:’ difference, as it seems to be a similar case with my BP names.

It looks like the source of this error is SetChildActorClass creates a new object but does not give it a new name (so there’s a fatal error if it’s type is different but the name is the same?).

Our workaround was to ensure the default ChildActorClass is None in the editor (so no object is created) and we call SetChildActorClass with the type we want in the BeginPlay event (can’t do it in the constructor because if you change the type in the editor and recompile you get the same error for the same reason!).

Not ideal, but I’m happy just to have it working. Hope this helps someone else out maybe.