Crash when component and actor both implement two interfaces

Crash when opening any of the relevant blueprints:

Assertion failed: !HasAnyFlags(RF_NeedLoad|RF_NeedPostLoad) [File:C:\dev\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectLinker.cpp] [Line: 96] 
Detaching from existing linker for E:/dev/Unreal Projects/InterfaceCrash/Content/BP_Component.uasset while object EdGraph /Game/BP_Component.BP_Component:EventGraph needs loaded

Steps to reproduce:

  1. Create two interfaces with one method inside which return a value
  2. Create an Actor that implements both interfaces
  3. Create a ActorComponent that implements both interfaces
  4. Add the component to the actor
  5. Restart the editor and try to open the actor
  6. Observe crash

Reproduction project:

Hello ,

Thank you for the report and the clear repro steps. I was able to reproduce your issue, and have entered a bug report, UE-22245.

Have a great day.

Great, I suspect that repro isn’t minimal – I’m now getting this crash adding two interfaces but there are no components involved (didn’t get that in a clean project). If you/another dev is able to identify precisely what is causing it so I can hopefully avoid it, that would almost as useful as a fix…

I’ll pop back in and provide you with an update once I see progress being made on the bug/any workarounds. If you happen to come up with a workaround, feel free to post it here for others to follow who are experiencing the same issue.

Hi ,

do you have any progress updates on this bug? We just encountered this on our latest project, which heavily relies on having two or more interfaces attached to one actor.

The editor crashes on next start-up once the actor in question had its 2nd interface added. The error message matches the one from the original poster.

Any info at all, including possible workarounds, would be great!

EDIT:

Please note that there were no actor components involved which also implemented the two respective interfaces, though there is a component which implements another third interface.

This issue is reported as fixed. What version are you working in currently?

If you are using the latest 4.11 release and are still experiencing the issue, please provide repro steps so that I can update the bug report.

Thank you.

We are using v4.11.2. So far we don’t have an easy repro.

Here’s the machine ID:

  • Could you provide the logs from your project’s Saved->Logs folder after the crash occurs?
  • Could you please provide your Machine ID from the Crash Reporter window and ensure that you hit send on the crash report?

I am debugging this issue right now and wanted to share what I found so far. Maybe you guys can figure this out.

Here is the callstack:

[1]	UObject::SetLinker(LinkerLoad, LinkerIndex, bShouldDetachExisting)	C++
 	FLinkerLoad::Detach()	C++
 	FLinkerManager::ResetLoaders(InPkg)	C++
[2]	UObject::Rename(InName, NewOuter, Flags)	C++
 	UK2Node::RewireOldPinsToNewPins(InOldPins, InNewPins)	C++
 	UK2Node::ReconstructNode()	C++
 	UEdGraphSchema_K2::ReconstructNode(TargetNode, bIsBatchRequest)	C++
 	FBlueprintEditorUtils::RefreshGraphNodes(Graph)	C++
[3]	ConformInterfaceByGUID(Blueprint, CurrentInterfaceDesc)	C++
 	FBlueprintEditorUtils::ConformImplementedInterfaces(Blueprint)	C++
 	UBlueprint::PostLoad()	C++
 	UObject::ConditionalPostLoad()	C++
 	EndLoad()	C++
 	LoadPackageInternal(InOuter, InLongPackageName, LoadFlags, ImportLinker, InDependencyTracker, InAssetRegistry)	C++
 	LoadPackageInternal(InOuter, InLongPackageName, LoadFlags, ImportLinker)	C++
 	UEditorEngine::Map_Load(Str, Ar)	C++
 	UEditorEngine::HandleMapCommand(Str, Ar, InWorld)	C++
 	UEditorEngine::Exec(InWorld, Stream, Ar)	C++
 	UUnrealEdEngine::Exec(InWorld, Stream, Ar)	C++
 	FEditorFileUtils::LoadMap(InFilename, LoadAsTemplate, bShowProgress)	C++
 	FEditorFileUtils::LoadDefaultMapAtStartup()	C++

The engine asserts in UObject::SetLinker() [1]. This is called because the engine wants to rename [2] an object (an interface function / a graph). This is strange because there should be no need to rename the function at this point in time! The ConformInterfaceByGUID() [3] function will rename interface functions if their GUIDs match but their name does not match. As it turns out there is the same “InterfaceGuid” for different interface functions. E.g. “Attack_BPI::IsAttackable” has the same GUID as “Skin_BPI::IsSkinnable” (1345967241-1227943219-3811549834-934607715).

I then reverted the project to the previous working state and put a conditional breakpoint into the FGuid::operator<<() to break whenever that above mentioned GUID is loaded. Then I duplicated the “Attack_BPI” blueprint-interface via the editor’s context-menu and the breakpoint did hit! So it seems the GUID of the interface functions are copied to the duplicated blueprint-interface but they would need to be initialized with a new unique GUID instead.

We tried to reproduce the issue using a blank blueprint-only project but did not succeed, so “simply” duplicating a blueprint-interface does not always make the engine assert when restarting the editor and loading the project.

Marc

I’ve attempted to reproduce your issue, but I wasn’t getting a crash occur following the original repro steps that we used to enter the bug report.

Do you have a project that is currently getting this crash that you could provide? You can PM me a download link if you do have one so we can look into the crash as well: https://forums.unrealengine.com/member.php?160394--Flint

Hi ,

I’ve sent you a PM with the project download link and additional details.

Greetings,

Andre

Thank you for providing the test project, however I have not been able to reproduce the crash following the steps that you’ve provided. Is this occurring every time you follow those repro steps?

Yes, it does.

Can you reproduce this issue in a clean project? I’ve reproduced it in your project, but have not been able to get the crash to occur when implementing two duplicated interfaces in a clean project. Let me know what results you see on your end.

Nope, we did not manage to reproduce it in a clean project.

Our programmer Marc provided some very detailed information on why exactly the bug occurs in the comment below, though.

Could you please get this information to the respective programmer?

Hello,

I have reproduced the crash in your project, and have entered a bug report (UE-29883) and provided the developers with the information given. Thank you for looking into this issue. I will provide updates on this issue as they become available.

Have a great day