# PCG crash when resolving Soft Reference path during Garbage Collection 

**URL:** <https://forums.unrealengine.com/t/pcg-crash-when-resolving-soft-reference-path-during-garbage-collection/2690788>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [December 3, 2025, 7:05pm UTC](https://forums.unrealengine.com/t/pcg-crash-when-resolving-soft-reference-path-during-garbage-collection/2690788 "2025-12-03T19:05:54Z")\
**Posts on this page:** 2\
**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:** [December 3, 2025, 7:05pm UTC](https://forums.unrealengine.com/t/pcg-crash-when-resolving-soft-reference-path-during-garbage-collection/2690788/1 "2025-12-03T19:05:54Z")

</div>

Hi,

We’re having a low repro crash in **UPCGLandscapeData::InitializeTargetMetadata(…)** and **FPCGGraphTask::LoadCookedData(…)** when trying to resolve a TSoftObjectPtr path during Garbage Collection.

I noticed the issue in **FPCGGraphTask::LoadCookedData(…)** was already fixed in CL# 48392753, but the one in **UPCGLandscapeData::InitializeTargetMetadata(…)** hasn’t.

On our end we had to add a FGCScopeGuard, something like:

```auto
      // use a GC scope, otherwise we can have a crash later in Landscape.Get()
      FGCScopeGuard Guard;
 
      for (TSoftObjectPtr<ALandscapeProxy> Landscape : Landscapes)
      {
        const TArray<FName> Layers = LandscapeCache->GetLayerNames(Landscape.Get());
 
        for (const FName& Layer : Layers)
        {
          MetadataDomain->FindOrCreateAttribute<float>(Layer, 0.0f, /*bAllowInterpolation=*/true);
        }
      }

```

Have you seen this problem on your end ?

Thanks in advance,

Alvaro

---

<div class="post-metadata">

**Author:** ![Enfeduck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Enfeduck](https://forums.unrealengine.com/u/Enfeduck)\
**Post date:** [December 10, 2025, 2:20pm UTC](https://forums.unrealengine.com/t/pcg-crash-when-resolving-soft-reference-path-during-garbage-collection/2690788/2 "2025-12-10T14:20:41Z")

</div>

Hi Alvaro,

Sorry for the late reply, this one flew under my radar.

We haven’t seen this one but if that code is running out of the gamethread then you are correct that it is an issue.

I’m going to look into it further and will try and fit this in a 5.7 hotfix release

Cheers,

Patrick
