# Crash diffing level with PCG component 

**URL:** <https://forums.unrealengine.com/t/crash-diffing-level-with-pcg-component/2745472>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [May 6, 2026, 10:21am UTC](https://forums.unrealengine.com/t/crash-diffing-level-with-pcg-component/2745472 "2026-05-06T10:21:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 6, 2026, 10:21am UTC](https://forums.unrealengine.com/t/crash-diffing-level-with-pcg-component/2745472/1 "2026-05-06T10:21:11Z")

</div>

The class `UPCGComponent` has a member variable, `FPCGSelectionKeyToSettingsMap DynamicallyTrackedKeysToSettings`, which is not a UProperty but is custom serialized. This is a map with key type `FPCGSelectionKey`. This key type uses `UStruct::SerializeTaggedProperties` in its serialization, which cannot be used with archive types that use custom property list:

```auto
checkf(!UnderlyingArchive.ArUseCustomPropertyList,
    TEXT("Custom property lists only work with binary serialization, not tagged property serialization. "
        "Attempted for struct '%s' and archive '%s'. "), *GetFName().ToString(), *UnderlyingArchive.GetArchiveName());

```

However, diffing levels in the editor uses `FJsonStringifyArchive` to display the level data as JSON, and this archive does have `ArUseCustomPropertyList` set to true. So attempting to serialize `FPCGSelectionKey` with it fails the check.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 6, 2026, 10:21am UTC](https://forums.unrealengine.com/t/crash-diffing-level-with-pcg-component/2745472/2 "2026-05-06T10:21:15Z")

</div>

**Steps to Reproduce**  
Unfortunately I am not familiar enough with PCG to provide a standalone repro.

If you have a level with an actor with a PCGComponent that has some data in `DynamicallyTrackedKeysToSettings` trying to diff that level (against anything) crashes the editor.

---

<div class="post-metadata">

**Author:** ![Julien\_LHeureux](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Julien\_LHeureux](https://forums.unrealengine.com/u/Julien_LHeureux)\
**Post date:** [May 14, 2026, 5:39pm UTC](https://forums.unrealengine.com/t/crash-diffing-level-with-pcg-component/2745472/3 "2026-05-14T17:39:03Z")

</div>

Hi Javier, thanks for reaching out.

We’ll have a look!

Cheers,

Julien

---

<div class="post-metadata">

**Author:** ![Julien\_LHeureux](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Julien\_LHeureux](https://forums.unrealengine.com/u/Julien_LHeureux)\
**Post date:** [July 22, 2026, 4:03pm UTC](https://forums.unrealengine.com/t/crash-diffing-level-with-pcg-component/2745472/4 "2026-07-22T16:03:53Z")

</div>

Hi Javier,

Thanks for your patience, but I had a look into it.

What happens is that when doing the diff, it goes through a json serializer, and that’s not using (or allowing) the use of serializing tagged properties (which we always do for the PCG selection keys).

I think we’ll refactor this in the future (could have been serialized as an array instead of a map, would have been fine then), but a workaround right now is this change - just the if here is sufficient to side-step the crash.

```auto
FArchive& operator<<(FArchive& Ar, FPCGSelectionKey& Key)
{
	// The JSON object-graph stringify archive (used for text/JSON level diffing) runs with a
	// null custom property list to suppress reflected-property serialization. Tagged-property
	// serialization asserts in that mode (see UStruct::SerializeVersionedTaggedProperties).
	// This archive only emits text and never round-trips through the linker, so returning early
	// here does not affect the binary on-disk format or the export SerialSize.
	if (Ar.ArUseCustomPropertyList)
	{
		return Ar;
	}

```

Hope this helps,

Cheers,

Julien
