Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

4.11.2 Memory Leak while PIE

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): https://drive.google.com/file/d/0B-nyK76NiqpvMVV3TEdPWmlmSHM/view?usp=sharing

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.

Product Version: UE 4.11
more ▼

asked Jun 14 '16 at 02:51 AM in Bug Reports

avatar image

172 9 23 24

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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?


more ▼

answered Jun 14 '16 at 02:53 PM

avatar image

Tim C ♦♦ STAFF
18.2k 423 69 286

avatar image DesertEagle_PWN Jun 15 '16 at 10:20 PM

Wow. Thanks Tim, 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:

1) Launch Project (with divide by zero issue resolved -- I just used a float NE zero node with a branch node)

2) Open Resmon or TaskManager

3) 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.

avatar image Tim C ♦♦ STAFF Jun 16 '16 at 09:40 PM

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?


avatar image DesertEagle_PWN Jun 17 '16 at 09:12 PM

Hey Tim, 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.

avatar image Tim C ♦♦ STAFF Jun 28 '16 at 06:45 PM

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?


(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question