SRombauts / UEPlasticPlugin

Plastic SCM Plugin for Unreal Engine
http://srombauts.github.io/UEPlasticPlugin
146 stars 28 forks source link

Running out of memory when checking out files. #97

Closed tumi23 closed 1 year ago

tumi23 commented 2 years ago

Hi

I've been using the plugin for some time and have had problems with checking out files(happens a lot in world partition) where I check in files in the editor and then at the end starts for some reason reverting said files that I'm just checking in and while that is happening if I look at the task manager the memory of the UnrealEditor.exe keeps on getting bigger and bigger until it runs out of memory.

tumi23 commented 2 years ago

After further testing it seems to be related to deleting a large amount of files, It starts by checking it out then reverting them and finally deleting them. The problem seems to be that the reverting process stores the files in memory in if too many files are deleted the entire memory is consumed and the editor crashes.

More info: I have 32GB's of RAM and when deleting maybe...150+ files and saving them leads to the entire memory being consumed. Seems to be some problem with storing the assets in memory when reverting them which ends up consuming all memory.

SRombauts commented 2 years ago

Hi @tumi23

Thanks for reporting the issue! Could you let me know what version of the plugin, and with what version of Unreal you are using it? If you could post or send me the corresponding Unreal logs?

(side question, probably irrelevant: Do you have a dedicated GPU ? or is this a laptop using shared memory from your system? We had some report of crash out of video memory I could never repro)

SRombauts commented 2 years ago

See https://github.com/SRombauts/UE4PlasticPlugin/issues/93 Issues with checking out tons of files IF Editor is running DX12

tumi23 commented 2 years ago

Hi @SRombauts

I'm using the latest release 1.4.13 and Unreal Engine 5.0.0, what logs do you want to see?

I have a dedicated GPU, the Nvidia RTX3070 one.

I checked out that issue and it seems that they might be the same though the GPU is definitely not the culprit but is part of the problem it does run out of memory but the RAM is filled up before that happens and the GPU then runs out of memory(probably throwing some memory to the ram for safekeeping temporarily?) at least for me I watched the task manager for RAM usage and just saw it go from 40% usage to 100% usage in like one minute. It happens for me only when I delete a large amount of assets from a world partition level(One File Per Actor) if that helps.

SRombauts commented 2 years ago

Thanks, that will help for sure! It seems that there are quite some trouble with One File Per Actor, I'll have to investigate more thoroughly as soon as I am done with the last batch of changes needed for UE5

This behaviour of delete that first checkout is new to me, I'll have to also double check this, might be because of UE5 or something with OFPA...

ChromaEdgeStudios commented 1 year ago

Guess I better report this too is still happening on v1.6.0 ...I have to work in DX12 as well and it appears if you need to move a folder with a lot of assets you still get the Out of Video Memory crash. I am only with a 2080ti on my working setup but just watched it and it appears it overloads the Video memory to max within a few minutes of trying to relocate a folder I have. Noticed also my RAM itself will scale up to about half of what my system has. 64gbs in there but it makes it to around 32gbs when this crash happens.

Figured pass it on in case its expected on this latest plugin version to work. Today I am having to do some organize and so far 4 folders have crashed. I guess for now I can just try to move less at a time but really slows things down there

SRombauts commented 1 year ago

Thanks a lot, I have been trying to investigate a bit more yesterday, but even trying to checkout ~1800 files from the cloud didn't break, it, though it was quite fast It might depend on the speed of it, eg the Engine or plugin allocating memory per frame, so the longer it takes, the worst it would get

Ok ok, I do reproduce if I try to delete this 1800 OFPA (when saving, toward this end of the process after checkout "RunCommand: 'remove' in progress for 425.088s...")

edit: image

SRombauts commented 1 year ago

This should now be worked around on master with https://github.com/SRombauts/UE4PlasticPlugin/commit/974ff8fbbefd7c95ef157f2ef04f70007888724e see also #93 and #86

The workaround has been released as part of https://github.com/SRombauts/UE4PlasticPlugin/releases/tag/1.6.1 on the 2nd of August.

SRombauts commented 1 year ago

For future me searching the info, it's tracked by the oldest issue #86


SRombauts commented 21 days ago • I opened a PR for Epic Games to integrate the proper fix into Unreal Engine 5.1 hopefully: https://github.com/EpicGames/UnrealEngine/pull/9492 [UE-100291][UE-160299] Fix source control progress bar crashing out of video memory in case of long-running operation #9492


SRombauts commented 13 days ago The proper fix has been submitted to ue5-main https://github.com/EpicGames/UnrealEngine/commit/67dacf2baaafe0d9b6fb5eeb5b179fb5b871a4bf

It will be part of UE 5.1 release :)