• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE IDE memory leak by opening/closing sprite.

gnysek

Member
I've opened GMS2 IDE, and it was taking about 240MB in RAM.
Then I've opened my project, and it raised to 420MB - since I've got a lot of resources, this is nothing strange, and absoluty expected.

Then, I've used Ctrl+T to open one of sprites. I've closed sprite.

I've repeated last step about 15 times.

IDE was taking 1050MB of RAM, but I've only opened one sprite, and made no other changes.



Does anybody got similar issue?
 

rwkay

GameMaker Staff
GameMaker Dev.
C# is garbage collected - it may well take a while for the collection to happen so you may see it go down over time

Russell
 

gnysek

Member
@rwkay I left it for 20 minutes, and it changed from 1050 to about 1020 MB of RAM. Several opened objects/sprites more, and IDE was unusable (stopped to response), as it took so many memory (2500MB), that whole PC got hiccup and I've got to kill process. So, eventually I can work for 10-20 minutes and then need to restart or everything will hang. For me - when opening window, it's stored somewhere (hashtable/collection ?) and not removed on close, then on opening assigned to next free slot.

What I've noticed is, that this happens only on PC at my office (Windows 7). At home, on my notebook, where I have Windows 10, when I repeated those test just now, after opening sprite 30 times - I've still got 520MB of RAM used. After 5 minutes, it changed to 440MB - so about same size that at start.

So... may it depends of Windows version, or maybe .NET framework version?
 

rwkay

GameMaker Staff
GameMaker Dev.
Out of interest is the PC with the large memory usage using the MESA driver???? this would account for the large memory usage as all the graphics will be in the shared memory area rather than in a driver memory area.

You can tell from Help -> About and it will mention MESA in the graphics driver string

Russell
 

gnysek

Member
@rwkay - it doesn't says MESA, but this graphic card is integrated one and for sure have shared memory (since PC at office is mainly for programming, not for playing games, so it have pooor GFX ;) ). May it be a GFX driver issue, instead of GMS2 bug, or .NET specific version framework issue ?

pc-work.jpg
 

rwkay

GameMaker Staff
GameMaker Dev.
Hmmm have you tried updating your graphics driver at all I am on an Intel machine and my driver is 4.4.0 - Build 20.19.15.4463 - looks like you are on something very very old (though may be a different chipset and driver set)

Russell
 

gnysek

Member
I've downloaded it, but it says I've already have 4.5 or never (from registry it seems that 4.6). It's for sure connected to this specific GFX card, as at home I'm not getting this issue and I can work without lagging/hanging problems for 5-6 hours in row. Looks that I won't be able to work on game at free time in work :)
 

gnysek

Member
@rwkay - maybe you can add experimentally an option to force System.GC.Collect() by some button ?

For example, in PHP Storm, there's memory indicator in statusbar, and when you click it, it forces garbage collector:
php-status-bar.png
 
Top