Wildcard array in macro causes building failure even though it was confirmed as having been fixed in UE 4.10.1

Hey everyone,

So I ran into this problem outlined here:

[Wildcard array in macro makes project unable to package - Programming & Scripting - Epic Developer Community Forums][1]

A few comments down it was confirmed as having been fixed in Unreal Engine 4.10.1 and it was also mentioned in the “[UE 4.10.1 Hotfix changenotes][2]” as having been fixed. See UE-23132.

However, I have been struggling with the same problem even though I am using the above mentioned UE version.

There is a slight difference in my case, I am using a Macro Library and the following macro is giving me the errors in my log:

It checks whether an array is empty or not as it was the source of a few “out of bounds” errors and since I was started to use it a lot I decided to use a wildcard array for different cases.

I have verified my Unreal Engine 4.10.1 installation but to no avail. I probably messed up somewhere but I’m not sure where. I will try to recreate the problem in a fresh project tomorrow to see if I can come up with more info.

Thanks and cheers!

Error in log:

MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:005][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.
MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:005][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.
MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:013][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.
MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:019][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.
MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:019][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.
MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:020][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.
MainFrameActions: Packaging (Windows (32-bit)): UE4Editor-Cmd: [2015.12.21-21.59.27:020][  0]LogBlueprint:Error: [compiler CrystalObjective] Error The type of  Target Array  is undetermined.  Connect something to  IsArrayValid  to imply a specific type.

Just tested it out and I have been able to recreate the bug in a new project with Unreal 4.10.1

Found a workaround for my specific case as I removed the wildcard array from the output and it now seems to work.

I do however think this is a bug and should be looked at.

I had the same problem in UE 4.10.2.

I could pass this by inserting below codes at Engine/KismetCompiler.cpp line 2797. Note that its version is 4.10.2, not 4.10.1.

// resolve any wildcard pins again if nodes were reconstructed
if (bForceRegenNodes && !MacroInstanceNode->ResolvedWildcardType.PinCategory.IsEmpty())
{
	for (auto ClonedNodeIt = MacroNodes.CreateConstIterator(); ClonedNodeIt; ++ClonedNodeIt)
	{
		UEdGraphNode* const ClonedNode = *ClonedNodeIt;
		if (ClonedNode)
		{
			for (auto ClonedPinIt = ClonedNode->Pins.CreateConstIterator(); ClonedPinIt; ++ClonedPinIt)
			{
				UEdGraphPin* const ClonedPin = *ClonedPinIt;
				if (ClonedPin && (ClonedPin->PinType.PinCategory == Schema->PC_Wildcard))
				{
					// copy only type info, so array or ref status is preserved
					ClonedPin->PinType.PinCategory = MacroInstanceNode->ResolvedWildcardType.PinCategory;
					ClonedPin->PinType.PinSubCategory = MacroInstanceNode->ResolvedWildcardType.PinSubCategory;
					ClonedPin->PinType.PinSubCategoryObject = MacroInstanceNode->ResolvedWildcardType.PinSubCategoryObject;
				}
			}
		}
	}
}

I think reconstruction codes added in UE 4.10 cause the problem. I attached my problematic macro below for reference.

77285-wildcard-crash.png