[BTS] Game crashes very late in-game on random turns, provides generic error like "has stopped working"...

SuperXANA

Chieftain
Joined
Aug 19, 2009
Messages
30
Hello everyone,

I'm trying to figure out why my game crashes randomly once I get past turn 325 or so. It's quite annoying...
When it crashes, the game freezes and quits itself after making Windows pop up a message like "the game has stopped working, Windows will now close the game". It's pretty generic and the log files don't say there are any errors right before the game crashes.

I usually play on Team Battleground, huge map size, 18 civs, normal BTS dll (only playing with small custom leader mods). I have the settings set on High, an intel i7-4710HQ processor, 16GB of ram, and play on a laptop computer with Windows 7.

The game runs great on my laptop computer even as the civs get larger empires, swallow weaker opponents up, and take up more of the map just as I do. I can generally get to around 12-14 civs remaining before the game starts to get unstable like I mentioned. I haven't tried playing with less civs on the map, but I'm sure that would merely hold off this issue for a longer period of time.

The game plays just fine as my turn ends and the AI makes their moves, which is when it crashes. I think I did enable the game to use more than 2GB of memory, but I'm not sure how to verify that. The crash is pretty random at first, but if I save a couple turns before the crash happens it will always happen and at the same turn number too (when reloading the save).

I have crash dump files from yesterday's game where it crashed to desktop like I mentioned, if anyone on the forum can read them. I also have a save file from two turns before it crashes, if that can help pinpoint the issue - but I'll have to provide a copy of my modified leaders mini-mod in order for the save file to work, I think.

Please help me figure out why the game keeps crashing like this!

The original game never crashed to desktop for me, no matter what I threw at it, but a lot of cool mods (including the one which my modified leaders are part of) require BTS. Honestly, I'm stumped as to what the problem could be.

Thanks for looking at this issue!
 

Attachments

  • Civ4BeyondSword.exe.full-crash-dump-01-15-2018.zip
    2.9 MB · Views: 174
Have you tried restarting from the last savegame before the crash? If that works, then you are encountering the memory leak problem. This is due to poor memory handling in the core of the game program. It becomes more likely to occur as the game gets longer and more items are there to be handled by the program. Huge maps, high settings, etc. also increase the probability of it happening. Fortunately, saving and then quitting the game and restarting from the save gives you a fresh start on the memory usage. Crashing to desktop is a rather irritating way to do the same thing. To minimize replaying turns, either save every turn or set the autosave option to save every turn. Some people have been able to avoid the problem by Alt-Tabbing to a different program and then back to the game. They say this also clears the accumulated memory leakage.
 
Hello s.bernbaum!
Thanks for looking at my issue. I hope we can figure out why this is happening. :)

I did try reloading a save game before the crash happens. Most often, I end up having games saved two or three turns before the problem happens. The game starts to run slower at turn 315+, likely due to the units moving around the map.

If I reload from my save file that I made before the game crash, I can play to only the same number of turns before it happens again. For example, if my save file was made two turns before the game crashes, then I can only play those two turns and then it will crash at the exact same point (turn number) no matter what. I cannot go any further in the game because it will crash two or three turns after reloading the save file.

I hope this makes sense! What I'm trying to say is the crash is repeatable and consistent. By this late point in the game (turn 300+), the game is often running at 1.5GB of ram. If I alt-tab out of the game or reload from a save file, it doesn't seem to bring the memory usage down at all.

While I usually play with a small customized leader mod for BTS nowadays, I've seen normal/no-mod BTS do the same thing and at around the same time.
 
Last edited:
It sounds like you are running into a glitch in an art file. A unit, leader, or building's art is corrupted and Civ bails when that happens, often without a crash dump. Please enable Python logging in the Civilization4.ini file, load the save and play the turn and let it crash, and post the PythonErr.log file and the PythonDbg.log file here for us to look at.
 
Hello Lemon Merchant! Thanks for looking at this issue of mine!

Well, I did get a crash dump that I already uploaded as part of the first post on this topic. If we could find someone to read the crash dump, maybe it'll tell us what's going on and why it's happening.

Also, I tried again with a new game (with exactly the same settings) and I got slightly further along in turn numbers by enabling Single Unit Graphics. I was able to get all the way up to turn 350, but then I ran into the crash again during the AI's turn.

I set up the autosave to work every single turn, so I had created a save from one turn before the crash. When I reloaded the autosave from that time, the game crashed exactly one turn later. The game didn't crash while waiting to end my turn or moving around on the map (which shows the unit graphics/art). At around turn 320-350, many of the AIs and myself are up to Modern Era tech and have filled the entire Huge Team Battleground map up, to give you an idea of where things stand in-game.

I don't think it's an art glitch because the game doesn't crash if I set up a new game with exactly the same settings (Team Battleground, 18 civs, Huge, etc.) and put the staring era at the Modern Era (or any other era). I think it's more likely an issue with the map size and/or the particular map I'm using, and having too much going on at one time (thus the game can't handle it).

What I think I'm going to try next is to see if it crashes around the same turn number, by doing a game with something like 7 AI civs + me on a smaller map. If that works and doesn't crash, then maybe there's a better number of AI civs that would work more efficiently on my computer (perhaps 18 civs is too many at one time).
 
Sorry, but the crash dump tells me the state of your machine at the time of the crash, but not what is going on in game. I can't see the Python or XML exception that is causing your game to crash. That is why I asked for the error logs.
 
Hello once again, Lemon Merchant! I apologize for the length of this reply...

Thanks for your response telling me that the logs would help more than the crash dump, I didn't realize that. I didnt know what the crash dump would show, but I wanted to point it out to you because of what you previously wrote.

I had some time today and played a game until it crashed again. This time, I tried with less leaders than before (about 14) - the game still crashed at around the same turn number and during the AI's turn, even though there were fewer leaders still present in the game (about 10-11, I think).

I've attached the logs in a zip file for today's game, though I didn't see anything recorded in the Python logs. Perhaps it really is a memory or graphical overload issue like s.bernbaum suggests.

If it would help you debug this, I'm using the mod available at the following link. However, I added 45+ leaders to my local copy of that mod, because its author is no longer updating it and I wanted to have more recent leaders to play with.

Spoiler Update on Game Crashing w/Less Leaders in-game :
I tried a game with only 7 leaders in it, Standard-size Pangea, I simply watched the AI play a game for entertainment (they wound up obliterating two of the leaders, leaving only 4 AI and myself).

Surprisingly, the game crashed while the AI moved on turn 337. My save file from before that turn had the crash happen on turn 337 as well. I wonder if there really is a bug with the unit or building graphics in this mod, given that it crashes on turn 320+.

Normal BTS without any mods at all, or not loading this mod in particular, doesn't crash at all. The game continues onwards after turn 320+ like normal with a 7 civ game. I haven't tested an 18 civ game, though.


Thanks for looking at my issue, I really appreciate it!
 

Attachments

  • CTV4 BTS Logs Game 1 01-24-2018.zip
    1.3 MB · Views: 277
  • CIV4 BTS Logs Game 2 01-24-2018.zip
    32 KB · Views: 287
Last edited:
Sorry, this fell off of my radar. Did you ever get this fixed?

If not, I'm suspecting a graphics fault.
 
Hello Lemon Merchant!

Thanks for checking on this topic again, sorry that I haven't updated it in such a long time!

I never really fixed it, but I did take note that if the AI manages to wipe out enough of the starting civilizations (so that it gets down to 12 or less remaining), then the game will continue to run fine past the 320/330+ turn mark on this mod. It won't crash, even if things go past the 450 turn number (another particular time where the game crashed most often for me, when using this mod).

It could have been because my laptop computer wasn't able to handle 14+ AI calculations when at high turn numbers (and therefore lots of units moving around, given that it always happened on the AI's turn).

However, the game seems to have stabilized now and it no longer crashes at high turn numbers (even while playing with this mod), maybe due to all the Windows updates that have been released since then?

I haven't really done anything different with my play-style or game AI modifications, so I can't really tell you what I did to fix it actually (other than update the operating system)... Sorry about that!
 
Top Bottom