I Fixed The Maf Error... Here Is How!!

Worth noting... ever sence I have posted this thread I have yet to have a single MAF! :D When the new Civ expansion comes out I will be applying this fix ASAP as to avoid any MAF's in that as well ;)
 
:D When the new Civ expansion comes out I will be applying this fix ASAP as to avoid any MAF's in that as well ;)
Seeing that they included Gyathaar's fix in the expansion, I'd rather wait to see if MAF's still occur...
 
Seeing that they included Gyathaar's fix in the expansion, I'd rather wait to see if MAF's still occur...

Yep, I bet MAF's don't occur in BTS....at least I hope so...:goodjob:
 
this fix brought me out of lurking to report that it worked 100% for me. Game was unplayable for me before, but now I can load the most insane map and mod, and have absolutely no problems whatsoever.

Thank you Slyflyer


athlon 64 4800+, 4 GB ram, 8800 GTS 640MB, Vista Ultimate X64
 
I did as the directions say..but the file i have after using the cff explorer is not a exe file any longer what am i doing wrong the file appears but its a blank white paper...please help i have not been able to play in a long time..lol
 
I did as the directions say..but the file i have after using the cff explorer is not a exe file any longer what am i doing wrong the file appears but its a blank white paper...please help i have not been able to play in a long time..lol

Rename it to be an EXE file....
 
Thanks.. that seems fairly easy and logical i must be slow..


Edit:
Cool thanks for your help.
 
I'm finished i unistalled civ from my computer...
This sucks balls i wanna play this game.
But i can't i ALWAYS get MAF.

My dad says he was getting MAF on his computer so he erased all his music n films.. n it stopped doing it.

How stupid is that?

Does firaxis really think im gonna ONLY use my comp for civ?

Man im rambling im just upset...this sucks,

Anyone know of a game thats like civ i can go buy?
 
Worth noting... ever sence I have posted this thread I have yet to have a single MAF! :D When the new Civ expansion comes out I will be applying this fix ASAP as to avoid any MAF's in that as well ;)

I envy u... lucky mofo.

I guess gonna have to buy a computer that can power 7 space crafts before i can play a full fricking game!!!!
 
I envy u... lucky mofo.

I guess gonna have to buy a computer that can power 7 space crafts before i can play a full fricking game!!!!

There is going to be an expansion pack for civ4 (Beyond the Sword) in a few weeks and it is supposed to fix the MAF errors. So if you are willing to spend 30 dollars/euro's, then maybe that is a solution.

For me the the expansion pack is worth it will all the new options.
 
Im waiting for that game...
Im fiending for it..
lol, Im reinstalling civ as we speak..ill just play little maps i guess.

Did we ever find out if it was Our computers or bad progging?
 
Im waiting for that game...
Im fiending for it..
lol, Im reinstalling civ as we speak..ill just play little maps i guess.

Did we ever find out if it was Our computers or bad progging?

As far as I know, it would be a combination. If computers could support enough memory, then the big maps should be playable with the heaviest mods. But Windows XP is not created to handle such large memory requirements from a single program.

It is of course the responsibility of the programmer to write a program that works correctly for the most used operating system. There doesn't seem to be a problem with the normal maps, but the large maps and huge maps get memory errors especially when used in combination with large mods. So I would think Firaxis is responsible and not Microsoft who created Windows XP. Windows XP was there first and Firaxis should make their program work on all settings within the limitations given by the operating system. Firaxis did not deliver such a program, so it would be their mistake.

Of course, games often don't deliver what they promise. There's nothing new with that. :sad:

One mitigating circumstance is that it is hard to predict what mods can do with a game's stability and the error occurs the most with big mods. Still the modability of the game was one of the biggest selling points. It should therefore not lead to such a big error.
 
Worth noting... ever sence I have posted this thread I have yet to have a single MAF! :D When the new Civ expansion comes out I will be applying this fix ASAP as to avoid any MAF's in that as well ;)

Seeing that they included Gyathaar's fix in the expansion, I'd rather wait to see if MAF's still occur...
In addition to the code I wrote, BtS also has the large memory aware flag set by default
 
Im waiting for that game...
Im fiending for it..
lol, Im reinstalling civ as we speak..ill just play little maps i guess.

Did we ever find out if it was Our computers or bad progging?

A combination really... there are multiple ways for the MAF to happen...
When saving (and loading) a save, civ4 allocates a big memory buffer where it puts all the data into before it compresses the data and writes to disc.

It turns out that for some reason, windows limits how large a single memory structure can be.. on most version of windows this seems to be 512MB... I am not sure.. but I think it is less on vista (and possibly more on win2000)

This creates 2 possible MAF errors.. one is if the savefile dont fit inside this max datasize that is specified by windows... also, since this is a single datastructure.. it cant be partially swapped out, so if you have less then 512MB free physical memory (in a continuous block), you will hit this barrier earlier.

I think setting this flag somehow raises this max buffer size, but I am not sure...

The 3rd way you can get a MAF is if you simply run out of memory, or if the game uses more than 2 GB memory... this flag cant do anything about the first (you have to buy more memory, or increase swap file size)... this flag however raises the limit for how much memory a program can use.

As for the code I wrote for BtS.. it removes the usage of a large buffer that contains the data (the buffer is only max 64kb instead).. so the game will never hit the max datastructure limit... this also pretty much eliminate the problem about if you cant fit the entire buffer in physical RAM
The other MAF bugs can however still happen (nothing to do about if you actually run out of memory).. but since the savegame process uses up to half a GB less memory, it should happen a lot later
 
A combination really... there are multiple ways for the MAF to happen...
When saving (and loading) a save, civ4 allocates a big memory buffer where it puts all the data into before it compresses the data and writes to disc.

It turns out that for some reason, windows limits how large a single memory structure can be.. on most version of windows this seems to be 512MB... I am not sure.. but I think it is less on vista (and possibly more on win2000)

This creates 2 possible MAF errors.. one is if the savefile dont fit inside this max datasize that is specified by windows... also, since this is a single datastructure.. it cant be partially swapped out, so if you have less then 512MB free physical memory (in a continuous block), you will hit this barrier earlier.

I think setting this flag somehow raises this max buffer size, but I am not sure...

The 3rd way you can get a MAF is if you simply run out of memory, or if the game uses more than 2 GB memory... this flag cant do anything about the first (you have to buy more memory, or increase swap file size)... this flag however raises the limit for how much memory a program can use.

As for the code I wrote for BtS.. it removes the usage of a large buffer that contains the data (the buffer is only max 64kb instead).. so the game will never hit the max datastructure limit... this also pretty much eliminate the problem about if you cant fit the entire buffer in physical RAM
The other MAF bugs can however still happen (nothing to do about if you actually run out of memory).. but since the savegame process uses up to half a GB less memory, it should happen a lot later

Very interesting. Thanks for that information. I'm looking forward to playing BTS with your MAF-fixes, especially now that I understand that they fundamentally fixed some of the MAF errors.

You're not very clear on it: can the MAF error where a single program wants to use more than 2 GB's of memory (or 3 GB's with the 'fix' in this thread) still occur or does the program now circumvent that and will only the total available memory be a limit?

Oh and of course :goodjob:
 
Very interesting. Thanks for that information. I'm looking forward to playing BTS with your MAF-fixes, especially now that I understand that they fundamentally fixed some of the MAF errors.

You're not very clear on it: can the MAF error where a single program wants to use more than 2 GB's of memory (or 3 GB's with the 'fix' in this thread) still occur or does the program now circumvent that and will only the total available memory be a limit?

Oh and of course :goodjob:
32 bit Windows still puts a 2GB limit to a single process by default.. however BtS comes with the flag set that allows it to use up to 3GB.. but you still need to use the /3GB flag in boot.ini (or run the special command in 32 bit vista) to allow it to use more than 2GB.

With this flag it can however use more than 2GB on 64 bit windows without you having to do anything.. not sure what the limits the various 64 bit windows versions has, but I think they are all more than 16GB

So for 64 bit windows, the total memory is the limit (physical plus swap), on 32 bit windows it is still limited by 2GB or 3GB depending on system settings (but since the save game process no longer eats up half a gig of memory, it will take longer before you hit the limit)
 
32 bit Windows still puts a 2GB limit to a single process by default.. however BtS comes with the flag set that allows it to use up to 3GB.. but you still need to use the /3GB flag in boot.ini (or run the special command in 32 bit vista) to allow it to use more than 2GB.

With this flag it can however use more than 2GB on 64 bit windows without you having to do anything.. not sure what the limits the various 64 bit windows versions has, but I think they are all more than 16GB

So for 64 bit windows, the total memory is the limit (physical plus swap), on 32 bit windows it is still limited by 2GB or 3GB depending on system settings (but since the save game process no longer eats up half a gig of memory, it will take longer before you hit the limit)

Thanks. Ok, that would mean that it would be a 3GB limit for me, but that would probably not be reached soon with a half GB of savegame size reduction. Maybe if I start playing on some super huge maps with a heavy modpack, but then I will probably die first because of the excessively long turn times. ;)
 
In addition to the code I wrote, BtS also has the large memory aware flag set by default
Nice! :goodjob: Between your fixes and that flag setting this should work great! The only problem will then be to tell people how to enable the 3GB switch in XP 32-bit and enable it in Vista 32-bit. ;)
 
Does anyone know the restriction on win2k for a single process? win2k 32bit is not bound to the 4gigs physical memory restriction! You can have 4Gigs physical RAM + dual 768MB GPU card + other devices and still have your 4gigs on win2k! ....so win2K solves the problem of Memory allocation INSIDE windows..now, how much can windows 2000 assign to a single process?
 
Question. I have BtS, Supreme Commander and a few other games that can blow past the 2 Gig VM limit. I have a 512 Meg video card, 2 Gig RAM, Intel Core2 Duo @ 3.3 Ghz.

Win XP Home

Should I be making the changes to my boot.ini as a fix for other games? If so, will it slow my system in other games? Should I be fixing my swap file at 3072 Meg - instead of having it set to system managed?

Thanks!
 
Top Bottom