Upgrading project from 5.0.3 to 5.1 results in a memory leak

Hi,

We have a project that we are trying to upgrade from UE5.0.3 to 5.1. We are doing it by changing the Engine Version to 5.1 and opening the project. It opens and re-compiles some shaders.

At some point after 1-5 minutes flying around in the editor, the project freezes with a big load on RAM. The rest of the Windows is not affected and we can kill the UE process.

What are the steps we can try to fix this? Thanks

Hi Evmatica,

Do you see any numbers growing after using the console command stat memory ?

You’ll see some other commands to try when typing ‘stat memory’ during PIE.

Good luck! Let us know if you see anything with those commands.

1 Like


the lowest one is of course 5.03

just saw your post i noticed that migrating from 5.03 to 5.1 use much more RAM from 4.8Go to 14Go of ram

Hi @Astrotronic @samosansamo19

Thanks for the suggestion. We think this might have been due to us migrating some assets from 5.0.3 to 5.1 which created some sort of a memory leak related to shaders.

What worked for us in the end is:

  1. Upgrade project from 5.0.3 to 5.1
  2. Turn on forward shading to force all shader re-compile
  3. Turn forward shading back off switching back to Lumen
  4. If need to migrate any assets from older engine versions, make a local copy of the source project, upgrade it to 5.1, and migrate assets 5.1 > 5.1

Maybe there is a better way to force all shaders to re-compile but running console commands would not trigger full re-compile for us.

2 Likes

Maybe there is a better way to force all shaders to re-compile but running console commands would not trigger full re-compile for us.

The shaders are stored here if you want to clear them manually:
C:\Users\{user}\AppData\Local\UnrealEngine\Common\DerivedDataCache

2 Likes

Hi !
Thanks! But i just want to say that even after doing you’re process, i don’t have all the problem gone ( for PIE or standalone play )… :thinking:

I find a simple solution to ‘‘fix’’ that for now, but i hope it’s go to change with time because all was fine on 5.0.3.

For those who have the same problem, one thing to try for the memory crash is to lower the Loading range of the main World partitions grid.
( after doing what @Evmatica say above ).

The level load and run nice, but i can’t have the entire map on screen like i have on 5.0.3… So, it’s not really a fix, because it’s not like what i have before…
UE5.0.3 seem to have a better loading range (?). For what i see for now.
Hope that’s going to change/ be optimised on future upgrade of the engine !

In case, my specs are :
Geforce RTX 2080
64GB Ram
AMD Ryzen 7 3700X 8-Core Processor 3.59 GHz

I know i have to upgrade my set-up and all but, all running fine in 5.0.3… :slightly_smiling_face:

Thanks and have a nice day all!

1 Like

@Jotham

Thanks! For us clearing the DDC folder on a local PC is problematic because we are working on multiple heavy projects simultaneously or have them on hand and compiled so we can fetch assets. Deleting DDC folder will force shader re-compile on say 5-10 big projects.

Is there a way to delete DDC for a particular project or is it all bundled together?

@Steeven

Glad I could help to some extent, we are not using world partitioning for now so I am not sure on how to solve your issue.

Hopefully it will be resolved in the final 5.1 build which I’ve head expected to release end of 2022.

1 Like

@Evmatica Ah, I have not been able to work that out either - clearing the folder is unfortunately a bit of a blunt hammer.

You can try converting your project again using the latest 5.1 release. Our project is stable now with no more dodgy shaders after updating our engine verison.

I am having trouble trying to get the game project that I converted from 4.27.2 to upgrade convert from 5.0 to 5.1 ? it keeps saying that the some of the shooter game files were made with another engine and says rebuild from source ? even if I redownload the project shooter game and tried converting from the 4.27 it says the same, but when converting to 5.0 it does fine :worried: anyone who can help me? I keep getting this error Parsing headers for ShooterGameEditor
Running Internal UnrealHeaderTool “C:\Users\New Owner\Documents\Unreal Projects\UTAscension 5.1\UTAscension.uproject” “C:\Users\New Owner\Documents\Unreal Projects\UTAscension 5.1\Intermediate\Build\Win64\ShooterGameEditor\Development\ShooterGameEditor.uhtmanifest” -WarningsAsErrors -installed
C:\Users\New Owner\Documents\Unreal Projects\UTAscension 5.1\Source\ShooterGame\Public\Weapons\ShooterWeapon.h(326): Error: Unable to find ‘class’ with name ‘UMatineeCameraShake’ then it gives error ShooterGame and ShooterGameLoadingScreen needs rebuilt from source, I do not see why UE 5.0 has no problem in the conversion but UE 5.1 does :frowning: