[BUG 1.14] Gratuitous Memory Leak?

Maybe this is a problem, maybe it isn’t…

I recently ran through a really long game of survival (675k woohoo!). I had left it running by itself for some time, and when I came back and checked on the progress my computer was acting sluggish and odd. I checked the CPU and memory usage of GSB, and found that it was using 1.1 gigs of memory. This is quite different than the 35 megs or so it uses when I first start the game :slight_smile:

The battle lasted a very long time, and in addition it was probably sitting in the defeat screen for a few hours on top of that. I posted my score and went back to the main menu, opened a challenge, but the game locked up at some point around then. It would seem that the memory used during the survival battle was never freed back to the system.

could memory leak be associated with “floating mouse cursor”? Because after 3-5 battles i feel that my crusors start to float ;]

Just made a 629k federation run: 1,144,492 K memory usage

Sounds like it actually is a horrid memory leak. One thing I never anticiopated was survival modes going that long. For one thing, I don’t think I clean up the space hulks drifting around at any stage. I shall have to look into what it could be.

If even half the space hulks were to retain their momentum after death, that might help things. (but just postpone the inevitable twice as long)

just limit max wreck number :stuck_out_tongue:

have older hulks fade out or break up

The game seems to consistently crash around 1.3 gigs of memory usage

Yes, this is correct.

BTW, I’m running XP 32-bit and 4 Gigs of RAM.

I suppose it would be useful to pass on our system info…

Its not a hardware thing, I’m just obviously letting something build up over time. I never thought a game would last this long, but that’s no excuse. I’ll find it at some point.


Isn’t it cool what happens when you release a game on the masses?

I obviously can’t see your code, but my first guess would be the space hulks…

I know you can turn the display of space hulks off in the options, but does this stop the game from creating them in memory? If this is the case, a time to live on the hulks could fix the problem easily :slight_smile:

I’m hurt! :smiley:
turning off hulks means they are never even considered, or created at any point. It’s interesting to hear that turning them off doesnt stop the leak though. I suspect it may be statistics related. Every single shot that is fired is logged as an in-game stat. After four hours, that must build up…

Actually, if anyone here has a fleet that can last ages on survival, and triggers a memory leak, can they email me the deployment text file? and any associated ship designs too. Otherwise, I may end up designing a fleet that doesn’t do it somehow, and waste hours waiting for it to happen. I’m cliff@positech.co.uk

No offense intended! :wink:

I am working on an indy game project of my own, so I like to think out loud sometimes.

Anyway, I sent you an example fleet that I hit the memory limit with. It should easily demonstrate the memory leak :slight_smile:

yes it does. Unfortunately I can’t work out yet what it is. It looks like its not anything obvious. I suspect its something actually within the non-game code, that I don’t realise is allocating anything.
bah! I’m still working on it, and its already eld me to find a way to speed up some code that’s unrelated :smiley:

Even running with minimum details the leak is still there.

cliff, did my deployment work for you?