Error When a new C++ Class in added in Blueprint [Ensure condition failed: TargetArrayPin ]

I am using UE 4.16. + Mac OS X Sierra 10.12.4 + Xcode 8.3.3 on an easy 2015 MBP with Intel Integrated Graphics

I have added a custom function in C++ (class extended out of blueprint class) and that now compiles well after a few trial and errors. I package this project to mac OS or try simulating it without the C++ function, it goes smooth.

However if I just drop the new function in blueprint (and wire it in execution flow or just let it be there), the following error pops up in package project to mac but it successfully completes the process.

If I try simulate it, it fails with following error.

I’ve been scavenging in net for some days for a solution. Tried having relook at my c++ functions (a simple array manipulation program) and it looks fine. I tried some other myriad solutions on net also and doesn’t seem to be related.

Any hint at solving this will be greatly appreciated… Thanks in advance!..

LogOutputDevice:Error: === Handled ensure: ===
LogOutputDevice:Error: Ensure condition failed: TargetArrayPin [File:/Users/build/Build/++UE4+Release-4.16+Compile/Sync/Engine/Source/Editor/BlueprintGraph/Private/K2Node_CallArrayFunction.cpp] [Line: 22]
LogOutputDevice:Error: Stack:
LogOutputDevice:Error: FDebug::OptionallyLogFormattedEnsureMessageReturningFalse(bool, char const
, char const
, int, wchar_t const*, …) Address = 0xbbd059d (filename not found) [in UE4Editor-Core.dylib]**
LogOutputDevice:Error: UK2Node_CallArrayFunction::AllocateDefaultPins() Address = 0x1fdbe877 (filename not found) [in UE4Editor-BlueprintGraph.dylib]
LogOutputDevice:Error: UK2Node_CallFunction::ReallocatePinsDuringReconstruction(TArray&) Address = 0x1fda4ddd (filename not found) [in UE4Editor-BlueprintGraph.dylib]
LogOutputDevice:Error: UK2Node::ReconstructNode() Address = 0x1fd960c6 (filename not found) [in UE4Editor-BlueprintGraph.dylib]
LogOutputDevice:Error: UEdGraphSchema_K2::ReconstructNode(UEdGraphNode&, bool) const Address = 0x1fd252a4 (filename not found) [in UE4Editor-BlueprintGraph.dylib]
LogOutputDevice:Error: FBlueprintEditorUtils::ReconstructAllNodes(UBlueprint*) Address = 0x13a82a62 (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: FBlueprintEditorUtils::RegenerateBlueprintClass(UBlueprint*, UClass*, UObject*, TArray&) Address = 0x13a86bad (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: FLinkerLoad::RegenerateBlueprintClass(UClass*, UObject*) Address = 0xc60d81c (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::FinalizeBlueprint(UClass*) Address = 0xc6119a4 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::Preload(UObject*) Address = 0xc82236b (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::CreateExport(int) Address = 0xc81b22d (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::IndexToObject(FPackageIndex) Address = 0xc81d375 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::CreateExport(int) Address = 0xc8190ca (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::IndexToObject(FPackageIndex) Address = 0xc81d375 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::CreateExport(int) Address = 0xc8190ca (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::LoadAllObjects(bool) Address = 0xc81dfb8 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: LoadPackageInternal(UPackage*, wchar_t const*, unsigned int, FLinkerLoad*) Address = 0xca0c34c (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::VerifyImportInner(int, FString&) Address = 0xc81332e (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::VerifyImport(int) Address = 0xc80e5d6 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::VerifyImportInner(int, FString&) Address = 0xc812a06 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::VerifyImport(int) Address = 0xc80e5d6 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::Verify() Address = 0xc80dffb (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::FinalizeCreation() Address = 0xc809beb (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::Tick(float, bool, bool) Address = 0xc7fe259 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: FLinkerLoad::CreateLinker(UPackage*, wchar_t const*, unsigned int) Address = 0xc7f8b7d (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: GetPackageLinker(UPackage*, wchar_t const*, unsigned int, UPackageMap*, FGuid*) Address = 0xc7f4c14 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: LoadPackageInternal(UPackage*, wchar_t const*, unsigned int, FLinkerLoad*) Address = 0xca0c00a (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: LoadPackage(UPackage*, wchar_t const*, unsigned int) Address = 0xca093b6 (filename not found) [in UE4Editor-CoreUObject.dylib]
LogOutputDevice:Error: UEditorEngine::Map_Load(wchar_t const*, FOutputDevice&) Address = 0x135c6981 (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: UEditorEngine::HandleMapCommand(wchar_t const*, FOutputDevice&, UWorld*) Address = 0x135ea585 (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: UEditorEngine::Exec(UWorld*, wchar_t const*, FOutputDevice&) Address = 0x135e708b (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: UUnrealEdEngine::Exec(UWorld*, wchar_t const*, FOutputDevice&) Address = 0x1426d88c (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: FEditorFileUtils::LoadMap(FString const&, bool, bool) Address = 0x1398bd3e (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: FEditorFileUtils::LoadDefaultMapAtStartup() Address = 0x1399ba01 (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: FUnrealEdMisc::OnInit() Address = 0x1424da8f (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: EditorInit(IEngineLoop&) Address = 0x1424bbed (filename not found) [in UE4Editor-UnrealEd.dylib]
LogOutputDevice:Error: GuardedMain(wchar_t const*) Address = 0xb8abcfc (filename not found) [in UE4Editor]
LogOutputDevice:Error: -[UE4AppDelegate runGameThread:] Address = 0xb8ba01a (filename not found) [in UE4Editor]
LogOutputDevice:Error: -[FCocoaGameThread main] Address = 0xbb53346 (filename not found) [in UE4Editor-Core.dylib]
LogOutputDevice:Error: NSThread__start() Address = 0xcd0ecbcd (filename not found) [in Foundation]
LogOutputDevice:Error: _pthread_body() Address = 0xe10469af (filename not found) [in libsystem_pthread.dylib]
LogOutputDevice:Error: _pthread_body() Address = 0xe10468fb (filename not found) [in libsystem_pthread.dylib]
LogOutputDevice:Error: thread_start() Address = 0xe1046101 (filename not found) [in libsystem_pthread.dylib]
LogStats: SubmitErrorReport - 0.000 s

Did you use “ArrayParm =” meta with your function? It seems this meta is something very special and works fine only in conjunction with “CustomThunk” flag. And with existing custom vm thunk then.