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

Ok.. I had a closer look... the memory allocation error dont happen in zlib..
When zlib fails to allocate memory, you get another message 'failed to compress game data' (but the game wont crash)

The bug happens with the earlier mentioned stream that gets all the game added into it before compression is done..

It appears the size of this stream starts out small, and everytime it is filled up, it doubles in size... this works out fine at first.. the stream eventually increases to 80MB.. 160MB.. then 320MB... but when it tries to go up to 640MB, it crashes...

So basically it should be relatively easy to fix this.. just need to continiously make the stream zip itself and save to disc instead of storing in memory before starting to zip..
Bad news is that to be able to do this in the DLL, would break save game compatibility.. since would basically need to store the save as 2 seperate games (the original save just containing a pointer to the file that contains the real game data)
 
hi all,

in my teams mod - visa mod packs,

we encountered numeros reports by players that claim to have maf,

many of our gamers have some strong machines in their behalf,
but still getting maf.

we had a little break through in our mod - and we obtain a work around the maf -it doesnt kill the maf completley though, but it reduces the chances alot.

we have a system of save game that works like this:
when save -
the system creates 2 seperate save files - one save is some kb,
and the other is being saved into the nsaver folder of the game - can be 1.5 mb+,
thus, having two files of one save game. we have some strong coders on our side, but its still a massive problem to overcome the maf completley,

so we reccomend to our players to play on large maps and less - with less civs, also, we are testing the apearnce of mafs on windows 2000, cuase my programmer (very gifted one) says the memory allocation on win 2000/me is better and the game should run better there - he tested it a few times and had no mafs. soon im gonna test it myself , but still this isnt a real solution.

the maf probelm kills the ability to create vast mods, and the modders creativity. also another week spot - that occures is a long lag between turns in late eras, though kael recentley created speed mod that improve this lag.

i pray that the btw expantion will obtain some better maf handling, and the window of mega mod creation will be better.
 
You people are all ignorant saying you never had it(by saying ignorant i mean it's ignorant to wave away the complaints of tousands of players as if it doesn't exist just because you personally never got it, i never got it myself, untill i found out why people get it and tried to get it myself, was pretty easy then to get it also)..i can setup a system that never has it, and a system that goes MAF with plain warlords as well as civ4 within half of game standard map 18civs..

send Take2 dozens of savegames already, debug logs, stack calls, etc, all they say is:"sorry but you are sending us in programming language and we don't understand" ROFL :) so far Take2 support ROFL LMAO

anyway, read the ViSa Expansion Pack website, the FAQ part, has a huge info about how to avoid the MAF and what you should never do:"windows ViSta! :)

but take2 is too ignorant to understand to read it..it's well written and tested on the ViSa webpage, only take2 comments:"they don't understand either c++ nor can they use savegame run by autoAI = 1" NOT the AUTOAI MOD!!! but the original AUTOAI from firaxis...they really expect me to play hours of my good time to find a game that goes MAF? ROFL, what a ignorant bunch of poeple at take2..i hope Take2 goes down and i can finally contact someone at firaxis
 
Ok.. I had a closer look... the memory allocation error dont happen in zlib..
When zlib fails to allocate memory, you get another message 'failed to compress game data' (but the game wont crash)

The bug happens with the earlier mentioned stream that gets all the game added into it before compression is done..

It appears the size of this stream starts out small, and everytime it is filled up, it doubles in size... this works out fine at first.. the stream eventually increases to 80MB.. 160MB.. then 320MB... but when it tries to go up to 640MB, it crashes...

So basically it should be relatively easy to fix this.. just need to continiously make the stream zip itself and save to disc instead of storing in memory before starting to zip..
Bad news is that to be able to do this in the DLL, would break save game compatibility.. since would basically need to store the save as 2 seperate games (the original save just containing a pointer to the file that contains the real game data)

This has already been fixed in the ViSa expansion pack by NEV!
no problem with savegame compatibility except on multiplayer..

but there are more problems then that! obviously the whole memory management from civ is screwed..use Vista, and it's easy to force a MAF

however, installing 4GB of ram, and you can play ViSa expansion pack, Huge Map, 30Players, without a MAF...as long as enough memory is free..and NOT use Vista!! but on XP you can play without MAF..

btw, to cope with the memory management, nev is working on a flexbit solution right now, which is beeing tested in VISA expansion pack..disabled by default though..just developpers enabled but either beta players or visa release versions still play without it, so you have to compile it yourself from the SVN SDK..still has some bugs though since the latest code hasn't been uploaded yet..


btw2, if you move on into the game, using the solution visa has, you can find that occasionally, also on loading a game(not saving) this MAF can occur..it's not JUST the savegame method..
 
Took a closer look, and managed to find a way around the 2 files approach, and put everying into a single file...
saves would still be incompatible to standard saves, but with no size limit
(I just created a save containing 20 GB of game data by using a loop that was continuously adding numbers into the save)

I guess I will clean up the code and post it
 
Took a closer look, and managed to find a way around the 2 files approach, and put everying into a single file...
saves would still be incompatible to standard saves, but with no size limit
(I just created a save containing 20 GB of game data by using a loop that was continuously adding numbers into the save)

I guess I will clean up the code and post it

:worship: awesome :worship:
 
They are ruining CIV IV large map experience :(

If someone can work out a solution for these errors it would be more than great! Good luck to anyone who tries :)
 
While the code i wrote worked just fine for saving.. I ran into some problems when writing code for loading the saves again...

Will see if I can get it fixed (not much point in avoiding MAF on save f you cant load the save again :p )
 
though i appreciate people finally going to try an "always work around" fix..i rather have firaxis to know of this problem and them fix it..take2 is widthholding information from them..obviously
 
You people are all ignorant saying you never had it(by saying ignorant i mean it's ignorant to wave away the complaints of tousands of players as if it doesn't exist just because you personally never got it, i never got it myself, untill i found out why people get it and tried to get it myself, was pretty easy then to get it also)..i can setup a system that never has it, and a system that goes MAF with plain warlords as well as civ4 within half of game standard map 18civs..

I wasnt waving away anyones complaints, I was just stating that I have never gotten it and asking a few questions to help isolate. I have no doubt its a real issue but to track down issues its important to know when they hit and when they don't.

Kudos to Gyathaar for doing such a great job tracking this down.
 
Yeah, but it's not just upon saving..saving is just the first MAF you'll get..in the ViSa source code this has been fixed, and people getting MAF previously, can now play without this MAF, however, later in game, you get it again, at some point..could also be on loading a game even..

I know people which got MAF on Huge maps, 30civs visa modpack previously, on a 4Gb machine, and after the MAF fix in visa, the MAF was gone, and they could play 1250turn game without MAF...but, after installing windows vista, they got the maf back at their computers...returning to XP, solves it again...but, if you continue playing, at some point, you still get it...
win2000 is safest for playing!!!! even a 2gig machine allows you to play huge map, 30civs, visa mod, and no maf..unless you play maybe 3000turns...but it's reloadable, and you can continue playing then...windows memory management is known to be not so perfect when it comes to free up unused memory :)
 
Can you make this work by installing Win2000 on one partition and vista on another and just using win2000 partition when playing civ IV?

Vista >> Older windows, except when it causes stupid effects like this :D
 
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!

Dumb thing to say. Small maps are good, but large maps are a lot of fun, and make for epic games.

And I respect the Civ franchise too much to use a copied version of the game. In fact, I have two copies of Civ 4. (my first dvd snapped)
 
Dumb thing to say. Small maps are good, but large maps are a lot of fun, and make for epic games.
Is this a smarter thing to say? ;) I love huge maps man. Crappy for me My 736mbmb\ 128mb 9550 g card\ 2.0 processor can't play em all that well.

Whats worst and serious insult to injury is the fact CIv4's huge maps arn't evan huge anymore! :mad: You can't fit near the amount of cities as the old "Huge" in CIv3. Are these tiles massively ovesized tiles for a reason/ Like mybe the prgrammers new the game was actin slower then before so they chipped away at all the sizes of all maps?

I wonder if they made rules like penatlys for expansion as built in size restrictions to protect these obvious flaws from becoming legit complaints, of tarnished gameplay. BtW will make this harder to hide so I hope they fixed it
This made a mini Civ before but Here we alla sudden we now have 10 new Civs coming for a toal of a record 34! and unlike before, when the engine could accomadate all the new additions, now each civ with an average of say 5 cities piece a going to need a deceant world size to house them all and Im not sure its going to play out so well late game ( the part of the game that was improved the most!!)


Im holding to this as a explanation and hope for Civ4's problems this
and that
 
Small maps? you are crazy :p hehehe, no, really, everyone his own joy, personally i like epic games, large, huge, 3civs, play 2 weeks, and then have some enemies with just 700-800 units, 150 naval units, 250air force, and try to conquer this bastard while he's having an alliance with 2 or 3 other computers...that's pure civ to me! :)

im now running my 2nd game on win2000 with 4gigs, 2100turns speed visa mod, no maf! :) hehehe
 
I'm seriously thinking of installing windows 2000 to play this game without the freaking MAF.

um... anyone got a copy of win2000 i could borrow?¿
 
Top Bottom