There is an issue when using self references with functions as an input. With pass by references on a function, the input has it checked by default; however, a self reference can still be hooked in and compile with no issue. This can lead to a crash, for which the callstack has been added for this issue. This issue is similar to [Link Removed] but with a function instead of a custom event.

There is a current workaround for this issue, simply unchecking and rechecking the pass by reference box updates the nodes and produces the expected behavior. However, the user should be getting an error from the node's creation.

Steps to Reproduce
  1. Create a new Project (No template or starter content needed)
  2. Create a new actor class blueprint > Name it Actor_BP > Open Actor_BP
  3. Create a variable > Set it to variable type actor > set it to an array > Name it Array_VAR
  4. Create a new Function > Name it FindFunction > Open FindFunction
  5. On FindFunction's event graph with Array_Var add a find node for the array and take the "item to find" pin and attach it to the input (Screenshot_01)
  6. Back in Actor_BP's event graph add a node for FindFunction
  7. Attach a 'self' reference to the input Item to find (screenshot_02)
  8. Compile and Save the blueprint
    Result: The blueprint compiles with no issue
    Expected result: The blueprint should display an error that does not allow a self reference
Access violation - code c0000005 (first/second chance not available)
UE4Editor_CoreUObject!UObject::execSelf() scriptcore.cpp:2113 
UE4Editor_CoreUObject!UObject::CallFunction() scriptcore.cpp:788 
UE4Editor_CoreUObject!UObject::execVirtualFunction() scriptcore.cpp:2255 
UE4Editor_CoreUObject!UObject::ProcessInternal() scriptcore.cpp:948 
UE4Editor_CoreUObject!UObject::CallFunction() scriptcore.cpp:845 
UE4Editor_CoreUObject!UObject::execVirtualFunction() scriptcore.cpp:2255 
UE4Editor_CoreUObject!UObject::ProcessInternal() scriptcore.cpp:948 
UE4Editor_CoreUObject!UFunction::Invoke() class.cpp:4525 
UE4Editor_CoreUObject!UObject::ProcessEvent() scriptcore.cpp:1318 
UE4Editor_Engine!AActor::ProcessEvent() actor.cpp:678 
UE4Editor_Engine!AActor::BeginPlay() actor.cpp:3129 
UE4Editor_Engine!AActor::DispatchBeginPlay() actor.cpp:3097 
UE4Editor_Engine!AWorldSettings::NotifyBeginPlay() worldsettings.cpp:183 
UE4Editor_Engine!AGameStateBase::HandleBeginPlay() gamestatebase.cpp:177 
UE4Editor_Engine!UWorld::BeginPlay() world.cpp:3435 
UE4Editor_Engine!UGameInstance::StartPlayInEditorGameInstance() gameinstance.cpp:338 
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() playlevel.cpp:3420 
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() playlevel.cpp:2515 
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() playlevel.cpp:1215 
UE4Editor_UnrealEd!UEditorEngine::Tick() editorengine.cpp:1522 
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() unrealedengine.cpp:391 
UE4Editor!FEngineLoop::Tick() launchengineloop.cpp:3025 
UE4Editor!GuardedMain() launch.cpp:166 
UE4Editor!GuardedMainWrapper() launchwindows.cpp:134 
UE4Editor!WinMain() launchwindows.cpp:210 
UE4Editor!__scrt_common_main_seh() exe_common.inl:264 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-45270 in the post.

Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions4.
Target Fix4.17
Fix Commit3503445
Main Commit3544050
CreatedMay 22, 2017
ResolvedJun 26, 2017
UpdatedNov 9, 2018