Memory Errors and how to avoid them

Stormwind

King
Joined
Dec 7, 2008
Messages
697
The problem:
Frequent memory errors in RoM 2.5 with or without MegaCivPack (this also applies to other mods, this is not a problem of RoM only)

Background: 32bit Windows (32bit XP and 32bit Vista) lets programs use only 2GB total of memory (either physical or physical+virtual combined). The main
problem is that Vanilla Civ4 BtS already goes near this limit and with many mods Civ4 uses more than 2GB which results in Memory Allocation Errors.

But there is a way to circumvent this (Although there is still the chance that this won't work for your PC, there are just to many possible configurations)
XP and Vista do allow the total of memory used by programs to increase to 3GB which is enough for RoM.

Warning: Read and understand the next paragraph completely before changing anything. I can not be held responsible for any damage to your computer or OS.

For XP Home and Professional


Follow these Instructions http://www.finitesolutions.com/Support/Enabling3GB/tabid/70/Default.aspx to enable 3GB Support for your Windows. There are a few addons to this.
1. Steps 1 and 2 in the mentioned guide are optional, you should Back up your data regularly and knowing something about the recovery console can come in handy too.
2. Instead of just adding /3GB to the first entry I prefer making a copy of the multi(0)..... part so you can load windows with the default 2GB option if you
have programs that don't work properly.

NOTE: ALWAYS copy something from your OWN boot.ini because there may be settings unique to your Windows. NEVER copy from the guide above or below.

This should look like this
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition 3GB" /3GB /fastdetect /NoExecute=OptIn
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn

This way you get a Boot Menu where you can boot into plain 2GB Windows if something goes wrong.

3. After the reboot you may encounter wrong resolutions or refresh rates. Even if you don't notice anything unusual, please check the following:
Go to Control Panel - open System - click on Hardware Tab - click on Device Manager. Open up Display Adapters. If you see any yellow exclamation mark in front of your Graphics Adapter your drivers aren't loaded properly.
The solution to this problem is adding another option to the Boot.ini

Open up Boot.ini as described in the above guide. Add " /userva=2900" without quotation marks to your /3GB boot option. Then restart your PC. Do check your Display Adapter again. If it's still not working change 2900 to 2800. Decrease this as long as your display drivers aren't working properly (although settings lower than 2300 or 2200 might not really work for solving the original problem).

It should look like this now:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition 3GB" /3GB /fastdetect /NoExecute=OptIn /Userva=2900



For VISTA: (blatantly copied from this thread http://forums.civfanatics.com/showthread.php?t=224178)

- Now we need to make Windows Vista (32-Bit) ready to support more than 2 GByte.
- Open a command prompt with Administration rights. You find it under "Programs->Accessories->Command prompt" click right and select "run as administrator".
- Enter "bcdedit /set IncreaseUserVA 3072" (without quotes) in the command window and press enter.
After that restart windows



Conclusion:
I'm using this for about a month now and I haven't had any MAFs since then. Not even with RoM 2.5 Megacivpack. Turn times in late games are still long but that's more because of my rather old PC. But since every PC is different there is no guarantee this will work on your system.

System Specs of mine:
Athlon XP 3000+
1,5 GB RAM
GF 7600GT


Any questions/comments are welcome.
 
Hi Stormwind,

I just tried your MAF solution and everything is working fine. I had to add the " /userva=2900" tag to make it work. I'll try a ROM game now and see what happens in the late eras, which is when I usually get a MAF. ROM ver 2.4 seemed to have fixed the CTD's and hopefully now the MAF's are fixed. Am I correct in assuming that it's probably safe to delete the old default line in BOOT.ini once I've found that all my other programs are working fine? (So I can avoid the bootup screen)

Thx so much for the great tip!
 
Hi
I tried to follow the vista advise but is not working, I have to admit I know nothing about tinkering with computer operations. The command prompt is when it opens the black ms-dos screen ye? I entered what's written above and it just comes up with something like " can not find bcdedit "
 
For XP Home and Professional


Follow these Instructions http://www.finitesolutions.com/Support/Enabling3GB/tabid/70/Default.aspx to enable 3GB Support for your Windows. There are a few addons to this.
...........
NOTE: ALWAYS copy something from your OWN boot.ini because there may be settings unique to your Windows. NEVER copy from the guide above or below.

This should look like this
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition 3GB" /3GB /fastdetect /NoExecute=OptIn
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn

This way you get a Boot Menu where you can boot into plain 2GB Windows if something goes wrong.


It should look like this now:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition 3GB" /3GB /fastdetect /NoExecute=OptIn /Userva=2900
.......Any questions/comments are welcome.

The patch is supposed to overwrite/update certain files not just sit in RoM as another RoM folder.

I too have had WinZip do that to me. If so I take the files in the 2nd RoM folder and drag them to the file they should've updated/overwrote. Windows asks if you want to replace the older file by that name with the newer one. I select yes. Once I have updated all the files out of the 2nd RoM folder I then delete it. Has worked for me so far.

Good Luck.

JosEPh :)


I have done that - I can get the RoM mod to load and the title screen to come up. but there it halts, I can't get a start manu/play menu.
I've also failed to get the new TAM mod for BtS to load. I have Windows XP with 2 x 1Gb RAM, but I was able to play it successfully on my son's machine with Vista. I tried the memory allocation update in boot.ini, but it won't let me save it. Do I have to save it as and then move it into a system folder ?
This is what I get when I look at it: The order is different and my NoExecute statement is different.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptOut

I can still play other mods on BtS so I assume nothing has really changed.
 
Excellent! but now.... how do we speed up the late game turns?

I've read limiting the civ dll so that it's no longer 50 helps
and playing without espionage helps
is there any fact in this?
 
Limiting the civ dll and/or not using BarbCiv option.

Current game with BarbCiv On I started with 7AI plus me. By 1851AD there are now 22 Active AI with 5 others killed off already. And I'm experiencing end of turns up to 2 mins long. Now if I can just kill off a few more I might get under 2 mins. Lots of data for the game to process with 23 empires active.

JosEPh
 
I can get the TAM mod for BtS to run fine, but still only get to the title screen in RoM, without a menu. It sits there, doesn't appear stuck - program still responding in Task manager but nothing more happens, and terminates quickly. I moved the WinZip contents to the appropriate folders I think, and patched within the RoM Assets folder.

I'm still having MAFs with 2 big games in TAM Civ4 (Vanilla) crashing - that I can't continue. That may be for another forum, but I did upgrade the pagable memory to 4080, and my boot.ini to:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition 3GB" /3GB /fastdetect /NoExecute=OptIn /Userva=2800
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect

Unlike earlier attempts that I had to go into Safe Mode to change it back again, this one loads fine with both options.
 
How do you go about limiting civs? I've forgotten where I saw it and don't remember the process.

Man... I would pay good money to play RoM on the world's Strongest machine... just image 50 something inch screen and a good 50 somthing different civs. epic length. and most importantly.... getting to the 20th (let alone the 21st) century without turns that take 2 minutes to load.... nerd pron at its fullest
 
vogtmurr,

Have you tried Re D/L'ing RoM 2.5 full and then Re D/ling patch 2.52?

Also are you Patched for BtS to the Official 3.17 patch? You can check thru the Advanced screen on BtS start up. You may have said already but I don't remember if you did.

Do you have more than 1 version of RoM in the C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods folder?

Have you Renamed Rise of Mankind?

If you can't get a Menu that, iirc, was because BtS wasn't updated to 3.17 Official patch.

Or Rise of Mankind had been renamed but the Rise of Mankind Configuration Settings File had these to lines changed:

# ; Name of Mod
Name = Rise of Mankind

# ; Description of Mod
Description = Rise of Mankind v2.52 for Beyond the Sword

Best that I can think of at the moment.

JosEPh.
 
vogtmurr,

Have you tried Re D/L'ing RoM 2.5 full and then Re D/ling patch 2.52?

Also are you Patched for BtS to the Official 3.17 patch? You can check thru the Advanced screen on BtS start up. You may have said already but I don't remember if you did.

Do you have more than 1 version of RoM in the C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods folder?

Have you Renamed Rise of Mankind?

If you can't get a Menu that, iirc, was because BtS wasn't updated to 3.17 Official patch.

Or Rise of Mankind had been renamed but the Rise of Mankind Configuration Settings File had these to lines changed:

# ; Name of Mod
Name = Rise of Mankind

# ; Description of Mod
Description = Rise of Mankind v2.52 for Beyond the Sword

Best that I can think of at the moment.

JosEPh.

HEY - thanks for the good help !!:goodjob:

For sure I had 3.17 installed, so the weird symptoms I had must have been more about not having the right files in the right folder. I was about to try re-downloading all the RoM folders and redo the patch, which was scary because in trying to place all the files in the right folders, I wasn't even sure anymore whether I could find them to delete them all. However, I doublechecked to make sure all the asset files were in the RoM folder within the MODs folder, and GameCoreDLL files in the higher level BtS folder., and I had only one ROM folder when I was done. I think I may still have some of the XML and Python files in both the ROM folder and BtS Assets folder. However, I must have fluked it off; for lo and behold this time it worked ! I even went into WorldBuilder, looks like everything is there. I have some comments about improvement but I'll save them for another forum.

As for the game crashes I still experience in Civ4 Vanilla trying to play The Ancient Mediterranean, I gather even with the successful memory upgrade procedure, these versions do not have the ability to expand the addressable memory, so those games are probably toast :sad:
This benefit is for BtS only (at least I assume it to be - my system starts successfully and hasn't crashed). Well at least there is a TAM mod for BtS :)
 
Bump for new players having Maf problems.
 
Maybe a stupid question ... but it isn't very clear for me.

I have 2048 MB RAM on Vista,

Is it worth it to try the procedure for Vista for solving my MAF's??

Extending to something bigger then 2GB RAM if it isn't there physically ....
 
/3GB or increasing the userva in Vista (which is essentially the same) works even with less than 2GB physical RAM because it sets the amount of virtual AND physical memory a program can use to a higher value. A buddy with 1GB physical RAM on XP had no MAFs with RoM 2.62 Megapack and this option set.

So, yes I would give it a shot.
 
But Stormwind, krisvh is using Vista Not XP. Big difference there I would think.

Edit: Oops just saw you had added userva for Vista. Never mind. :blush:

JosEPh :)
 
I had to change alittle bit in mine to this and now it asks me for the 3Gb or normal start: works fine so far:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINXP
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINXP="Microsoft Windows XP Home Edition 3GB" /3GB /fastdetect /NoExecute=OptIn /Userva=2500
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn
 
Well,

I did the procedure for Vista ;)

I tried to start a custom game with Megapack 2.62 Large Earth2 map ... and no crashes

I had not the time to play on but I advanced further then I ever was before ;)

FYI:
The checkbox for the header file was already checked, I just needed to type in the DOS cmd line and reboot
 
This is the error I get when I tried to load a save game after doing this. Without this I can always load the games I just got ALOT of memory errors. Also I have my graphics all on LOW.

Is there another fix to this?


Note: I have a 280GTX I can't believe I would get video errors.
 

Attachments

  • error.JPG
    error.JPG
    14.5 KB · Views: 280
This works great, just had the game (RoM and a number of modmods) running all night with no crashes. My turns do take a few seconds but I'd swear that might even be a little faster.
 
This seemed to work for awhile. Before this, on snail speed I would only get to the industrial age but with this i was able to get to early future techs. It was quite disappointing when i crashed since normally it would crash after say 12 game hours while this lasted at least 3 times as long if not more.

Note I was on a small map, realistic world map, 5 other AI civs, minor civ start, conquest win, peaceful city flip only and no other settings. I also had all the graphics settings turned to the lowest, turn off animations an even made sure no other programs were running.

Any advice on how I can finally play a game where I can make it through the entire tech tree before crashing?
 
Top Bottom