CTDs, game freezes/long pauses, unit responsiveness, and how I solved these problems

drachasor

The Undying Flame
Joined
Nov 26, 2005
Messages
869
The following deals with CTDs, the game slowing over time, and unit responsiveness. I have solved all of these problems on my system (read on). This is an edited account of my original series of posts on Apolyton (so if some of the paragraphs seem a bit disconnected from the others, my apologies).

I have a Athlon 2000+ XP processor, a Nvidia Geforce FX 5200 Graphics Card (81.95 drivers), Nforce(1) motherboard (by Asus), 768 megs of ram, and I use the onboard sound. I also have 3 gigs set aside for pagefile usage. I have gotten the latest Python .dll, the latest .dll for the audio system the game uses, and the latest blink and zlib files. These files have not helped my problems to any noticeable degree.

I spent several days working on how to improve the game's responsiveness, stop the "game slows down over time so now I have to exit and reload a new save"-problem, and end my CTDs. This problem solving had the added benefit of tremendously reducing the periods where the game froze for a sustained duration (often a minute or so).

For those interested in my description of the freezing problem, I include it here. I would note that it did not seem to be related to my RAM or CTDs.
The second problem is that the game freezes temporarily at odd moments. When it freezes nothing on the screen moves, though all graphics are rendered (including the circle indicated what unit I have selected if applicable). The mouse will also still move and I can go to the windows Task Manager. It remains in this frozen state for 10 seconds up to perhaps a minute, then returns to normal (sometimes it crashes when it is like this, sometimes it crashes when it hasn't frozen). The odd thing is that there is nothing that should be freezing it up, as far as I can see. For instance, I will have just finished moving a unit and the game goes to a new unit. AFTER it gets to the new unit and has the unit selected and all the graphics rendered it freezes (if it is going to freeze). It often does this when moving from one city to another at the beginning of a turn when I have to decide what they should produce (but all the windows renderd when it freezes). Furthermore, my system goes from the normal 3-40% CPU usage of Civ IV to 100% usage, and it stays at 100% until it is no longer frozen. Memory usage changes little, though sometimes RAM is *freed*, whilst I have never notice the pagefiling change. I can think of no good reason for this behavior (and it is Civ using up all the processing power as the task manager shows).

The following steps solved my problem completely (there are still small pauses but these don't happen too much overall and do not increase in duration or frequency as I play from a save). I've played over 80 turns without a Civ-related crash (I had one freak crash that seem to involve something else after 20 turns playing a save, but then after the reboot I played for over 60 turns without a problem).

1. I turned off screen shots, but honestly I don't know if this does anything. I also have Wonder Movies off and I have yet to test the game with them turned back on.

2. In the INI I changed "Set max frame rate clamp (0 means none)" from 0 to a fixed number (20 at first, but later I moved to 30 without a problem).

3. In the INI I changed "Set to 1 for dynamic animation paging" from 1 to 0. (Note that the last two changes produce small effects by themselves, but a quite large difference together....I do not know why, animation paging should help the game go faster, one would think).

The above two, together, help increase unit responsiveness and reduce freeze times.

4. I unpacked all of the art files into the custom directory. Then I deleted the Interface folder (keeping it inexplicably made the game crash on any load or new game--I also deleted the camera folder, though I am not sure if it was causing a problem).

5. In the INI I changed "Disable PAK memory mapping (May affect performance)" from 0 to 1. Please note that this must be done with 3 otherwise there is a large performance degredation (at least with me).

These two helped reduce any odd memory effects that were going on and, perhaps requiring the initial two steps, also got rid of the slowing over time effect. I believe the game somehow is mismanaging its memory when it is in charge of what is going on.

6. In the INI I turned on "Sync Input to Smooth Interface".

7. I also have some debugging features on, but I do not believe they have any positive effect on performance (including the D3D9 queries, which I have turned on).

I fiddled with "Trilinear Minimap Filtering" and disabling "Tree Region Cutting" (anyone know what that is?) but changing the defaults produced no positive results either singly or together. I think after I develop a few mods (e.g. learn python some) I'll set up a 'mod' that profiles python usage.

Anyhow, perhaps this will be helpful for some.

-Drachasor

PS. I played with my virus scanner's on-access scan on and off after the above changes and it seemed to make no difference -- for those interested the freak crash happened while scanning was off.
 
For those who want to look at it (if anyone does), here's a copy of my CivilizationIV.ini (labeled as a txt so I can upload it). This one has audio disabled, but feel free to enable it if you want to use my ini.

-Drachasor
 

Attachments

I followed steps 1,2,3,5, and 6 and so far the changes have eliminated the CTD I was getting on huge maps later in the game. I was able to complete a game on a huge map by winning the space race and then playing beyond that and killing everyone without any errors. :D :D

In this same game I had experineced two CTD before I tried these changes. I was able to play from calvary onward with no crashes after these changes.
 
First off, thanks a bunch to Drachasor for posting these tips. Quite a bit of troubleshooting work there and its greatly appreciated.

I had the same results as Woody by following the same steps (all but #4). I'm still getting the terrible game slowdown as it progresses on larger maps, but this appears to have fixed the CTD problem I was having.

As an fyi for those reading, my system specs are:
Asus P4G8X Deluxe mb, 2.6Ghz Intel CPU, 2GB DRAMM, Sapphire Radeon ATI 9800 Pro, Creative Audigy 2ZS card w/7.1 Creative speakers

I was hoping Drachasor could pop back in here and lend one more bit of direction. I couldn't quite figure out what needs to be done in step #4. Which files were being unpacked to which folders? There's just the one Custom folder that I could find (/Resource/Civ4/Custom), however there are 6 Interface folders (2x under /Mods, 1 x in /assets/art and 1 x in assets/xml). Moreover it appears that the Custom folder already has a bunch of .tga files in it already.

In any case, a bit more detail on what was done on step #4 would be quite helpful. I'm a bit lost on what was done there.

Regards,

Sophist
 
I've implemented some of those changes after reading a similar post. They fixed most of my CTD issues.

I sincerely hope someone at Take2/Firaxis takes notice of these threads, and uses the unpaid efforts of the fans to troubleshoot the problems and use that as a basis for a future patch that addresses these issues.

I've noticed lots of new people at these forums (I am one of them) who I doubt would be here except for the enormous bugs in the game... I hope that a new patch comes out soon (that way new users wouldn't have to edit the .ini, just download the patch and play).

On the other hand, CivFanatics just got a whole lot more forum members :D
 
On my Intel 3GHz, 1Gig RAM, ATI Radeon 9000 Mobility Laptop, these changes made polygons render very strangely *at* the viewer when zoomed out a little. When zoomed in, it functions okay for a turn or so in late games, then still crashes.
 
Sophist- said:
I was hoping Drachasor could pop back in here and lend one more bit of direction. I couldn't quite figure out what needs to be done in step #4. Which files were being unpacked to which folders? There's just the one Custom folder that I could find (/Resource/Civ4/Custom), however there are 6 Interface folders (2x under /Mods, 1 x in /assets/art and 1 x in assets/xml). Moreover it appears that the Custom folder already has a bunch of .tga files in it already.

You unpack the asset files in "c:\program files\firaxis\civilization iv\assets" in the standard install.

Unpack to "C:\Documents and Settings\Moose\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets.

Delete "C:\Documents and Settings\Moose\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\interface". -- Did anyone not do this and get the game to crash? It would be nice to know this isn't something weird with my computer (I don't think it is...but it is bizarre).

Everything in the custom folder should be empty before you do this, unless you've added a mod to the game. So far as I know anyhow, but to be safe you can save all the files there and then put them back in after unpacking -- unpacking will overwrite any file that has the same name and location as an unpacked file.

I'm glad this has helped people. : )

-Drachasor
 
alexpro14 said:
is there a way to turn off the leaders animations

Not as far as I know. When the package is released to edit everything then that should come with .nif editors (which stores animation info). Then you could make a version that doesn't animate.

I don't think you can do that now.

-Drachasor
 
Oh, I also noticed the game will be slow on Huge maps for me. But it runs great on large maps even late-game (a bit of slowdown here and there, but nothing like it was). So I'll be content to stick to large maps until patches take care of the rest of the memory issues--someone from Firaxis said the next patch is going to work on that a lot.*

-Drachasor

*Over at Apolyton.net
 
lukasbradley said:
On my Intel 3GHz, 1Gig RAM, ATI Radeon 9000 Mobility Laptop, these changes made polygons render very strangely *at* the viewer when zoomed out a little. When zoomed in, it functions okay for a turn or so in late games, then still crashes.

Hmm, weird.

-Drachaosr
 
I can confirm that messing with those ini values does the trick.
At least for me

Geforce 6600 GT with 81.85 drivers, AMD 3200, 1 GB Mem

Same symptoms before with huge maps (scenario 1000AD), CTD and 800x x600x4 display switches.

I'm not really a friend of "Never touch a running system". Too curious ;)
Does anybody know what these ini values actually do?
With 1.09 even more were added...

Cheers
capman
 
drachasor said:
You unpack the asset files in "c:\program files\firaxis\civilization iv\assets" in the standard install.

Unpack to "C:\Documents and Settings\Moose\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets.

<snip>...

-Drachasor

Excellent, thanks Drachasor. That clarified things nicely.

As an aside for any ATI 9700/9800 users who are still experiencing game slowdown on huge maps, you should try rolling back to the Catalyst 4.12 drivers. See this thread for more info...

Cat 4.12 thread

Its important to note that you should uninstall the existing drivers before installing the 4.12 set. You can find a Catalyst Uninstaller program on ATI's site (just search for "catalyst uninstaller"). These drivers are the last stable drivers that ATI released for the 9700/9800 series of cards and they did completely fix my game slowdown problem on huge maps.

Sophist
 
Dynamic Animation Paging and Caching the PAK files both deal with memory usage. I am not sure of the exact mechanics with the Animation part, but the basic idea is the program seems to be dealing in a fairly direct way with managing memory. Since the program seems to be horrible at this, I suspect that's why getting rid of such fiddling can help. This might change after the next patch however (I hope it does).

Without unpacking the PAK file, however, the game runs fairly poorly when you disable PAK caching. This is probably because it is unpacking parts of the PAK files whenever it needs them, adding a fair bit of overhead. Unpacking the files means it can access them directly on the hard drive (just as if they were loaded into virtual memory).

As for setting a frame rate, that was inspired by someone on Apolyton mentioning they got errors with Python and how it seemed to be trying to redraw the screen too much. Theoretically, setting a max frame rate should limit how often the game can redraw the screen.

Syncing input, I believe (though I am not sure), makes the game pay closer attention to the commands you enter, and a little less attention to whatever it is doing in the background (perhaps calculating AI moves or something).

That's the thought process that went into this anyhow. Except of Input Syncing I checked each combination of the other items. Doing them all definitely seemed better than doing some. As for why a max frame rate and dynamic animation paging turned off go together so well....I don't have much of an idea. Loosely speaking animation rendering is related to the frame rate, but that's about as far as I am willing to speculate.

I have no idea of "Tree Region Cutting" is.

Trilinear Filtering is basically an advanced way for the program to take the textures and such from the main map and put it into the minimap. I would imagine this is only used when using some of the minimap options (I can't think of a reason why it would be used otherwise). Perhaps also to make the minimap appear better if there are not enough, or are too many pixels compared to squares.

-Drachasor
 
lukasbradley said:
Yes. But I still appreciate your post. I'll continue to try anything. :D

Have you tried using an older driver per the normal ATI fix-it paradigm?

Hmm, I can't seem to find much help for your problem via google.

Are you using the lowest resolution? Hmm, you can set custom resolutions in the ini (near the bottom). I'm going to try 800x600 later. Perhaps that will help me run Huge maps.

-Drachasor
 
drachasor said:
Have you tried using an older driver per the normal ATI fix-it paradigm?

Yes. Unfortunately, the Mobility 9000s don't support the older drivers. In this era of on-board video, it was up to the distributor to release the drivers, and they are not compatable.

Hmm, I can't seem to find much help for your problem via google.

Neither have I, but that is kind of you to look.

Are you using the lowest resolution? Hmm, you can set custom resolutions in the ini (near the bottom). I'm going to try 800x600 later. Perhaps that will help me run Huge maps.

I have used all manner of resolutions, rendering and graphics settings. Strangely, (or not) it runs best at the native 1440x900 of my laptop LCD.

New games work fine, until I hit a certain sweet spot of growth. Usually this is when I am starting to spread religion like mad around 500-1000AD. Yesterday's game (Civ 4 GOTM 1) lasted 8 hours, and it didn't crash until I tried CTRL + T to show the gridlines. Next turn, it was gone, and every previous save I attempt to load from that game also crashes. That's what I find to be most strange.

Lastly, the log dump exe also crashes, which I find fantastically amusing.
 
4. I unpacked all of the art files into the custom directory. Then I deleted the Interface folder (keeping it inexplicably made the game crash on any load or new game--I also deleted the camera folder, though I am not sure if it was causing a problem).

How do u unpack the art files?
 
Back
Top Bottom