Hello,
We have recently seen scenarios where we are hitting an assert check(OriginalComponent) inside GenerateComponentFilter lambda in PCGWorldPartitionBuilder.cpp when Running per cell.
Here’s the callstack.
[2025.05.29-06.00.27:832][316]LogWindows: Error: === Critical error: ===
[2025.05.29-06.00.27:832][316]LogWindows: Error:
[2025.05.29-06.00.27:832][316]LogWindows: Error: Assertion failed: OriginalComponent [File:E:\dev\main\Engine\Plugins\PCG\Source\PCGEditor\Private\WorldPartitionBuilder\PCGWorldPartitionBuilder.cpp] [Line: 746]
[2025.05.29-06.00.27:833][316]LogWindows: Error:
[2025.05.29-06.00.27:833][316]LogWindows: Error:
[2025.05.29-06.00.27:833][316]LogWindows: Error:
[2025.05.29-06.00.27:833][316]LogWindows: Error: [Callstack] 0x00007ffce18098cd UnrealEditor-PCGEditor.dll!`UPCGWorldPartitionBuilder::RunPerCell’::`2’::<lambda_2>::operator()() [E:\dev\main\Engine\Plugins\PCG\Source\PCGEditor\Private\WorldPartitionBuilder\PCGWorldPartitionBuilder.cpp:746]
[2025.05.29-06.00.27:834][316]LogWindows: Error: [Callstack] 0x00007ffce180db13 UnrealEditor-PCGEditor.dll!FPCGWorldPartitionBuilder::CollectComponentsToGenerate() [E:\dev\main\Engine\Plugins\PCG\Source\PCGEditor\Private\WorldPartitionBuilder\PCGWorldPartitionBuilder.cpp:1648]
[2025.05.29-06.00.27:834][316]LogWindows: Error: [Callstack] 0x00007ffce182bdef UnrealEditor-PCGEditor.dll!UPCGWorldPartitionBuilder::RunPerCell() [E:\dev\main\Engine\Plugins\PCG\Source\PCGEditor\Private\WorldPartitionBuilder\PCGWorldPartitionBuilder.cpp:781]
[2025.05.29-06.00.27:835][316]LogWindows: Error: [Callstack] 0x00007ffce182bbc2 UnrealEditor-PCGEditor.dll!UPCGWorldPartitionBuilder::RunInternal() [E:\dev\main\Engine\Plugins\PCG\Source\PCGEditor\Private\WorldPartitionBuilder\PCGWorldPartitionBuilder.cpp:542]
[2025.05.29-06.00.27:836][316]LogWindows: Error: [Callstack] 0x00007ffd397f7b9c UnrealEditor-UnrealEd.dll!UWorldPartitionBuilder::RunInternal() [E:\dev\main\Engine\Source\Editor\UnrealEd\Private\WorldPartition\WorldPartitionBuilder.cpp:291]
[2025.05.29-06.00.27:836][316]LogWindows: Error: [Callstack] 0x00007ffd397f6ad4 UnrealEditor-UnrealEd.dll!UWorldPartitionBuilder::RunBuilder() [E:\dev\main\Engine\Source\Editor\UnrealEd\Private\WorldPartition\WorldPartitionBuilder.cpp:123]
Since we are frequently deleting the Source actors that have the Original PCG Components (which are partitioned, of course), we did expect a scenario where there will be dead references in PCG Partition Actors for LocalToOriginal and OriginalToLocal maps. But I expected that the call to APCGPartitionActor::CleanupDeadGraphInstances made from PCGWorldPartitionBuilder::UpdatePartitionedActors should suffice to clean up the maps.
Yet, something is leading to a mismatch between the way PCG Partition Actors are picked to be updated in UpdatePartitionedActors , and then how the PCG Components are picked for generation immediately.
My questions:
- Is there a known scenario where a dead Original Component reference is expected to remain in the PCG Partition Actor even after CleanupDeadGraphInstances is called?
- If no, where do we think the mismatch could be between…
- Picking up the Partition Actors to clean up and
- PCG Components to generate?
Note : We are Generating Iteratively so it’s happening inside RunPerCell where the builder is loading regions as it decides what to generate.
Without having a consistent repro for this, I am inclined towards fixing it the way shown in the screenshot, which doesn’t seem perfect but should handle it gracefully. Can I get an opinion on this?
Regards,
Vaishvik