View Issue Details

IDProjectCategoryLast Update
0002666AI War 1 / ClassicCrash/ExceptionJan 27, 2011 11:42 pm
ReporterDraco18s Assigned To 
Status newResolutionopen 
Product Version5.000 
Summary0002666: 30 Planet Start, High Ship Caps, Breaking Computers
DescriptionUpon starting the game and the ally getting a full synch he got a disconnect and when I alt-tabbed out I saw a dialog about "Too many heap sections."

Doubt there's anything you can do, though. Just thought I'd point it out.

(Try and catch it before the player starts the game, perhaps? E.g. "expected unit count will exceed available memory" or something.)
TagsNo tags attached.
Internal Weight

Activities

TechSY730

Jan 27, 2011 9:22 pm

reporter   ~0009741

Last edited: Jan 27, 2011 9:23 pm

Clearly, his computer is not awesome enough to run the awesomeness of AI WAR!!! Either that, or the AI decided to send a wave at his RAM before he had a chance to build up defenses. :D

More seriously, out of memory issues are a little hard to see coming until it is too late. In a managed language like C#, there are few guarantees about the size of an object. Depending on how Mono rearranges things during run time, a class may not even have a constant allocation size.
All this to say is that it is near impossible to predict out of memory before starting a memory intensive operation.
Maybe some sort of catch for the OutOfMemory error thrown, canceling the game generation, letting the GC clean up the prematurely dead game, and then give that error.
However, I don't know how Unity is structured. Does it even give you a chance to catch out of memory errors, or does it "helpfully" crash the program before your code even gets to look at the error?

Chris_McElligottPark

Jan 27, 2011 9:22 pm

administrator   ~0009742

That REALLY shouldn't happen with 30 planets. Even with High ship caps and 120 planets, that shouldn't happen until way long into the game during intense fighting or something. Had you been playing the game for a long time before it did that, or was it off a fresh load? It's possible there's a different bug going on there.

Draco18s

Jan 27, 2011 9:45 pm

developer   ~0009743

Last edited: Jan 27, 2011 9:46 pm

It was a fresh load. We never even got to the point at which we had resource values.
As a side note: I have 2 GB of RAM.

Chris_McElligottPark

Jan 27, 2011 11:08 pm

administrator   ~0009744

Last edited: Jan 27, 2011 11:08 pm

How much RAM was the game using at the time? It's possible that if your system had a low amount of RAM available at the time, and/or if you have swap/pagefile turned off or very low, that you could get this sort of error prematurely.

Draco18s

Jan 27, 2011 11:42 pm

developer   ~0009746

I didn't check. I should have in retrospect.

Issue History

Date Modified Username Field Change
Jan 27, 2011 9:12 pm Draco18s New Issue
Jan 27, 2011 9:22 pm TechSY730 Note Added: 0009741
Jan 27, 2011 9:22 pm Chris_McElligottPark Note Added: 0009742
Jan 27, 2011 9:23 pm TechSY730 Note Edited: 0009741
Jan 27, 2011 9:45 pm Draco18s Note Added: 0009743
Jan 27, 2011 9:46 pm Draco18s Note Edited: 0009743
Jan 27, 2011 11:08 pm Chris_McElligottPark Note Added: 0009744
Jan 27, 2011 11:08 pm Chris_McElligottPark Note Edited: 0009744
Jan 27, 2011 11:42 pm Draco18s Note Added: 0009746
Apr 14, 2014 9:27 am Chris_McElligottPark Category Bug - Crash or Exception => Crash/Exception