I’ve been working on a C++ project for a couple of weeks, and I just recently noticed that while playing in editor the memory usage from UE4 Editor begins to accumulate. This persists after stopping the game in editor and future PIE sessions cause the memory usage to continue upward. The only way to reset this usage is to end the UE4 Editor process and restart it.
This is the project I have been working in (zipped and uploaded): Google Drive: Sign-in
Any ideas on how I can workaround this problem or what might be a cause would be greatly appreciated. I am using the launcher version 4.11.2. Thanks.
Hi DesertEagle,
I opened your project and noticed that when I started PIE, the Output Log started displaying a large number of Divide By Zero warnings. I also saw the memory leak that you described. When I resolved the Divide By Zero error in the Level Blueprint, both the warnings and memory leak disappeared. If you try resolving those warnings yourself, do you still see the memory leak occurring?
Wow. Thanks , can’t believe I missed that.
I resolved the divide by zero and the active leaking while playing in editor (PIE) – the really bad part – stopped.
However, I am still concerned, as every time I begin PIE it appears that UE4 allocates a few more MB of memory (which doesn’t appear to be deallocated whenever I stop PIE). Ultimately this is minor, but could eventually bog down machines that continuously leave the editor up and repeatedly PIE for long periods. Is this expected behavior, or is it just something I’m seeing on my end?
Steps to Repro:
-
Launch Project (with divide by zero issue resolved – I just used a float NE zero node with a branch node)
-
Open Resmon or TaskManager
-
Observe a persistent memory increase whenever beginning to PIE
Anyway, thanks again for highlighting my mistake and getting the big problem out of the way.
I tried to repro the second memory issue that you mentioned using your project, and I noticed that after starting and ending PIE 30-40 times, the memory usage had increased about 0.2 GB. It did also decrease a little bit every now and then. For most development computers, a couple hundred MB would most likely be relatively trivial. Are you seeing a significant increase on your end?
Hey , I totally understand that this tiny bit of memory is not super significant on most development workstation. On my end I haven’t reached much higher than about 1GB of extra memory usage over the course of three days of heavy editor use. This is low priority, but understanding where this extra memory is going would be nice.
I can certainly understand how, even though the memory usage growth currently is generally low, it could be a genuine concern in some instances. Unfortunately, I have not been able to reproduce any significant memory usage increases in my tests with your project (after resolving the divide by zero warning). I will keep poking at it to see if I can find anything.
Have you tried upgrading your project to 4.12 yet? If so, do you still see the same memory behavior?