Poll

why are there almost not turn based games anymore.

Is there no market?
0 (0%)
do too many people like really time.
0 (0%)
is it follow the leader idea?
0 (0%)

Total Members Voted: 0

Author Topic: out of memory game crash error?  (Read 1813 times)

Offline malkilve

  • Newbie
  • *
  • Posts: 6
out of memory game crash error?
« on: February 06, 2010, 12:34:16 pm »
the game is only using about half of my ram and a third of my processor.  I was wondering if there is some way to change that.
I'm using a
4870x2 for the video card
i7 quad core
6gig of ram

On the other hand i am trying to move 12,000 ships at once.

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: out of memory game crash error?
« Reply #1 on: February 06, 2010, 05:14:43 pm »
the game is only using about half of my ram and a third of my processor.  I was wondering if there is some way to change that.
I'm using a
4870x2 for the video card
i7 quad core
6gig of ram

On the other hand i am trying to move 12,000 ships at once.
*jawdrop* that's a screaming system for AI war, i don't think it can use all of your system... On the other hand, you might want to try out this one save. It's with over 200k units in the galaxy.

Actually, there  is a way to stress your system: if cheats are on and you don't have one of the newer prereleases, then drop like 10 (broken) golems on a planet and watch the 77k wave come!
Edit: Didn't realize that it was crashing... X will have to help with this.
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: out of memory game crash error?
« Reply #2 on: February 07, 2010, 12:34:57 am »
AI War is a 32bit program for a lot of good reasons, and the one drawback of that is that it can only use 2GB at most of system memory.  This is normally not a limiting factor at all, because most of the time the game uses about 500MB of memory at most, and even in extreme cases such as the 201,000 ships example that only uses about 1.1 to 1.2GB of memory normally.  During game saves it will use about 400MB more.  During certain high-frequency command issuances to a lot of ships in a huge game of this sort, that can also cause temporary memory spikes which can, in the worst case, cause this error.

Keith is going to add pooling to a couple of more internal objects that we use in order to hopefully minimize the load on the memory heap in situations such as the one you are describing, which should alleviate the issue.  The game has to be in a really extreme state of resource usage before this can even become a problem, though; when moving around that many ships for the moment, issuing orders to fewer of them at a time is a good idea, likewise giving orders less frequently is a good idea.  That is super hackish, obviously, but is a good workaround for the short term.  With 12,000 ships on one planet, though, that game must be one heck of a beast; normally the upper end of expectations is more like 4000-7000 total for a human player, excepting multi-planet starts and similar.

It's also possible that some other program is using a global windows hook that is causing some memory address fragmentation; MSN messenger has been pointed out as a culprit for this in the past.  If your memory usage is spiking unusually highly without a huge number of ships in the game, then that sort of thing is what it is (and that would affect other programs and system performance in general, if that's the case).  From the little information I have so far, my bet is that your savegame is just absolutely monstrously huge (beyond what would be playable on most hardware, but with your supernice rig the memory instead becomes the limiting factor).  Hopefully the next beta version, which will hit Monday, will provide some degree of help for that sort of extreme edge case; we always try to avoid having any such memory errors even in the really out there cases, of course.

Thanks for the report!
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 malkilve

  • Newbie
  • *
  • Posts: 6
Re: out of memory game crash error?
« Reply #3 on: February 07, 2010, 01:56:04 am »
i tried the test and made about 20 golems.
there was 260,000 ship attacking them and 310,000 enemies in the game.
the 260,000 was at a single planet.  i did turn some settings down for the test.
i was was watching the memory closer and aiwars was running about 1.2-1,60 gig at the end of the test.
the cpu was running 24 threads to aiwars and the total cpu use was about 23-27%use for all systems
i decided to stop test when the game wasn't responding about half the time.
but that was to be expected considering the test.
the 12000 ship order i did have a multi-planet start.
thx for the info

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: out of memory game crash error?
« Reply #4 on: February 07, 2010, 10:53:32 am »
Okay, that game is simply ridiculously out of bounds is all it is. It isn't meant to support nearly that number of ships. The latest beta versions already add some sanity check caps to prevent cheat-spawned golems from causing such an oversized number of ai ships; and that, in turn, will prevent your sort of crash in fresh games if you play similarly. Thanks foe the added info!
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 malkilve

  • Newbie
  • *
  • Posts: 6
Re: out of memory game crash error?
« Reply #5 on: February 08, 2010, 04:39:53 pm »
The test i did with the golems was to see how many enemy units the game could handle vs me giving orders.
I did notice when the game gets really stressed it seems to try and leave full screen mode.
but i look forward to future updates.