With Runtime PCG enabled, and we're encountering a crash in FPCGRuntimeGenScheduler::GetPartitionActorFromPool.

See above

Steps to Reproduce
We have Runtime PCG enabled, and we’re encountering a crash in FPCGRuntimeGenScheduler::GetPartitionActorFromPool.

It appears that the APCGPartitionActor returned by PartitionActorPool is invalid. This issue occurs randomly: Sometimes during instance-level editing, and other times when exiting PIE, or while simply working in the Editor. After investigation, we found that the PartitionActorPool actors in the persistent level are being deleted, which results in the pool no longer containing valid actors. Additionally, we observed the following warning:

Runtime generated component could not be recovered on grid

We also noticed a comment in the code referencing a potential crash in GetPartitionActorFromPool, in the method FPCGRuntimeGenScheduler::AddReferencedObjects(FReferenceCollector& Collector)

// The level should be keeping the pooled PAs visible to GC. This is just a tentative fix for a crash in GetPartitionActorFromPool(), to understand if the crash is happening because of unreferenced GCed actors.
Collector.AddReferencedObjects(PartitionActorPool);

Is this a known issue? Any guidance would be appreciated.

Thanks

Hello, since you’re reporting a crash, can you provide the callstack? That will help us understand whether the issue is known, as well as to investigate further.

Hi Zhi, here is the callstack:

UnrealEditor-PCG.dll!FPCGRuntimeGenScheduler::GetPartitionActorFromPool()

UnrealEditor-PCG.dll!FPCGRuntimeGenScheduler::TickScheduleGeneration()

UnrealEditor-PCG.dll!FPCGRuntimeGenScheduler::Tick()

UnrealEditor-PCG.dll!UPCGSubsystem::Tick()

UnrealEditor-Engine.dll!FTickableGameObject::TickObjects()

UnrealEditor-Engine.dll!UWorld::Tick()

UnrealEditor-UnrealEd.dll!UEditorEngine::Tick()

UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick()

UnrealEditor.exe!FEngineLoop::Tick()

UnrealEditor.exe!GuardedMain()

UnrealEditor.exe!GuardedMainWrapper()

UnrealEditor.exe!LaunchWindowsStartup()

UnrealEditor.exe!WinMain()

UnrealEditor.exe!__scrt_common_main_seh()

KERNEL32.DLL!UnknownFunction

Hi Guy,

Thanks for reaching out.

Was there more in your logs?

We’ve fixed two separate issues with this - one happening after a ReInitFromWorld (c6d02ed7fe8e4db27d21df49cef9895683509c75) plus another one when using level instances (fd99849374c74ebb7553b8f24b0d3ceb4047f417), but from the callstack only I can’t tell you if it would help you out.

Let us know,

Cheers,

Julien

Hi Julien,

Here is the specific warning as a result of the issue:

LogPCG: Warning: Runtime generated component could not be recovered on grid … at (…). It has been lost or destroyed.

Also, has this issue already been fixed in 5.7? Thank you! (if so, possibly we could cherry pick the change.)

Hi Guy,

I remember we had this warning pop-up, but I think it’s been resolved since.

I would start from the 2 changes I pointed out (with the github hashes) - I can get you the CL numbers too otherwise.

Cheers,

Julien

Ok, thanks Julien. Could you provide the CL numbers?

Ok, so the first one (ReInitFromWorld):

CL 45954911 in UE5-Main

CL 46141710 in Release-5.7

Second one (level instances):

CL 46217592 in UE5-Main

CL 46217589 in Release-5.7

Cheers,

Julien