[UE5.2, Bug report] Editor crash when PC is idle for a while. Out of memory.

System has plenty of memory. Happens in an idle state.

Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 241] Ran out of memory allocating 131436 bytes with alignment 0. Last error msg: The paging file is too small for this operation to complete..

UnrealEditor_Core!<lambda_2f7b765a738be9e3beac65d9eaf9a7a2>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp:242]
UnrealEditor_Core!FGenericPlatformMemory::OnOutOfMemory() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp:244]
UnrealEditor_Core!FMallocMimalloc::OutOfMemory() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\HAL\MallocMimalloc.h:52]
UnrealEditor_Core!FMallocMimalloc::Malloc() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\HAL\MallocMimalloc.cpp:69]
UnrealEditor_Core!FMemory::Malloc() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\HAL\FMemory.inl:30]
UnrealEditor_Renderer!TConcurrentLinearArrayAllocator<FSceneRenderingBlockAllocationTag>::ForElementType<FShadowMapCacheData>::ResizeAllocation() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h:600]
UnrealEditor_Renderer!SetCacheDataShaderParameters() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\VirtualShadowMaps\VirtualShadowMapArray.cpp:407]
UnrealEditor_Renderer!FVirtualShadowMapArray::BuildPageAllocations() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\VirtualShadowMaps\VirtualShadowMapArray.cpp:1671]
UnrealEditor_Renderer!FDeferredShadingSceneRenderer::Render() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\DeferredShadingRenderer.cpp:3599]
UnrealEditor_Renderer!RenderViewFamilies_RenderThread() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:4413]
UnrealEditor_Renderer!<lambda_3332acdaafdbf3c437080709986d7e10>::operator()() [D:\build\++UE5\Sync\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:4681]
UnrealEditor_Renderer!TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamilies'::`87'::FDrawSceneCommandName,<lambda_3332acdaafdbf3c437080709986d7e10> >::DoTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Public\RenderingThread.h:209]
UnrealEditor_Renderer!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamilies'::`87'::FDrawSceneCommandName,<lambda_3332acdaafdbf3c437080709986d7e10> > >::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1310]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:758]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:649]
UnrealEditor_RenderCore!RenderingThreadMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:416]
UnrealEditor_RenderCore!FRenderingThread::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:542]
UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

It appears a mostly empty project opened in the UE editor process nuked the system after letting it do nothing for hours.

Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: UnrealEditor.exe (5872) consumed 51417583616 bytes

I remember something similar happened in the past when you would set a blueprint breakpoint and let the process hang on that but I wasn’t debugging and wasn’t running anything, not even PIE.

how to fix it?

I have no fix, this is only a report. It seems to happen when you let the editor run on idle (not using it) for a while, up to hours. Unclear if this is caused by the idle state or is just a generic memory leak. Don’t have problems when I’m using it actively.

this show how to fix it!

Thank you for this :slight_smile: I can’t verify it right now, I’m not working with the editor itself for a while.