Out of memory error eats save games

Had to retire on my first Metaverse game or risk losing it entirely because of an out of memory error. I've had a set 2GB pagefile forever, and never had a game chew up over a gig and a half of it before.


Is this something anyone else has run into?
7,387 views 11 replies
Reply #1 Top
There was such an issue in the beta versions of 1.3, but it was fixed to my knowledge--did you update to 1.31 final?
Reply #2 Top
I've had 2 out of memory errors followed by a crash. I had to restart from last save each time. In both cases I was on the voting screen when an auto save started. I got a "Out of memory" message box.

Reply #3 Top
Both of you, please post your debug.err files.
Reply #4 Top
I upgraded a while back to 1GB because GalCiv was eating my memory. But with 1GB, it still does the same. It uses just under 1GB Real mem, and just under 1 GB Virtual mem (vmem usuage is nearly identical to realmem usuage when loading a saved game). I guess that upgrading to 2GB results in a similiar scenario and I will need to upgrade my Swap File to 2.5GB+?
Reply #5 Top
I have had similar problems - not "that" often but it will usually happen at least 2 times - sometimes 3 or 4 on a Gigantic game above Tough level all races enabled. It seems to happen mid to late game usually. far more so in the late game. I have 2Gb RAM and 6Gb virtual memory file set. Most times its a CTD others its a screen freeze, sometimes I can get at Task Manager during / afterwards - when I do all memory used up as well as vertual memory. On around one out of three the crash will eat the AutoSaveGame file - its no longer there.

I originally reported it under Case 13618 GalCiv2 0x4fe7725b. I thought a graphics driver update had solved it - it didnt, although frequency has reduced a little. (I was only one release out of kilter on the driver, it had been released three weeks earlier, so I think the driver was a red herring). I have a dual NVidia 7800GTX on SLI set for highest quality in all catagories (tried reducing quality - still same problem).

In perspective its an irritation not a show stopper. I have got in the habit of regular "Quick Saves" as when it eats saved game files, it seems to leave the Quick Save file alone.

I will focus on it more and send exception reports as it occurs.

Regards
Zy
Reply #6 Top
Here's what I think is happening and it does this in 1.31 as well. During invasions,the game is doing something in memory that duplicates instances of itself. Since I'm merely a user and have no knowledge of the game code, I don't know exactly what that is. In any case, it first consumes all of the physical memory and then consumes all of the virtual memory. Attempting to save the game results in an "out of memory" error. Since the game erases the older save file before failing in its attempt to write the new one, you lose the file. This only happens with large numbers of habitable planets since the problem isn't pronounced enough to use up all the memory with lower numbers of habitable planets. Also, the problem is more prounouced with Windows 2000 than Windows XP because Win2K has a lower limit on virtual memory.

Here's my workaround, when you see the game slowing during an invasion, save the game and close it. Restart the game and continue. This frees up all the physical and virtual memory so the game doesn't run out when it tries to save. It also keeps the game running smoothly. Also make a backup save. For instance, do a quicksave and then do a save with some other name like "backup".

Hope that helps.

Reply #7 Top
There was such an issue in the beta versions of 1.3, but it was fixed to my knowledge--did you update to 1.31 final?


This was a 1.31 game, yes.
Reply #8 Top
Everyone who is experiencing this issue, please grab SmartException from SDC if you don't have it already and have it running when you play. When you get the OoM crash, SE will then *hopefully* write a report that you can send to [email protected], so Cari can find the source of the problem.
Reply #9 Top
Will do. I only had it once, and admittedly, it was a marathon session of more hours than I care to admit, and it was a pretty active war.
Reply #10 Top
I rarely get the "out of memory" error, but I always see the high memory consumption. It's easy to duplicate, just set up a game with a gigantic universe and everything on abundant. Once you have a couple hundred planets, start grabbing more in an invasion and watch the memory consumption, it will just keep going up and up. After several hours of this, it will use it all. It doesn't happen when doing other things, just when acquiring new planets in an invasion.

Also, I play on both my desktop and my laptop computers. The laptop runs WinXP and the desktop runs Win2K. The problem seems less pronounced on the WinXP system so it could be something more problematic with the older operating system.

Reply #11 Top

This is from my saved replies, so sorry on the canned response, but this may help some of you:

One possible solution is to increase the amount of virtual memory available to windows.

To increase the amount of Virtual Memory available to Windows:
 
1) Right click on the My Computer icon and chose properties
2) Click on the advanced tab
3) Under performance, click on the Settings button.
4) Click on the advanced tab
5) Click on the change button
6) Change the initial size to the recommended size and then increase the maximum size.
 
As a note, you should make sure that you have enough hard drive space left for the maximum virtual memory size or you'll start having problems whenever Windows has to allocate more virtual memory. You can get the size of the virtual memory in gigs by dividing the number by 1024.

If you are running low on hard drive space, running disk defrag may help.

Also, if you have multiple hard drives or partitions, you can move your My Documents folder to a drive with more space.  To do this, right click on the My Documents shortcut and choose Properties.  There will be a text field with the current location of the My Documents folder which you can edit, then click Move.  This will save space on your main hard drive, which is generally the drive that Windows will use for temporary files and virtual memory.

 To reduce the amount of memory used by GalCiv2:

* Turn down the nebula density.
* Turn down the background star density.
* Clear out old ship designs from My Documents\My Games\GalCiv2\ships and My Documents\My games\GalCiv2\MetaverseData\ships.
* Design ships with less jewelry.
* Play on smaller galaxies

If you have an older system (4-5+ years old) and you have not upgraded your RAM and video card,  you may also want to disable textures from the Video tab of the Options menu.

If you play in a window, you can keep track of how much memory GalCiv2.exe is using by checking the task manager.  Windows won't give more than 2 GB to any application, so if you're hitting that mark, you will get crashes while trying to save.