Airports making game crash - why?

X the Magnifice

Chieftain
Joined
Jan 12, 2012
Messages
15
Location
Denmark
Has anyone else experienced this – and found out why it happens? (I’ve tried to make a forum search, but can’t think up a word combination that doesn’t bring up far too many results).

What happened is, that in my last game the game started crashing, every time I wanted to airlift a unit. After it had happened a few times, I tried selling one of my airports, and then I could airlift again. Then I built an airport in an island city, which needed it – and the game started crashing again, until I sold off another airport. It just would not accept me having more than 242 airports.

This is the first time this has happened to me, but it is also the first time I’ve built that many airports. My thought when it first crashed, was that the .SAV-file had been corrupted – but I don’t see why selling an airport would solve that (and adding other city improvements caused no problems).
So is this one of those limits built into the game? But in all other connections the limit is at 255/6 – why is it 242 for airports? Is it the extra functions included with airports (airlifting, keeping track of which airports have been used this turn, etc.) that takes op the room of the last 13/14 airports?

It may not be awfully important to get an answer – even on the most extreme archipelago-map you won’t need 254 airports for transport purposes. They are supposed to add to the trade bonuses, but by the time you are building the last of them, you should be past needing giant bonuses. Still, I’m curious to know, what is going on.:confused:
 
Very odd indeed. It could very well be that no one before you built that many airports. You are right in that 242 makes no sense either. You had more cities that that, you think you should be able to build an airport per city.
 
More than 242 cities? Boy, that's a number. ;) It might be what Ali's saying - memory issues due to the large number of cities.

If I were you I'd try to reinstall the whole game, or obtain pristine-state "rules", "events" etc. files. I remember that sometimes I also had some strange game behavior when I tried to modify the game files, messing them up (for example, I provoked a situation in which the research info window was impossible to close at all). When I used my backup copies of game files, everything was back to normal.

So, try to reinstall with complete installation or copy-paste backed-up files if you have some. Simple solutions might be most successful ones. :)
 
@Ndrju: I had plenty of trouble getting the game into my (Windows7)-machine in the first case – I’d try a reinstall only if the whole game or a key part of it stopped working. And that is hardly the case here – at the most the raised bonuses from the last 12 towns might have gotten me the last Future Tech a turn earlier.
Anyway, I rather doubt the answer lies in that direction. As I said earlier, the game had no problems with me building other city improvements or with giving me credit for their effects and for the poulation growth, that took place – surely, if it was a memory issue, it would have affected more than just airports?
As to modifications, the only ones I’ve made are, what I’d call cosmetic ones: Adding new civs and their cities and renaming one government system, but without changing it’s effects. I don’t see why that would affect airports.
 
I abused cheat mode to make a game with 254 cities, 247 cities, and a bunch of mechanized infantry. Airlifting worked just fine. Windows 7 here but no trouble loading the game, though I do have occasional crashes using arrow keys inside the city screen to move to the next city.
 
Beats me then... :confused: Actually if it is a memory issue it doesn't have to affect all options at once. Sometimes when programs run low on memo they "choose" which options can be sacrificed in order to make the rest work. I guess it might be the same in Civ 2. It also depends on your equipment, but I had three different computers in my life and Civ worked fine on all of 'em.

It's hardly a professional help, but I'm doing my best. :sad:
 
But who actually needs to make 242 airlifts in one turn??? :confused: How could there possibly be that many targets in a single turn? And how long, in real time, does it take to do all that?

Sure, I build airports - sometimes a lot of them. But not where they aren't needed. And all of my cities are connected by railroads*, so it's easy enough to zip a unit over to a city with an airport.

*as long as they're on the same continent, of course
 
@Valka D’Ur: A misunderstanding here, it seems. I didn’t build all those airports in one turn – that took more than a century, but it was only when I had built no. 243 that the game start crashing. And sure, I didn’t need them for transport purposes - the reason for giving every city an airport was that it is supposed to raise trade bonuses, if both cities in a trade relationship have airports. But I am quite able to live with being limited to 242 airports. I just got curious as to why it happened – whether it was one of those built-in limits the game has, or what.

@Ndrju: But if the program was sacrificing an option to free memory, wouldn’t it then have closed down airlifting completely so that it wouldn’t have worked, even after I had sold off an airport? As it was, however, as long as I kept the number of airports at 242, airlifting functioned flawlessly right through till the end of the game, even though I added more population and more city improvements for the memory to keep track of.

I wonder, however, whether you may not be on to something in mentioning the eqipment. Not the hardware (considering the age of the game any modern computer should be able to run it without problems), but the software – the exact variety of Windows7, its configuration, what updates have or have not been installed, the make and configuration of those programs the game draws on (text editor, graphics, etc), maybe even the language – all of those might perhaps influence how the game works. At least I notice that while mackerel can make airlifting work with 247 airports, he has problems using the arrows in the city screen, something that has never caused me problems. And I have noticed other cases in the forum, where some were having problems that I’ve never had, while others could make the game do things that I can’t.
Of course it could also be a question of the version of the game one is using. Mine is MGE, which, to my knowledge, had only one official version – but it did have a number of patches and bugfixes, and it’s not unheard of for a bugfix to cause new bugs.

But I admit I’m groping in the dark – I’m also very far from being a professional. I must ask my brother-in-law who actually is professional (and a Civ-fan, though I think he mostly plays Civ4 now). Anyway, thanks to everyone who has chimed in so far.:thumbsup:
 
@Valka D’Ur: A misunderstanding here, it seems. I didn’t build all those airports in one turn – that took more than a century, but it was only when I had built no. 243 that the game start crashing. And sure, I didn’t need them for transport purposes - the reason for giving every city an airport was that it is supposed to raise trade bonuses, if both cities in a trade relationship have airports. But I am quite able to live with being limited to 242 airports. I just got curious as to why it happened – whether it was one of those built-in limits the game has, or what.
I know you didn't build them all in one turn. I asked why anybody would need to USE that many airports in the same turn.

It just seems it would take a long time to accomplish, micromanaging 242 airlifts in one turn.
 
I know you didn't build them all in one turn. I asked why anybody would need to USE that many airports in the same turn.

It just seems it would take a long time to accomplish, micromanaging 242 airlifts in one turn.

Oh, but I weren't using them all. I only had two or three freights I wanted to airlift, but the game crashed the moment I tried doing it.
 
It has to do with the city names and a maximum amount of characters being reaching when all of the city names are counted.

There can only be 2550 characters (including spaces) used for all city names or the game will crash.

The archived thread for this is here:
http://forums.civfanatics.com/archive/index.php/t-192237.html
 
@the Duke: Ah, so that's it! And, yes, I had quite a number of towns with long names in that game. But if I read the old thread right, shortening the names will make it work again, even if the airport was built while the city had a longer name, right?
 
It has to do with the city names and a maximum amount of characters being reaching when all of the city names are counted.

There can only be 2550 characters (including spaces) used for all city names or the game will crash.
Duke is exactly right. There are 255 cities which can be indexed ('limit') due to using a single byte integer (2^8=256, but in integer math, 11111111bin=255, and 00000000bin=0). Each is allocated a 10 byte chunk of memory, for 255x10=2550 bytes. The moment a pointer accesses memory outside this range, its a crash. Its not supposed to happen, and what Duke discovered is that Brian Reynolds did not devote a little code to checking for this limit. He probably assumed no one would ever really make that many villages and use long names.

This same error will occur even if the AI villages help break the limit. Its still an out of bounds write, which is not allowed, and so a unhandled crash (exception) will occur. It has nothing to do with Airports, directly. :)
 
Back
Top Bottom