I Have A Major Problem In Unreal Engine 5.1

I Have A Problem That My Project Which I Have Migrated From Unreal Engine 5.0.3 I Cooked Fastly But Now In Unreal Engine 5.1 It Cookes So Slowly And It Says Physical Memory Low Than 2048 MiB Uploading The Log Below Please Help As Soon As Possible

Here’s The Log

UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker direct package size: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker transitive package size: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: See log for memory use information for UObject classes and LLM tags.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: Exceeded max memory on all configured triggers:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): CookSettings.MemoryMinFreePhysical: Available physical memory 585MiB is less than 2048MiB.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Detected max mem exceeded - forcing shader compilation flush
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Finished flushing shader jobs at 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: GarbageCollection… (Exceeded Max Memory)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Malloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Realloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Free calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Total Allocator calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: GarbageCollection Results:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Type: Full
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): NumObjects:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 34301
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Available Before: 25197059
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 34296
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Available After: 25197064
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 5
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Virtual Memory:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Malloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Realloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Free calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Total Allocator calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: Garbage Collection was not very impactful.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): NumObjects:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Min: 34294
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Max: 34455
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Spread: 161
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 34301
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 34296
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 5
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Virtual Memory:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Min: 929 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Max: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Spread: 58 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): References:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker direct packages: 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker transitive packages: 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker direct package size: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker transitive package size: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: See log for memory use information for UObject classes and LLM tags.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: Exceeded max memory on all configured triggers:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): CookSettings.MemoryMinFreePhysical: Available physical memory 586MiB is less than 2048MiB.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Detected max mem exceeded - forcing shader compilation flush
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Finished flushing shader jobs at 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: GarbageCollection… (Exceeded Max Memory)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Malloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Realloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Free calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Total Allocator calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: GarbageCollection Results:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Type: Full
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): NumObjects:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 34308
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Available Before: 25197052
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 34296
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Available After: 25197064
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 12
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Virtual Memory:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Malloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Realloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Free calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Total Allocator calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: Garbage Collection was not very impactful.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): NumObjects:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Min: 34294
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Max: 34455
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Spread: 161
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 34308
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 34296
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 12
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Virtual Memory:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Min: 929 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Max: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Process Spread: 58 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): After GC: 988 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Freed by GC: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): References:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker direct packages: 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker transitive packages: 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker direct package size: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Cooker transitive package size: 0 MB
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: See log for memory use information for UObject classes and LLM tags.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCook: Display: Exceeded max memory on all configured triggers:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): CookSettings.MemoryMinFreePhysical: Available physical memory 586MiB is less than 2048MiB.
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Detected max mem exceeded - forcing shader compilation flush
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Finished flushing shader jobs at 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: GarbageCollection… (Exceeded Max Memory)
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Malloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Realloc calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Free calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: Item Total Allocator calls = 0
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): LogCookCommandlet: Display: GarbageCollection Results:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Type: Full
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): NumObjects:
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Before GC: 34316

1 Like

The log is showing that the cook process is running out of physical memory. It says that the available physical memory (585 MB) is less than the minimum required memory (2048 MiB). There are a few things you can try to fix this:

  • Close any unnecessary programs running on your computer to free up memory.

  • Increase the amount of physical memory available to your computer by adding more RAM or by closing background processes.

  • Lower the CookSettings.MemoryMinFreePhysical value in your DefaultEngine.ini file to a lower value, this will lower the minimum amount of physical memory required to cook the project.

  • You can also try to split your project into smaller levels, this will reduce the amount of memory required to cook and load each level

  • Check the content of your project, see if there are any assets that are no longer in use and delete them from the project.

  • Try to lower the number of the textures and materials used in your project.

  • Make sure that your GPU drivers are up to date.

  • Try to run the cook process on a machine with more memory if possible.

If the problem persist even after trying the above solutions, it might be an indication of a problem with the project itself, and a deeper analysis of the content and structure of the project might be necessary.

Hello!

I have the same issue.

Could you please give me some further details on:

" Lower the CookSettings.MemoryMinFreePhysical value in your DefaultEngine.ini "

I have been googling around but could not find the syntax to do that.

Also, how would cooking on a different machine work? I mean, I only have one Mac computer, and the project has C++ code, I need to compile the project on this one.

Thanks,
Marton

The CookSettings.MemoryMinFreePhysical value is a setting that can be found in the DefaultEditor.ini file of your Unreal Engine project.

You can lower the value of CookSettings.MemoryMinFreePhysical in DefaultEditor.ini file by adding the following line:

[CookSettings]
MemoryMinFreePhysical=4096

The value represents the minimum amount of free physical memory in megabytes that should be kept free while cooking content.

Regarding your second question, you can cook your project on a different machine if you have access to another machine that has Unreal Engine installed. You can copy your project’s source files to that machine, open the project in Unreal Engine, and then cook the content.

You can also make use of the Unreal Engine’s command-line interface to cook your project on a remote machine. This can be done by using the -cook flag and specifying the platform and other cook options.

1 Like

I have the same problem on almost empty project (I have RAM 32 Gb, and a lot of free memory). I solved it like that: 1) Close project and Chrome browser 2) Reopen project and immediately 3) Cook it 4) Package it.

Thank you for the prompt response.

I managed to get it working. It is still rather slow (I guess a MacBook Air was just meant for this?). However, the setting had to go into the DefaultEditor.ini file not DefaultEngine.ini.

I found the instructions here:

https://github.com/EpicGames/UnrealEngine/blob/cdaec5b33ea5d332e51eee4e4866495c90442122/Engine/Config/BaseEditor.ini#L324

Note that I had to set both values:

[CookSettings]
MemoryMinFreePhysical=1024
MemoryMinFreeVirtual=1024
2 Likes

Oh I see, I am glad you solved it!

Best of luck! :slight_smile:

Thank You Guys I Have Installed Unreal Engine 5.0.3 If Any Issue I’ll Contact You

1 Like

As for cooking on a different machine, I just discovered that Unreal has very good built-in support for the common workflow when you are generally working on a Windows machine and using a Mac that is connected to your local network only for the part of an IOS build that requires a Mac. It is referred to as “remote building”.

I managed to set it up and seems to work great. With a single click in the Unreal Editor it will copy all the necessary files over to the Mac via SSH (including the Engine files, over 10 GB in total. It does keep them there, so only the changed files will be copied again next time.), do the compilation there (using Xcode, I presume), copy the results back to Windows and finish the build there (including cooking). It will even do you the favor of installing the built game on an IOS device that is connected to the Windows machine. (possibly even launch it for you, I am still figuring that out)

Takes some tinkering to make it work, but it’s doable. I used Unreal Engine 5.1.

This can help to get started:

Cheers,
Marton

1 Like

Hi Marton,

It sounds very appealing. I have similar problem with memory and I saw that article about SSH running from Windows machine. What stopped me from trying yet is requirement, quote “Both machines must have an internet or local area network connection, and both must have the same UE4 project.”
Well, I guess UE4 can be swapped for UE5. But what about the project? If I already have a project on Apple machine, why would I need to start packaging it form Windows if not juts for fancy reason. I can just do few steps to my Mac and package it there? But as I understand you tried it and seems like you didn’t have a project already preloaded on Mac. You managed to load it from Windows machine? Then it makes sense. And you managed to package it on Windows machine as well? Am I correct?
Thank you

Hello Karyfan,

I think that quote is not accurate, or outdated, I am not sure. With UE 5.1.0 I did not need to manually copy anything over to the Mac. I just needed to set up the remote build according to the instructions on the page that is linked above, and then clicked the button to package for IOS inside the editor that is running on Windows. Indeed the project and even the engine was copied over to the Mac, but that was done automatically, during the build process. (On the Mac it was placed somewhere inside my home directory, reflecting the network name of the Windows machine and the path of the Engine and project on the Windows machine.)

I hope this clarifies.

Cheers,
Marton

Hello Marton,

Thank you for your prompt reply. I did everything as instructed. I can connect to my Mac using ssh on command prompt on my Windows machine. Then in my Windows machine’s Unreal (5.1) I expand ‘Platforms’ and click ‘iOS->Package Project’. It asks me to choose directory on my Windows machine to place the build as it normally does when i build Windows games.
I guess it probably doesn’t matter here? Anyway I choose a folder and packaging starts.
In log I see that I manage to connect to my Mac, it uses correct AppID (bundle name), but stumbles upon certificates, which it tries to find on my Windows machine. So the Build fails.
Did you install certificates and downloaded provision profiles on you Windows machine and added those in project settings? If yes, how did you add certificates to project settings, because adding them requires some key pair ?
Best,
Thank you!

Hi,

Yes, I needed to add both the Provision Profile and the Certificate on the Windows machine in Project Settings > Platforms > IOS > Mobile Provision.

I followed this page to generate the certificate request:

During this step you will need to fill the field Common Name. That will be used as the name of the private key that will be generated for the request. You will find this private key using the Keychain Access (on Mac) utility and you can export it and transfer it to Windows.

But first you will also need to generate the actual certificate by uploading the request here:

https://developer.apple.com/account/resources/certificates/list

and then the clicking the blue “plus” button and choosing IOS App Development.

Cheers,
Marton

Marton, thank you.

I have done all the procedures to get Identifier, Certificates, set profiles (provisioning) and add Devices on Apple Dev site before. Certs and provisions were imported into my Mac and XCode is happy with them.
Installed UE5.1 on Mac (it’s Mac Air M1) also found them and made them green.
I didn’t do the ‘Create a certificate signing request’ actually, so I tried it today by your suggestion. It downloaded the file named 'CertificateSigningRequest.Request’ and I actually couldn’t find the way what to do with it. No keys were added to my Keychain.

I exported provisions and certificates to my Windows machine before and tried to place them here and there in hope UE would catch them (like Mac’s UE did). It could catch only provisions, but those were invalid without certificates. And I couldn’t explicitly do ‘Import Certificates’ because it asked for some key pairs which I didn’t have.

Today on Windows machine instead of trying to ‘Import Certificate’ in UE5.1 (which is not possible without some key pairs which I don’t have), I just double clicked on each of the certs and Installed them into the ‘Personal’ store.
After that my UE5.1 caught them and automatically added to iOS project settings. So this part was done.

I tried to build, got and error ’ … ~/Library/Application Support/Epic/UnrealEngine/Intermediate/Build/BuildRules/MarketplaceRules.dll’ does not exist.’ I found this file MarketplaceRules.dll on Windows machine in %AppData% / local/UnrealEngine/Intermediate/Build/BuildRules, created required (as the error said) directory on Mac and copied it there. The next packaging went past this error.

Now I’m getting the next error "UATHelper: Packaging (IOS): IPP ERROR: Application exception: System.IO.InvalidDataException: Did not find a Code Signing LC. Injecting one into a fresh executable is not currently supported.’ and 'PackagingResults: Error: Stub not signed correctly.’ Looks like it needs some additional certificate? Now I’m stuck with this :slight_smile:

Adding MemoryMaxUsedPhysical also, make it work for me

[CookSettings]
MemoryMinFreePhysical=1024
MemoryMinFreeVirtual=1024
MemoryMaxUsedPhysical=16384