PSO pre-caching

Hi,

What is the best way to pre-cache PSO’s? Interested in what best practice is.

We are getting a crash every so often, below.

Would adding all the be overkill or … ?

r.PSOPrecaching=1

r.PSOPrecache.Components=1

r.PSOPrecache.Resources=1

r.PSOPrecache.GlobalShaders=1

r.PSOPrecache.ProxyCreationWhenPSOReady=1

r.PSOPrecache.ProxyCreationDelayStrategy=1

Or will cause more hitching?

LogPSOHitching: Encountered 200 PSO creation hitches so far (35 graphics, 165 compute). 33 of them were precached.
LogWindows: Error: appError called: Assertion failed: !CheckCompilingPSOs(*FindResult, false ) [File:E:\PBP\P1\Engine\Source\Runtime\Engine\Private\PSOPrecacheMaterial.cpp] [Line: 581]
LogWindows: Windows GetLastError: The operation completed successfully. (0)
LogWindows: Could not start crash report client using ../../../Engine/Binaries/Win64/CrashReportClient-Win64-Debug.exe
LogMemory: Platform Memory Stats for WindowsClient
LogMemory: Process Physical Memory: 2639.27 MB used, 2642.26 MB peak
LogMemory: Process Virtual Memory: 5901.30 MB used, 5909.50 MB peak
LogMemory: Physical Memory: 70200.14 MB used,  60571.09 MB free, 130771.23 MB total
LogMemory: Virtual Memory: 107836.42 MB used,  416150.81 MB free, 523987.25 MB total
LogThreadingWindows: Error: Runnable thread Foreground Worker #0 crashed.
LogWindows: Error: === Critical error: ===
LogWindows: Error: 
LogWindows: Error: Assertion failed: !CheckCompilingPSOs(*FindResult, false ) [File:E:\PBP\P1\Engine\Source\Runtime\Engine\Private\PSOPrecacheMaterial.cpp] [Line: 581] 
LogWindows: Error: 
LogWindows: Error: 
LogWindows: Error: 
LogWindows: Error: 
LogWindows: Error: Crash in runnable thread Foreground Worker #0
LogExit: Executing StaticShutdownAfterError
LogWindows: FPlatformMisc::RequestExit(1, FRunnableThreadWin::GuardedRun.ExceptionHandler)
LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, FRunnableThreadWin::GuardedRun.ExceptionHandler)
LogCore: Engine exit requested (reason: Win RequestExit)



Hi there,

The crash you are seeing there is one that has been plaguing a few licensees recently. We have been actively looking into resolving it, but due to the tricky nature of reproducing the crash, we have not been able to find a definite resolution. See the public Jira here: https://issues.unrealengine.com/issue/UE-288175. Adding PSO pre-caching would likely not fix this, as this is related to a race condition in the task graph code. We have put up a minor cleanup CL 42765782 into UE5-Main, but this is merely to help track the issue down better. Try patching this CL into your build to get more information about when the crash occurs. Feel free to let me know if you have any questions around this.

Hey Tim,

The easiest way to repro the issue is run the same client multiple times on your PC.

We do this as we are working on an Online title. For us it will most of the time.

Thanks,

Simon

I am sorry to hear that. I will look into raising the priority for the developers in the Jira I posted earlier. However, since reproducing the crash is unreliable, it will be difficult for us to find a solution quickly

Did you try running multiple clients on same PC?

I would think so, but I have relayed the information to the team to double-check, and hopefully, they will pick up this ticket again. If you have any more questions about this, please let me know.