x

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"

Landscape Memory Bug (Leak?)

I've noticed a problem when moving my project from 4.13.2 to 4.14.1 that there's a memory bug associated with the landscapes where if I reload any level with a large landscape (not sure which size it starts occurring but going with the biggest size which I currently want has an issue: 255x255, 2x2, 16x16, 8161x8161, 256) or a different level and go back to the same one with the landscape, the memory is never freed and any memory associated with the landscape is added back on top, ranging from 50 to 300 MB every reload. I tried this with both level streaming and open level commands and was able to reproduce this on a new project as well.

Product Version: UE 4.14
Tags:
more ▼

asked Dec 17 '16 at 06:04 AM in Bug Reports

avatar image

ujrkingdom
12 6 14 14

avatar image AndrewHurley Jan 03 '17 at 03:34 PM

Hey ujrkingdom,

I am not getting the same results when testing in a new blank project using an 8x8 landscape. I have attempted to load the level while in PIE as well as in Editor, and both seem to free up the memory and stay consistent.

Can you provide me with steps to reproduce this issue on my end?

Could you also provide some screenshots showing the increase in memory when you reload the level?

Thank you,

Andrew Hurley

avatar image ujrkingdom Jan 03 '17 at 03:38 PM

Hi Andrew,

Can you try using the largest landscape size possible, after doing a little bit more testing I found that it only reproduces with very large landscapes. After poking around in the source code I found it may potentially be related with the texture and weight maps. I'll post some screenshots when I get back from work.

Thanks,

Ujwal Ranganeni

avatar image ujrkingdom Jan 03 '17 at 10:35 PM

Steps to Reproduce:

  1. Create a landscape with these parameters: - Section Size: 255x255 - Sections Per Component: 2x2 - Number Of Components: 16x16 - Overall Resolution: 8161x8161 - Total Components: 256

  2. Go to the level blueprint and setup some logic to Open the level or stream the level on a button press or however you see fit.

  3. Launch the project as a Standalone game or in any instance where the project runs as its own process.

  4. Now keep reloading the level to see the memory increase. At these settings I currently range from 100 to 300 mb increase at every reload.

avatar image ujrkingdom Jan 03 '17 at 10:45 PM

Here are the screenshots, take note of the memory usage for the first Unreal Engine Process:

alt text First Reload

alt text Second Reload

alt text Third Reload

alt text Fourth Reload

alt text 30+ Reload

alt text Task Manager Memory Usage

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first

Hello ujrkingdom,

So I ran some more tests and actually encountered a blocker when trying to test the memory leak. I will say the tests I ran (reloaded the level 10+ times) were not producing a memory leak on my end. I did experience a crash however, which I have logged a ticket.

The crash I logged could very well be related to the memory leak/issue you are reporting, but it will be hard to tell until it gets fixed and you run additional tests. For tracking purposes you can see the issue I logged by following the link below.

UE-40210

Let me know if you have additional questions or comments.

Thank you,

Andrew Hurley

more ▼

answered Jan 05 '17 at 10:32 PM

avatar image ujrkingdom Feb 11 '17 at 07:57 PM

Hi Andrew,

I was wondering what kind of machine you were testing this on and how you were testing it? I went and tried testing this again on all my windows machines on versions 4.14, 4.15 and 4.16 and on some of my friend's windows based computers, and they all produced the same result.

I don't think this is an isolated problem. I'm not sure if this occurs on Mac and Linux.

Thanks,

Ujwal Ranganeni

avatar image AndrewHurley Feb 14 '17 at 04:32 PM

I tested on my work machine which is pretty powerful, and I was able to reproduce the crash on my end. However, after I tested in the preview release (4.15 preview 4) I did not get the crash to occur.

Myself as well as the engineer who was assigned to fix the issue, were no longer able to reproduce the crash. You can get more details by reading the bug I have linked in my answer above.

If you are still getting this crash, please provide us with steps and your crash logs so I can have this ticket investigated further.

Thanks,

Andrew Hurley

avatar image ujrkingdom Feb 14 '17 at 05:20 PM

So I wasn't talking about the crash, but about the memory leak. Are you sure you were testing this correctly? I posted a link to this on the ue4 reddit page to see if anyone else could reproduce the leak, and one person who was running archlinux was able to.

https://www.reddit.com/r/unrealengine/comments/5ttgov/landscape_memory_leak/

I also did a git bisect to see where the leak originated from, and it pointed to the physx upgrade from 3.3 to 3.4

https://github.com/EpicGames/UnrealEngine/commit/36caee758dd76cc543b5bfbbc8842619ab09848c

If possible can you try testing this again, and if you still can not reproduce it, would it be possible for us to do a skype chat or something so I could talk to you further about this. This leak is a pretty big roadblock on my project as I have two levels with very big landscapes.

Thanks,

Ujwal Ranganeni

avatar image AndrewHurley Feb 14 '17 at 10:41 PM

So there are known performance issues and crashes with the PhysX 3.4 upgrade which we hope are addressed in the 4.15 release. Since there were so many unique crashes and issues, we have attempted to fix as many as possible, but since we are about to release the official 4.15 binary, would you mind retesting in that version to see if you are getting the same results.

If this continues to be a blocker, I would look at breaking up your two large levels into more manageable landscapes and components so you can control the stream etc. better.

Thanks,

Andrew Hurley

avatar image ujrkingdom Mar 11 '17 at 02:05 PM

Hi Andrew,

Sorry to bother you about this, but I was able to fix the memory leak and made a pull request on github, if possible could you review it or get someone else to?

https://github.com/EpicGames/UnrealEngine/pull/3276

Thanks,

Ujwal Ranganeni

avatar image AndrewHurley Mar 13 '17 at 02:07 PM

We have someone assigned to triage your pull request. We appreciate your patience while we review the issue.

Thank you,

Andrew Hurley

avatar image Skullptor Mar 24 '17 at 08:20 AM

Same here, tiled landscapes stay in ram even if i switch to another blank level. I can only build lights or package if I restart editor. Maybe it can't tell if the blank map is part of the tiling so it does not dump the other sublevels?!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Be the first one to answer this question
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