DA Memory Leak on Gigantic Map

I've been playing every GalCiv game for years, and this is my first serious tech issue. Now playing DA (version 1.50x3) on a gigantic map. Mid-game I'm starting to getting "Cannot save- not enough memory" alerts after playing a session for around an hour or two (not only that, it deletes any game I try to save!) I searched the forums and found some stuff on memory leaks, but mostly from 2006. This just started for me with Dark Avatar- anyone else having similar problems?
12,373 views 23 replies
Reply #2 Top
Ha har, so the memory leak is still present, I use to get it all the time in GC2, so it looks like I wont be buying DA after all.
Reply #3 Top
Whenever a memory leak or similar issue surfaces it has this deletion effect. GalCiv deletes the current save file before creating the new one. Net effect is that when it finds it cant complete a Save routine, you lose the lot. I have never understood why they do this, its not rocket science to rename the old save file to .... whatever ... before doing a save, if the save routine goes wrong at least you have the original. Rename it and move on.

With memory leaks present, after the save routine is started, it discovers it cant complete a save due to no memory available. Fair enough as such, it happens, but by that time it has already deleted the original. So if you see the "Cannot save- not enough memory" warning, dont try to save, its a self destruct exercise. If you do it multiple times, you just work your way through all the save files you have, starting with the most recent, and each one gets zapped - press save 3 times, you lose the last 3 save files etc.

Now when "Cannot save- not enough memory" appears, I just accept it as life, come out - restart with last save file, at least I am still running. Its a crazy way to do things, but there is no other choice.

Regards
Zy
Reply #4 Top
I have just been keeping two save files. Every time I save, I save to two different names.

If a save ever fails and I lose the file I was saving to (it has happened to me as well), I can just load from the second copy. A pain, but I am never backtracking farther than to the last save.
Reply #5 Top
The problem here is that Stardock wont accept that they have buggy code causing this and like Ive said earlier this problem has been round since the first GC2, all they do is say only a small % of people are having these problems, and then go on adding bells and whistles instead of fixing the bugs.
Reply #6 Top
there is a way to circumvent this definite memory leak, I'm using cachemanxp and helps immeasurably on gigantic maps to not crash.....

someone said to set one of the parameters to 200 to get it to work properly...do a search on it on the forums to find exactly the info properly....
Reply #7 Top
The problem here is that Stardock wont accept that they have buggy code causing this and like Ive said earlier this problem has been round since the first GC2, all they do is say only a small % of people are having these problems, and then go on adding bells and whistles instead of fixing the bugs.


At no point has anyone denied that there is an issue. Cari has been working on this (among other things), but the cause has remained elusive (yes, there have been bugs before that did not manifest when the game was run in the debugger, making them very difficult to pin down).
Reply #8 Top

The problem here is that Stardock wont accept that they have buggy code causing this and like Ive said earlier this problem has been round since the first GC2, all they do is say only a small % of people are having these problems, and then go on adding bells and whistles instead of fixing the bugs.


At no point has anyone denied that there is an issue. Cari has been working on this (among other things), but the cause has remained elusive (yes, there have been bugs before that did not manifest when the game was run in the debugger, making them very difficult to pin down).


I have worked in a lot of companies where code is developed (including my current one). These kinds of errors are typically difficult to fix in the first place. When you can't easily duplicate them, they can become extremely difficult and time consuming...You can't find them to fix them and you don't know if you have actually fixed it when you change something. Cari has both my sympathy and my thanks.
Reply #9 Top
If they ever get this fixed, can someone give me a shout, because I would dearly like to buy and play DA.
Or maybe Cari would PM me if/when she kills this bug dead with a big stick, it has to be truly dead though unconscious or still wriggling don't count.
Reply #10 Top
I had more problems with my gigantic game, but what I did was expand my virtual memory to 1024-4096 gig, (using hard drive space), since I only have 512 K memory....also when I'm playing I cut off the internet completely, and 3rd thing I do is save every single turn....(name I use is the game date, so name will always be different for each turn saved).....

The problem I had was I crashed and burned after playing like 8 hours, and didn't have a save, which was very frustrating....

Using the above methods I have been able to guarantee I don't waste play time....

game is alot of fun to play, and the game is still playable in its current form....

One of the things I noticed was that when I have ships/planets halfview up, when I move ships with it up, they lurch along making a strange sound every movement, really makes me wonder if its not one of those sub-programs that isn't the culprit....
Reply #11 Top
That halfview open thing seems to happen until the end of the turn that I bring it up (usually to do something like find a lone Spore Ship)
It hasnt given me any game-crashing problems though...
Reply #12 Top

If you're getting the out of memory bug with gigantic galaxies, try turning down the frequency of random planet surfaces.  I suspect that the planets are just using way too much memory rather than the game is actually leaking anything. The last time we had this problem, one of the major issues was an increase in the number of planets in a galaxy. 

Reply #13 Top
I've never had any problem with slowdowns or crashes running a gigantic map. I use to get slowdowns midgame when the AI would stack ships, but they made a beta patch for that. Try getting a 256mb video card, and bumping your virtual memory up.
Reply #14 Top
Try getting a 256mb video card, and bumping your virtual memory up.
[Lieutenant] [Second Place Empire] [Over 5 Battles] [Neutral] [Tough]


Ummmmm, I don't think this is going to fix the issues here. One GB of physical RAM, a page file set to 4096, and a 7600GT graphics card should be more than enough. Maybe it's like Cari says, about the planet surfaces. But enough from the "raise your virtual memory and get a better graphics card" crowd. The help is appreciated when it fixes the problem. These issues certainly have to go far deeper than the hardware being used to run the game.
Oh and Cari, keep up the good work. I have faith that you will find the 'bug' causing the memory errors/CTD's and until then I will try every tidbit with regards to settings that you put out there... that and the faithful use of my FreeRAM program.
Reply #15 Top

If you're getting the out of memory bug with gigantic galaxies, try turning down the frequency of random planet surfaces. I suspect that the planets are just using way too much memory rather than the game is actually leaking anything. The last time we had this problem, one of the major issues was an increase in the number of planets in a galaxy.




Hehe, that's funny, if this is the problem then why have frequent random planet surfaces and gigantic maps, you may as well put a option in the game (crash out of game and hard lock computer in the next turn please)

So if we turn every thing off that's off-able and reduce everything that's reduce-able, turn our displays down to 60x40 with 16 colours, cross our fingers and anything else cross-able then we might get a game without a crash. Okay then, but why dident you say this on the game box?
Reply #16 Top
turn our displays down to 60x40 with 16 colours,


Now that's not fair! They tell you all over the place that you have to have the colors set to 32 bit! I mean come on...
I take it this game pisses you off too Crosswire?
I've been dealing with this in one form or another ever since DL... and then again now with DA... and then I'll probably be going through this with GC III or whatever comes next...
Did I also tell you people that one of my favorite hobbies is running head first into a cinder block wall, repeatedly, until I feel 'different'? It's lots of fun... almost as much as 'trying' to play this game! Sorry to all the devs as I had to say this.
Reply #17 Top
Yep, Im a little wissed at not being able to play these games due to bad code that's been with GC2 from birth and gone though a expansion and a trillion updates yet that same darn memory leak is still with us and goes round and round and round and, well you know what I mean, actually I'm a bit of a expert when it comes to this bug, mainly because of all the fixes and 3rd party pogs I tried, yet to no avail. 2 of the main areas when this bug rears it ugly head are on saves/auto saves and random events and always usually happen on large and gigantic maps halfway into the game and it dosent matter what you turn down or off the crash will get you in the end, just gain a few more crash free hours that's all.
I hope one day they find and plug it.
Reply #18 Top
hmmm no problem like this on a crap 6800 w/ 128mb vc lol Though I do wonder why this game is such a memory hog... a nice em allocation clean up should improve things tremendously, Unless this game is written in basic or pascal then nothing would help hehe
Reply #19 Top
I just wanted to add my little story.

I am running on a E6600 Core 2 Duo, 2 gigs ram, and a GForce 7950 GT (512 megs ram).

The game locks up after about 4 hours of play/idle time. I will frequently start up a game and have to walk away to do various domestic stuff (2 small children seem to be a time sink...). I will come back to the out of memory error.

I don't think it is related to a random planet generation problem because on my current game I am playing at rare plants and rare suns. I have also downloaded the pre-generated planet pack.

I am looking forward to this being fixed because the crash always comes at teh worst possible time.

Reply #20 Top
There is somewhere on this forum a beta-patch that patches this memory leak. I've downloaded and installed it and my game is running smooth on a P4, 2.8ghz, 1 gb without problems for more than 4 hours.
Reply #21 Top

There is somewhere on this forum a beta-patch that patches this memory leak. I've downloaded and installed it and my game is running smooth on a P4, 2.8ghz, 1 gb without problems for more than 4 hours.


Wonderful...does it appear in the Stardock updater or is it a separate patch?

I did a search on the forums and couldn't find anything. Do you happen to have a link?

Thanks!