Download

Need help tracking down a possible memory leak in my editor/game

So i started noticing that as i worked in UE4.23 for longer periods of time without closing the editor, my fps would slowly drop over time. This only appears to be an issue in the editor, and not in actual built versions of my game as far as i can tell however, so i’m not entirely sure what the issue is.

I did a little digging before writing this and found that i can turn on memory usage and object counter, so i did this. When first opening my project i have around 1gb memory usage, which seems fairly reasonable, and 103k objects. After opening certain blueprints however this number rises, sometimes upwards of 200k objects and basically never comes back down, even once i close the blueprint that caused the spike in objects. This is all without actually running the game at all.

First off i guess i should ask, is this normal? i’m a complete noob when it comes to debugging etc, so i have no idea what is normal and what isn’t.

After a little more digging i stumbled across people mentioning the session front end, and 5 mins later i realized i have literally 0 clue on how to interoperate anything shown in that window, which sucks because its probably (hopefully) going to be the answer to my solution.

After this, i thought maybe it was an issue with the engine, so i decided to “quickly” download UE4.25 and see if anything changed. The initial object has pretty much halved to around 50k, but i still had the issue of opening blueprints and having the object count not drop back down after closing them (if thats an issue at all), but on top of that, i suddenly had a lot of errors that i previously did not have.

More specifically, i had a lot of error stating “accessed none trying to read property”, all of which still seemed to work fine, and didn’t crash the game, but when closing the game they popped up in the message log as red errors.

Could these possibly be the issue i was having in 4.23 that just weren’t being logged as errors in that version? or maybe they are just another problem i will eventually have to fix if i choose to upgrade to 4.25 permanently and don’t actually have anything to do with my current issue.

Either way, i would really appreciate any help trying to solve my issue. If i have not included any information that may be needed to fix the issue please let me know and il include it.

Thanks in advance for any help!

In my experience it is normal, UE always loads with FPS drops if you are working in UE while playing in PIE for testings, its almost like having two games working at same time, if you close UE and start a Build, of course its going to run faster, no UE affecting your FPS, your pc is focused on the game, but this drop is going to be worst as your project increases from 1GB to 70GB, thats why you need to be extra carefull and not import things you wont need, for example, if you buy a collection of materials, make a new project, find the materials you like and only migrate those to your projects, not the whole collection…

I work in a 70GB project, I have a top notch pc now, but before play in PIE i always have to save everything, because after test PIE play for 30 minutes for example UE might even crash when i exit PIE… And my project takes about 15 minutes to open (with all windows close), but that happens as your project becomes bigger and bigger, its worst if you use several monitors… even worst if you have main player BP open in the engine, thats why i always close every window, then click play, all that is normal.

The log errors, you need to try to figure out the issue, you might think it is not a problem, but it is, because when you try to package, those errors, if they are too much, might cause the package to fail, sometimes indeed those are not big issues, since you close the game while maybe one BP was doing something that was not finished, things like that, so the circle was not completed, other times, you could be trying to “get all actors of class” and your “get” is trying to find “0” while there is like 20 versions of that BP in the game… so you need “for each loop” to find them all,

Different versions of UE, have nothing to do with In-game error logs, unless you have a pluggin installed wich is not ready for current version, then you need to contact DEV, if not, you canot downgrade a project, thats why making backups its very important… you wont stop working 2 months until that DEV updates the pluggin right

The UE editor / PIE has definitely some VRAM memory leaks. My UE editor crashes sometimes because of this. “Garbage collection” seems not to work very good with PIE.