Author Topic: Anyone else getting a lot of gc heap errors lately?  (Read 1579 times)

Offline Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Anyone else getting a lot of gc heap errors lately?
« on: December 24, 2010, 12:31:07 am »
AI War's always been a really stable game for me, prior to today I think I've had it crash all of twice. In the last 24 hours, I've had it crash three times due to gc heap errors. I'm curious if it's just me.

Of course, the timing couldn't be worse with the Arcen guys going on (well earned!) vacation, but I am curious if this issue is specific to my system/game or not.


Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #1 on: December 24, 2010, 12:34:35 am »
How big has your game gotten lately, as in total number of ships? It seems to be common for the game to be fine memory wise in the early-mid game, but then start struggling to find enough memory by the late game. Also, what is your ship cap setting? It is almost guaranteed that you will hit memory caps in the late game on the high ship cap setting.
« Last Edit: December 24, 2010, 12:37:34 am by techsy730 »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #2 on: December 24, 2010, 12:36:55 am »
As you probably know that error means that the process tried to grab more memory than fits under the effective 32-bit memory ceiling (seems to vary between about 1.3GB and 1.8GB before you start hitting that in our case).  Of course it could also happen if your system didn't actually have enough RAM available but that's kind of uncommon on a modern machine that's not a netbook.

Off the top of my head:
1) How big is the gamestate?  How many ships?
2) How long into the play session does it happen?  Most folks hit it after a few (or more) hours, and then after restarting it takes roughly the same amount of time to happen again, etc.
3) By chance, were you using the resource flows tab or other parts of the stats screen heavily?  I wrote that to be decently memory efficient but I've seen some errors in my own experience that make me suspicious that I need to be a bit more draconian on it.
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 Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #3 on: December 24, 2010, 12:43:32 am »
Yeah, this machine has 3 gigs of RAM, so it's not hitting a physical memory limit there.

1) About 41,000 ships between us and the AI.

2) We're 16 hours in, it probably started around the 12 mark. We play on epic, with normal ship caps, for what that's worth. This isn't an atypical game size or length for us, and we've rarely had this problem in the past.

3) Not at all, actually, so I don't think that's it.

I've attached a save, if that's any help.
« Last Edit: December 24, 2010, 12:56:56 am by Vinraith »

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #4 on: December 24, 2010, 01:03:11 am »
That save is nearly a megabyte big. No wonder you are having memory issues. :o

Offline Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #5 on: December 24, 2010, 01:15:17 am »
That save is nearly a megabyte big. No wonder you are having memory issues. :o

Pfft, we regularly get 'em up to 1.5 MB without these problems. :)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #6 on: December 24, 2010, 02:43:03 am »
2) We're 16 hours in, it probably started around the 12 mark. We play on epic, with normal ship caps, for what that's worth. This isn't an atypical game size or length for us, and we've rarely had this problem in the past.
But how often does it happen? Or, in other words, how long does it take for it to do it again after you restart the app after the crash?
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 Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #7 on: December 24, 2010, 03:24:20 am »
About an hour and a half, based on this last one. In this instance it also happened right after a large fight had concluded, I'm not 100% certain whether that's always the case, though I can say it's always occurred when things have been quiet.

Offline Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #8 on: December 29, 2010, 09:18:46 pm »
This keeps happening at about an hour and 10 minutes play time, regular as clockwork.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #9 on: December 29, 2010, 09:26:24 pm »
Hrm, not good.  Are other folks seeing similar frequency?
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 TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #10 on: December 29, 2010, 09:35:00 pm »
That's really weird. I can get like 6-8 hours straight without a hitch easy. In fact, I have never gotten a GC error.

Offline BigJake

  • Newbie Mark III
  • *
  • Posts: 29
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #11 on: December 29, 2010, 09:42:07 pm »
Nor I, and I don't think my AI War process has been closed in 2 months.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #12 on: December 29, 2010, 09:44:01 pm »
Nor I, and I don't think my AI War process has been closed in 2 months.
Wow, mine dies more often than that ;)  Of course, I'm running mine inside the Unity development environment, so it's a different memory footprint situation.
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 Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #13 on: December 29, 2010, 09:45:10 pm »
This is, to be clear, the first game where I've ever had a recurring problem like this. It's on epic, it's the first game we've played with 100 planets (usually we play on 80 planet maps), it's 2 player, and we're not speed demons by any stretch. I'll attach another save for reference, maybe it's something we're doing, or something the AI's doing or has that it doesn't normally?

We've got about 50,000 ships in game at this point. This isn't an abnormal game size, save size, or game length for us.
« Last Edit: December 29, 2010, 10:00:20 pm by Vinraith »

Offline Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: Anyone else getting a lot of gc heap errors lately?
« Reply #14 on: December 29, 2010, 10:20:12 pm »
Keith: Should I be putting this on Mantis? I know previous gc heap errors have been closed immediately, but then those were always one-off issues.