Page 1 of 2

Memory leak when left a long time.

Posted: Wed Apr 13, 2016 7:42 am
by Petah
There seems to be a memory leak when the game is left for a long time.

I started Factorio, loaded a save game, played for about 5 mins, quit to main menu, and left my PC for about 2 hours. Came back and Factoria was using 12GB RAM. Happened twice.
Factoria Memory.png
Factoria Memory.png (2.6 MiB) Viewed 7486 times

Re: Memory leak on title screen

Posted: Wed Apr 13, 2016 2:01 pm
by Rseding91
Can you please update to 0.12.30 and see if the issue persists?

Re: Memory leak on title screen

Posted: Fri Apr 15, 2016 3:52 am
by Petah
Its installed through Steam, should it not update automatically?

Re: Memory leak on title screen

Posted: Fri Apr 15, 2016 6:28 am
by Loewchen
Petah wrote:Its installed through Steam, should it not update automatically?
You have to manually opt in the beta (in the beta tab in factorio properties).

Re: Memory leak on title screen

Posted: Fri Apr 15, 2016 6:31 am
by Koub
Have you enabled experimental updates in Steam ?

Re: Memory leak on title screen

Posted: Tue Apr 26, 2016 1:50 pm
by Petah
I don't really want to "enable experimental updates in Steam".

Is 0.12.30 going to be released as stable?

This bug seems to happen every time which causes all my other open programs to also crash. Quite annoying.

Re: Memory leak on title screen

Posted: Tue Apr 26, 2016 1:56 pm
by Rseding91
Petah wrote:I don't really want to "enable experimental updates in Steam".

Is 0.12.30 going to be released as stable?

This bug seems to happen every time which causes all my other open programs to also crash. Quite annoying.
When 0.12.30 is released as stable it will be the literal same executable file that's available now as experimental. There's no reason not to test it - you can downgrade again after If you decide you don't want to use it.

Re: Memory leak on title screen

Posted: Tue Apr 26, 2016 8:42 pm
by Petah
Ok, tried 0.12.30, happened again. Didn't get a screen shot this time though as it crashed out.

Same process, load a game, played for 5 minutes, quit to title screen, left it open when I went to bed.

Re: Memory leak on title screen

Posted: Tue Apr 26, 2016 8:52 pm
by daniel34
Petah wrote:Ok, tried 0.12.30, happened again. Didn't get a screen shot this time though as it crashed out.
Do you have the log file?

Re: Memory leak on title screen

Posted: Tue Apr 26, 2016 9:11 pm
by Petah
Attached

Re: Memory leak on title screen

Posted: Wed Apr 27, 2016 5:50 pm
by Rseding91
I'm not able to reproduce this. When I let it sit the memory usage stays *exactly* at the same amount. The debugger even shows the memory allocations don't increase or decrease.

Have you checked any other running programs you might have going? Anything that might hook into processes or modify them in any way.

Re: Memory leak on title screen

Posted: Wed Apr 27, 2016 6:28 pm
by Rockstar04
Rseding91 wrote:I'm not able to reproduce this. When I let it sit the memory usage stays *exactly* at the same amount. The debugger even shows the memory allocations don't increase or decrease.

Have you checked any other running programs you might have going? Anything that might hook into processes or modify them in any way.
Just passing by, and I dont have Factorio installed through Steam, but could the Steam overlay be causing this? (not sure if you tried to repro this with and without it)

Re: Memory leak on title screen

Posted: Fri Apr 29, 2016 10:15 pm
by Petah
Still happening on 0.12.31

Also noticed it causes my pagefile to blow out to 44GB and fill up my hard drive.

How long did you leave it running for? Did you test with the Steam version?

Re: Memory leak on title screen

Posted: Fri Apr 29, 2016 10:37 pm
by Rseding91
Petah wrote:Still happening on 0.12.31

Also noticed it causes my pagefile to blow out to 44GB and fill up my hard drive.

How long did you leave it running for? Did you test with the Steam version?
I highly suspect you've got something else wrong on your computer as nobody else is reporting this issue.

Can you upload the save file you're using?

Re: Memory leak on title screen

Posted: Fri Apr 29, 2016 11:04 pm
by Petah
Attached, although its happened on more than 1 save.

Re: Memory leak on title screen

Posted: Fri Apr 29, 2016 11:24 pm
by Rseding91
Petah wrote:Attached, although its happened on more than 1 save.
I've had Factorio 0.12.31 idling in the background for the past hour and a half and it hasn't changed in memory usage in the slightest. You definitely have something else on your computer that's causing this. Do you have another computer available that you can try to reproduce the issue on?

Re: Memory leak on title screen

Posted: Sat Apr 30, 2016 8:08 am
by Petah
Im not really sure how another app can cause a memory leak.

I noticed though I left the game going (not the menu) for 4 hours came back and it's sucked up 12GB. This was on a new game (attached SS).

It is locking the computer when I walk away (log in screen), could this be an issue?

Re: Memory leak on title screen

Posted: Fri May 06, 2016 8:11 pm
by Petah
Did it again (0.12.33 steam):
factorio-current.log
(1.53 KiB) Downloaded 131 times

Re: Memory leak when left a long time.

Posted: Fri May 06, 2016 10:58 pm
by Rseding91
I can't reproduce the problem. I started the game, locked the computer and left it for a few hours - zero memory leaks.

Unless you can replicate it on another computer I'm saying you've got some software on your end that's causing it.

Re: Memory leak when left a long time.

Posted: Tue May 24, 2016 2:33 am
by taiiat
ah, just the sort of thing i was looking for.

in V0.12.33, there's definitely some sort of Memory Leak.
it seems to be very, very minor if you just start a new game and watch memory. but the more things you do, the faster it seems to leak.
ending up as the fairly early new game i had started, where i have a pretty small factory and hadn't even left the start area yet - Factorio using just shy of 5gigs of Memory.

i figured it was one of the Mods - so i disabled all of them. loaded the same save, still leaking heavily.
i started a new game, placed down a bunch of miners, some belts, and some inserters doing various things, and then looked at memory for a bit. it was definitely leaking, with the random bits i'd placed with, it was leaking ~4KBytes per second.

however the real save before, had definitely been leaking much faster than that, as it had gotten just under 5gigs.
Image

i can upload the related Save, but it's kind've huge. i'm guessing because the map is explored out quite a ways.
hell, maybe that's related, hmm.

hah! i made another blank new game, and explored out a ways on the map. the more i have explored, the faster it seems to leak from what i'm seeing.
even getting close to leaking 1MByte per second with a completely blank map (nothing built) with everything explored from -2048 to +2048.