Firaxis: FFS, support the game. Bad Memory Allocation error when SAVING games

snoochems

Prince
Joined
May 25, 2004
Messages
434
Hi all.

I've been playing Civ 4 again, and am into a really nice game with lots of civs etc.

Anyways, the game crashes (bad memory allocation) about 50% of the time when trying to save... and when it does crash, the save is broken, meaning i have to redo the last 20 turns or so... and then just to have it crash again when saving.

I've known of this problem since the game was released. I thought they would've fixed it up with a patch by now. Or perhaps the expansion pack would've fixed it.... but no. Same error that I got when the game first came out.

Does firaxis support this game at all? 1 patch for Civ 4, 1 patch for the expansion, and this game breaking bug still isn't fixed?!!!!¿ :mad:




UPDATE: PAGE 4 has a link to a WORKING FIX for this problem. A special NO THANKS to firaxis for there help and support.
 
i agree! fix this bug, please!

in my current game (which i was enjoying very much), i can play one turn and maybe save. on the second turn, if i try to save, it crashes. if i let it go on for more than a turn without saving, it crashes. boo-hiss!
 
Can you guys post details of your system specs etc please?

In particular, how much system RAM do you have, how much virtual memory is allocated, and how full is your hard disk drive? Have you run a disk check on your hard drive lately to fix it for errors?
 
Can you guys post details of your system specs etc please?

In particular, how much system RAM do you have, how much virtual memory is allocated, and how full is your hard disk drive? Have you run a disk check on your hard drive lately to fix it for errors?

I have 2GB of RAM and the system only uses about 1.8GB of it.

My CPU is an A64 3800+
My video card is an ATI X1900XTX (512MB)
Virtual Memory is 2GB
Plenty of HDD space (75GB+ on installation drive)
Hard Drives are new, and have not had any problems.

The error only happens on large games, and, for me at least, only when saving.

BTW, My current PC in not the same one when I was getting this error when first buying the game. So I doubt very very much it is my PC. Even my OS is different now. (now using x64)


i agree! fix this bug, please!

in my current game (which i was enjoying very much), i can play one turn and maybe save. on the second turn, if i try to save, it crashes. if i let it go on for more than a turn without saving, it crashes. boo-hiss!

It is probably crashing when AUTOSAVING. Took me a while to figure that out. Look at the top left of your screen when ending your turn.
 
Can you guys post details of your system specs etc please?

In particular, how much system RAM do you have, how much virtual memory is allocated, and how full is your hard disk drive? Have you run a disk check on your hard drive lately to fix it for errors?

That was surprising... Are you guys really unaware of your game's biggest problem? There has been thousands of posts about this over the past year.

Specs seem to be irrelevant. And in CFC I haven't seen anyone who has not encountered this problem.

You are going to find the Memory Allocation Failure throughout -- it's a Firaxis problem - not a "mod" problem - once your saved files get to around 1400 or 1500 k you can expect an MAF -- it is not a matter of "if" you will get one -- You will get one -- it's simply a matter of "when". The amount of ram in your computer has nothing to do with it - I am running with 4 gig on a 6600 2.4 core duo processor and I get them - firaxis has to fix this because their code is hidden in the exe file - nothing moders or map makers can do about it. Sorry

And honestly this is still the main reason still preventing me from buying the game, as I don't want to spend money on a game in which I'll spend hours/days developing my civ, and then not being able to continue into modern ages. I'll rather keep playing civ3 which works.

If MAF is not fixed in Beyond the Sword, it will be as much a waste of time as the mods of hundreds of modding fans, because there is no point in adding new options/civs/features to a game that does not work.
 
When I disable Norton Internet Security it seems to delay the Memory Allocation Error. Right now I just saved a game on a huge map in 1540 AD. The saved file is 1844 KB in size.
 
Can you guys post details of your system specs etc please?

In particular, how much system RAM do you have, how much virtual memory is allocated, and how full is your hard disk drive? Have you run a disk check on your hard drive lately to fix it for errors?

2 GB physical memory.
1.131 GB page file (at the moment).
when this happens, civ4 is occupying 800-900 MB of physical memory. having fewer programs open doesn't seem to help it. (this is why i say that i don't believe it's _really_ running out of memory)


the disk drive is less than 50% full.
i haven't run disk check on the drive, but event viewer shows no disk errors. i haven't had any other problems saving or loading files, but i'll run disk check to be sure.

edit: no problems w/ disk check.

also, it's not just autosaving. i can get about 1 manual save from the game before the error.
 
This error just ruined my game also. I noticed I got it when the savefile started to reach 1400+. I could reload and continue on for quite a while when I let my laptop cool down though (ATI X1600 256 mb, 2 gig ram, 2,16 duo core) but than it came back later again when the save got even bigger.

There is no reason for Civ IV to get you this error when saving the game so it is a problem with the game itself that Firaxis should have fixed ASAP. Still not fixed and that is really really really not caring from their side.
 
That was surprising... Are you guys really unaware of your game's biggest problem? There has been thousands of posts about this over the past year.

Specs seem to be irrelevant. And in CFC I haven't seen anyone who has not encountered this problem.

...

If MAF is not fixed in Beyond the Sword, it will be as much a waste of time as the mods of hundreds of modding fans, because there is no point in adding new options/civs/features to a game that does not work.

I was surprised too. Surely they MUST know about it. What Civ fan hasn't tried to play a big map with lots of Civ's before?!!¿!

As I said before, I was getting this error when the game first came out, before the first patch was even released. I might try and find my posts threads about this error later. (unless they get purged after a certain time)

I just can't understand why it hasn't been addressed yet. A number of patches and an expansion, and still no joy. Civ 3 had a built in limitation with the number of units and cities that could be on the map, and Civ 4 just crashes at the worst possible time (when saving)... we can't win if we want a large game.

I agree about Return of the Sword... i doubt I will be paying any more money for the Civilization franchise if this bug isn't fixed. For my tastes in Civ games, its a real game breaker.
 
Mybe its time you both got out and met some new specs huh? .....*reads specs* OK you both got pritty sweet specs but probably using a pirated copy or something. Civ4 plays fine for me. You must be a Civ3 'preferred' player who can't adjust to real gameplay. Small Maps are where its at man. What would you do with a big map anyway? You Probably just wish you could settler spam some more :rolleyes:

sorry you guys feel your being hushed or ignored but You must understand this is a endorsed Fan site and negative messages like this will not be dwelled on for long. If you don't like something about this game don't come here and say it.
Civ4 rules!
 
Read properly before posting. This error always happens.

small maps are glorified games of checkers. If you want any resemblence of realism, you get MAFable sizes.


probably using a pirated copy or something.

nope


If you don't like something about this game don't come here and say it.

I didn't know CFC was a dictatorship :lol:

If we don't come here and tell Firaxis people about such problems, how will they know to improve it?
 
BTW, it's a massive claim to say this will "always" occur. I've being playing Civ4 since before release (a tester) and I've never had a save crash as described here.

Maybe it only works on Aussie versions. ;)
 
When a save happens.. most of the game data if put into a stream.... on a huge map this can take up many many megabytes of memory.. then while this stream is still in memory, a zipped copy of this stream is created in memory by zlib.

I believe these crashes happen if zlib (a 3rd part library) fails to allocate enough physical memory.

Finally the zipped stream is written to the hard disc.
 
Ive never seen this error before. What is the typical map size/number of civs you guys play at? If you play a game on a standard map with the default number of civs can you reproduce the problem? (Im just trying to isolate that it is or isnt caused by greater save data, not suggesting you guys dont play large maps anymore).
 
I definitely get the MAF's from time to time and I've got 3 gig of RAM. Major pain.
 
probably using a pirated copy or something.

no, no, no. the game box is sitting on my bookshelf


You must be a Civ3 'preferred' player who can't adjust to real gameplay. Small Maps are where its at man. What would you do with a big map anyway? You Probably just wish you could settler spam some more :rolleyes:

and yet i still ask that firaxis indulge me in my false gameplay of large maps with lots of civs. i can't imagine what i'd do with big maps, either, but i somehow find ways to pass the time with them. poor me.


sorry you guys feel your being hushed or ignored but You must understand this is a endorsed Fan site and negative messages like this will not be dwelled on for long. If you don't like something about this game don't come here and say it.
Civ4 rules!

NOW we're being hushed (but only just now) and just by you.

firaxis directs people to these forums for tech support issues. and, it's not merely a feature of the game i happen not to like; it's a bug, and it's appropriate for the tech support forum.


Maybe it only works on Aussie versions. ;)

nope, US version.


Ive never seen this error before. What is the typical map size/number of civs you guys play at? If you play a game on a standard map with the default number of civs can you reproduce the problem? (Im just trying to isolate that it is or isnt caused by greater save data, not suggesting you guys dont play large maps anymore).

is there a way to check the map size after the game is created?

i would classify the current map as "pretty big" with 12 civs. i think i selected "huge" when creating the game.

even with all the graphics settings turned all the way down (one of the suggested kludges for this error), i still have this error.

i can try a game on a smaller map with few civs.


When a save happens.. most of the game data if put into a stream.... on a huge map this can take up many many megabytes of memory.. then while this stream is still in memory, a zipped copy of this stream is created in memory by zlib.

I believe these crashes happen if zlib (a 3rd part library) fails to allocate enough physical memory.

Finally the zipped stream is written to the hard disc.

that's a good conjecture. thanks! is there a way we could diagnose if this is the cause? any debugging flags that we could turn on for zlib, or something like that?

would it help to post a saved game where this is happening regularly? (and, would there be any personally identifiable info i'd be giving away by posting a saved game?)
 
T.A. Jones is just being sarcastic, I think... His post was sarcasm aimed at Civ4 and Firaxis, and justified sarcasm, I think. :(

Firaxis DOES know about this error. However, Firaxis says it occurs only in modded games, and they, you see, "don't support modding". So if this error had occured to you in an unmodded game, send the save file to Firaxis. Maybe they WILL do something about it in this case.

Well, I find that, when playing Huge maps 18 Civs 5/6 of the game run with no MAF's for me. When they start appearing, I just disable Autosaves and finish the game without closing Civ4. However, it is very annoying that you can do nothing else on your computer when finishing your game and being afraid to save it and exit Civ.

:clap: to Firaxis for creating this game, but :gripe: and [pissed] to them for spoiling it MAF. :mad:
 
When a save happens.. most of the game data if put into a stream.... on a huge map this can take up many many megabytes of memory.. then while this stream is still in memory, a zipped copy of this stream is created in memory by zlib.

I believe these crashes happen if zlib (a 3rd part library) fails to allocate enough physical memory.

Finally the zipped stream is written to the hard disc.

Somebody cares :bounce:

Thank you.

1- So, is it possible to modify the source code such that it writes the initial stream to the harddisk, then clear memory, then run zlib (sub-question 1a: can zlib zip the data without taking all of it into memory?), then write the zipped stream, then finally erase the unzipped data?

Wait a minute...I seem to have described using harddisk as virtual memory.

2- Can zlib be modified such that it works wit not only actual memory, but also virtual memory?

3- Another way...after creating the initial stream, is it possible to remove everything of civ4 from memory except zlib? Then zlib can do its business, and restart civ4 (or not - I don't mind quitting the game everytime it saves, that is the only time I save anyway)
 
If this is the problem, then it is "quite easy" to write code to get around the problem.. however the savegames would not be compatible with the normal saves.
(the code that does creates the current saves in the way they are done now is located in the exe file so cant be modded, but it can be replaced by code in the DLL)

Wait a minute...I seem to have described using harddisk as virtual memory.

2- Can zlib be modified such that it works wit not only actual memory, but also virtual memory?
A good question.. I will have a look...
 
Top Bottom