Out of Memory packaging for Windows desktop

Using UE 4.27 on Windows 10 PC with 32G Ram, 2Tb SSD, a 4G MSI GeForce 1650 and an AMD Ryzen 9 3900X 12 core.

I’ve been trying t a few different things packaging for Windows desktop and every time, it fails on a out of memory error.

Is there any best practice docs and setup for this? I’m going to upgrade RAM to 64G and video card to 12G one this week, but it seems crazy that 16G isn’t enough.

Oh, also, my project is super minimal (well I think), I just started with a 3rd person template, added the Neighborhood pack, created a basic landscape and added a player start and a single house in the world, nothing more for now.

When I build, all seems to go well, then when I package for Windows dektop, I get this:

UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 7692 Packages Remain 419 Total 8111
UATHelper: Packaging (Windows (64-bit)):   LogTexture: Display: Building textures: Billboard_8K_Opacity (OODLE_BC7, 8192X8192)
UATHelper: Packaging (Windows (64-bit)):   LogTextureFormatOodle: Display: non-RDO encode 8192 x 8192 x 1 to format OODLE_BC7 (Oodle OodleTex_BC7RGBA) lambda=0 effort=20
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: === FShaderJobCache stats ===
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: Total job queries 17961, among them cache hits 1214 (6.76%)
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: Tracking 9597 distinct input hashes that result in 4467 distinct outputs (46.55%)
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: RAM used: 46.36 MB (0.05 GB) of 1638.40 MB (1.60 GB) budget. Usage: 2.83%
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: ================================================
UATHelper: Packaging (Windows (64-bit)):   LogThreadingWindows: Error: Runnable thread PoolThread 38 crashed.
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: begin: stack for UAT
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: === Critical error: ===
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error:
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMemory.cpp] [Line: 197]
UATHelper: Packaging (Windows (64-bit)):   LogWindows: Error: Ran out of memory allocating 268435456 bytes with alignment 0

If anyone else has this issue, here’s a few things I’ve tried which all worked but my original project is still failing.

1- New empty 3rd person project
2- Add new level with nothing in it
3- Add landscape to new level with nothing else
4- Add sculpted land to landcape
5- Add/enable Landmass plugin and add 3 new lanmass mountains
6- Add ModularNeighborhood project files without adding any assets to level
7- Add single full house model to landscape

All this worked, difference with my other project that’s failing is I added a ton of other project files to it.

I didn’t think project files that aren’t used would be an issue but during my testing, I found that until I added the ModularNeighborhood files into my project, there were a lot less things it did - first time I ran packaging after adding it, a ton of extra lines showed up like these:

UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1646 Packages Remain 16 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1647 Packages Remain 15 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1647 Packages Remain 15 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cook Diagnostics: OpenFileHandles=1665, VirtualMemory=2080MiB
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1647 Packages Remain 15 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1648 Packages Remain 14 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1648 Packages Remain 14 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1648 Packages Remain 14 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: === FShaderJobCache stats ===
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: Total job queries 2706, among them cache hits 0 (0.00%)
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: Tracking 1746 distinct input hashes that result in 997 distinct outputs (57.10%)
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: RAM used: 5.90 MB (0.01 GB) of 1638.40 MB (1.60 GB) budget. Usage: 0.36%
UATHelper: Packaging (Windows (64-bit)):   LogShaderCompilers: Display: ================================================
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1648 Packages Remain 14 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1649 Packages Remain 13 Total 1662
UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 1649 Packages Remain 13 Total 1662

Here’s top level list:

Collections  MSPresets        MS_BushLeafV1  MS_ForestTut  ModularNeighborhood   PN_GrassLibrary   PN_WildBerries              StarterContent  ThirdPersonBP
Developers   MS_AsphaltV1     MS_CityCurbs   MS_Grass      PN_Fern               PN_GroundFoliage  PN_coniferBushes_I          TheNiVerse
Geometry     MS_BushFlowerV1  MS_CityStreV1  Mannequin     PN_FoliageCollection  PN_MeadowFlowers  PN_interactiveSpruceForest  ThirdPerson

I’ll be testing builds adding these project files one by one to find out which one it is…

RESOLVED:

I added many more packages and redid the packaging.

Looks to me that this cooking thing happens only once - in other words, if I don’t change anything and package again, the cooking skipped, so maybe an expert can confirm but looks to me that I might have been able to get a successful package by just packaging again and again until it finished.

As it is, I did upgrade my Video card to a 12G card (from 4G) and my RAM from 32 to 64G and the packaging succeeded without out of memory errors.

Contrary to what I read before, someone stating that adding assets you don’t use don’t matter, it would appear that it, at least, affects the packaging process because of cooking.

Perhaps they don’t get included in the final package but they need to get cooked.

Not sure how to mark this as resolved, but since I fixed it myself maybe an admin has too.