Description

Having an actor blueprint (A) that contains an array variable of references to another actor (B) that is connected to a Length node and a Vector array that is connected to a ForEachLoop causes blueprint B to crash on compile.

Source Context:

  557       else
  558       {
  559       for (auto NodeIt = AllNodes.CreateIterator(); NodeIt; ++NodeIt)
  560       {
  561       UK2Node* Node = *NodeIt;
  562       TArray<UStruct*> Dependencies;
  563       if (Node->HasExternalDependencies(&Dependencies))
  564       {
  565       for (UStruct* Struct : Dependencies)
  566       {
  567       bool bShouldRefresh = Struct->IsChildOf(RefreshOnlyChild);
  568       if (!bShouldRefresh)
  569       {
  570       UClass* OwnerClass = Struct->GetOwnerClass();
  571 ***** if (ensureMsgf(!OwnerClass->GetClass()->IsChildOf<UBlueprintGeneratedClass>() || OwnerClass->ClassGeneratedBy
  572       , TEXT("Malformed Blueprint class (%s) - bad node dependency, unable to determine if the %s node (%s) should be refreshed or not. Currently compiling: %s")
  573       , *OwnerClass->GetName()
  574       , *Node->GetClass()->GetName()
  575       , *Node->GetPathName()
  576       , *Blueprint->GetName()) )
  577       {
  578       bShouldRefresh |= OwnerClass &&
  579       (OwnerClass->IsChildOf(RefreshOnlyChild) || OwnerClass->GetAuthoritativeClass()->IsChildOf(RefreshOnlyChild));
  580       }
  581       }
  582       if (bShouldRefresh)
  583       {
  584       //@todo:  Do we really need per-schema refreshing?
  585       const UEdGraphSchema* Schema = Node->GetGraph()->GetSchema();
  586       Schema->ReconstructNode(*Node, true);

Logs:
[Link Removed]
[Link Removed]
[Link Removed]

Found in 4.12.1.

This is a regression. Could not reproduce in 4.11.2 binary.

A second Answerhub post is also reporting this same crash: https://answers.unrealengine.com/questions/432367/4121-crash-compiling-character-blueprints.html

Steps to Reproduce

1. Open the editor
2. Create two actor blueprints (A & B)
3. Open A
4. Add an array variable of type B reference
5. Add a vector array variable
6. Get both variables in the event graph
7. Off of the B reference array, add a Length node
8. Off of the vector array, add a ForEachLoop node
9. Compile
10. Open B
11. Compile B

Result: Editor Crashes

Callstack
UE4Editor_UnrealEd!FBlueprintEditorUtils::RefreshExternalBlueprintDependencyNodes() blueprinteditorutils.cpp:572 
UE4Editor_KismetCompiler!FKismetCompilerContext::Compile() kismetcompiler.cpp:3627 
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprintInner() kismetcompilermodule.cpp:100 
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprint() kismetcompilermodule.cpp:203 
UE4Editor_UnrealEd!FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:756 
UE4Editor_Kismet!FBlueprintEditor::Compile() blueprinteditor.cpp:3184 
UE4Editor_Kismet!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,TTypeWrapper<void> __cdecl() delegateinstancesimpl_variadics.inl:321 
UE4Editor_Kismet!TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,void __cdecl() delegateinstancesimpl_variadics.inl:427 
UE4Editor_Slate!FUICommandList::ExecuteAction() uicommandlist.cpp:87 
UE4Editor_Slate!SToolBarButtonBlock::OnClicked() stoolbarbuttonblock.cpp:300 
UE4Editor_Slate!TMemberFunctionCaller<SToolBarButtonBlock,FReply() delegateinstanceinterface_variadics.h:161 
UE4Editor_Slate!TTupleImpl<TIntegerSequence<unsigned int> >::ApplyAfter_ExplicitReturnType<FReply,TMemberFunctionCaller<SToolBarButtonBlock,FRep tuple.h:128 
UE4Editor_Slate!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,FReply __cdecl() delegateinstancesimpl_variadics.inl:321 
UE4Editor_Slate!TBaseDelegate<FReply>::Execute() delegatesignatureimpl_variadics.inl:521 
UE4Editor_Slate!SButton::OnMouseButtonUp() sbutton.cpp:275 
UE4Editor_Slate!<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1>::operator() slateapplication.cpp:4598 
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() slateapplication.cpp:215 
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() slateapplication.cpp:4587 
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() slateapplication.cpp:5041 
UE4Editor_Slate!FSlateApplication::OnMouseUp() slateapplication.cpp:5021 
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() windowsapplication.cpp:1507 
UE4Editor_Core!FWindowsApplication::DeferMessage() windowsapplication.cpp:1847 
UE4Editor_Core!FWindowsApplication::ProcessMessage() windowsapplication.cpp:742 
UE4Editor_Core!FWindowsApplication::AppWndProc() windowsapplication.cpp:664 
user32!<Unknown> 
user32!<Unknown> 
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() windowsplatformmisc.cpp:903 
UE4Editor!FEngineLoop::Tick() launchengineloop.cpp:2728 
UE4Editor!GuardedMain() launch.cpp:148 
UE4Editor!GuardedMainWrapper() launchwindows.cpp:126 
UE4Editor!WinMain() launchwindows.cpp:200 
UE4Editor!__scrt_common_main_seh() exe_common.inl:264 
kernel32!<Unknown> 
ntdll!<Unknown> 

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.12.1
Target Fix4.12.2
Fix Commit3004529
CreatedJun 7, 2016
ResolvedJun 7, 2016
UpdatedApr 27, 2018
View Jira Issue