Author Topic: Apparent memory leak, game rapidly becomes unplayable  (Read 9333 times)

Offline jax211

  • Newbie
  • *
  • Posts: 4
Apparent memory leak, game rapidly becomes unplayable
« on: October 19, 2018, 11:55:18 pm »
So, used to own AI Wars. Long time ago, can't remember exactly how far back. Game was fun, generally performed flawlessly until I tried a 10-difficulty Spire Campaign (think I have an account around here complaining about performance problems with that actually  8)). But anyway I bought the whole pack off Steam to get everything up to date and try AI Wars again, and two pictures are worth a thousand words:





Just sitting there paused the game balloons to 2.6 GB before becoming non-responsive, at which point even killing the process leaves my entire PC unusable for about a minute while something is being cleaned up. Nothing in the options seems to help. Have tried updating drivers, turning off AV, etc, still no help. Game just wants ~8 MB more RAM every second.

Oddly, turning off all minor factions, lowering ship cap and minimizing ship complexity makes the problem worse. With that the game seems to devour ~12 MB per second. Actually playing the game (unpausing) lowers the rate at which it wants memory significantly, enough to get a short amount of game time in before things go bad, but any pausing goes right back to MUST CONSUME MEMORY mode.

System specs:
Windows 10 Pro 64 bit
i7 2600 @ 3.4 Ghz
8 GB RAM
Radeon RX 480

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Apparent memory leak, game rapidly becomes unplayable
« Reply #1 on: October 21, 2018, 08:19:40 pm »
Have you tried verifying the local files from Steam? We haven't made any updates since 2014 to the game, and people have been playing it continuously, so something is very wrong with your local setup I think. I'm very puzzled why this would happen for you, but I'm sorry to hear about the trouble.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline jax211

  • Newbie
  • *
  • Posts: 4
Re: Apparent memory leak, game rapidly becomes unplayable
« Reply #2 on: October 22, 2018, 10:46:41 am »
Thanks for the response. It means a lot, I know you guys are hard at work on AI War 2. Spending time going back to deal with supporting AI War 1 must feel sucky, and I understand if it's just not something you want to do right now.

Yes, tried verifying. No dice.

Played around some more. The problem seems to fix itself over time. If my memory balloons to 2 GB or so, which doesn't affect performance much, then sometime later it will be back down to a much more normal ~800 MB. So whatever is happening is eventually being cleaned up. It also only happens while paused and in the system view (not galaxy view), so I can avoid it by being in galaxy mode whenever alt-tabbed to check something and spending a minimum amount of time in the system view giving orders (or playing at -10 speed instead). Knowing all this the game is fairly playable for me, I managed to complete a game yesterday.

I tried backdating to 8.003 in the betas section and the problem doesn't come up any more. If you have some intermediate versions of the game available you could throw them at me to help narrow down where it started. Looking at the update notes 8.019 seems like it was supposed to fix this kind of problem yet it happens for me after 8.019 rather than before.
« Last Edit: October 22, 2018, 10:57:06 am by jax211 »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Apparent memory leak, game rapidly becomes unplayable
« Reply #3 on: October 29, 2018, 07:58:29 am »
Can you post the save from which those screenshots were taken? Or another save with a similarly reproducible issue (pause, watch task manager, watch memory be devoured)?

Thanks :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Apparent memory leak, game rapidly becomes unplayable
« Reply #4 on: October 29, 2018, 10:47:30 am »
jax,

Sorry for the slow response.  I've been going through some extreme life events during this period.

I have made two new beta branches:
v8.019
and
v8.023

If one of those works, I will likely just revert the game's head version to that one.  Just let me know what you find, though.

Thanks,
Chris
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline jax211

  • Newbie
  • *
  • Posts: 4
Re: Apparent memory leak, game rapidly becomes unplayable
« Reply #5 on: November 07, 2018, 04:34:57 pm »
Attached a save. Don't know what you'll find though. It seems to happen in every game right from the start. No esoteric starting conditions required, it happens with a simple no-frills game the same as one with all the factions and such turned on.

One additional thing I've noticed: it happens whether you are zoomed out or zoomed in on the system map, but when it happens while zoomed in the rate at which memory balloons is much greater. That's what the 8-12 MB/s eating comes from. While zoomed out if it decides to eat memory it only does so at around 2 MB/s. So I'd guess whatever is filling up memory has something to do with displaying those shiny up close sprites.

Neither v8.019 nor v8.023 appear to fix the problem.