Hi! Thank you for your time!
Basically, as the title says PCG Crashes the engine when using Attribute Remove Duplicates node on partitioned data if it one of those sets of data is empty.
In my real project we are doing some partitioning based on mesh path and then removing duplicates and it crashes in a similar fashion in the exact same place.
I`ve seen this post in the forums https://forums.unrealengine.com/t/5-6-regression-pcg-crashing-when-using-attribute-remove-duplicates-on-a-string-custom-attribute/2553031
which seems to indicate other people have come across this issue as well.
I’ve attached as much information as I could hope it helps, good luck fixing this!
It looks like the error is coming from the following place.
PCGMetadataPartitionCommon.cpp
`UPCGData* RemoveDuplicatesPoint(const UPCGBasePointData* InData, const TArrayView& InSelectorArrayView, FPCGContext* InOptionalContext, bool bSilenceMissingAttributeErrors)
{
TArray<TArray> Partition = AttributeGenericPartition(InData, InSelectorArrayView, InOptionalContext, bSilenceMissingAttributeErrors);
if (Partition.IsEmpty())
{
return nullptr;
}
UPCGBasePointData* OutputPointData = nullptr;
TArray IndicesToCopy;
IndicesToCopy.Reserve(Partition.Num());
for (TArray& Indices : Partition)
{
// ERROR HAPPENS HERE!!
IndicesToCopy.Add(Indices[0]);
}
//…`