Super-late-game lockup/freeze

Lochlann

Warlord
Joined
Mar 29, 2002
Messages
273
Location
Andúnië
I've encountered a very very late-game situation where my game freezes, entirely. It happens right at the beginning of my turn, while the game is processing my cities' growth and production from the previous turn, before any units are activated. I've reloaded the game numerous times, changing up various factors to see if I can isolate the cause, but to no avail. The freeze occurs at the same precise point each time. Waiting for a fair amount of time produces no change, and I'm forced to shut the program down via the task manager. (I'm on a Windows 7 laptop.) I thought I'd toss the situation to the good & wise folks here. :)

The game I'm running is one of those "I've already totally dominated the game, I could win on any turn, but I'm just playing through to see how magnificent and lavish I can make my empire" situations. :D (We've all indulged in such things, amiright?) As such, there are a number of "extreme" things going on, in terms of base count and unit count and Transcend Thought advances and things like that...but I'm pretty sure I've eliminated (most of) those as causes.

I have tried the following:
  • disbanding hundreds of units just before the turn change, in case unit count is an issue. No effect.
  • razing a few bases just before the turn change, in case base count is an issue. No effect.
  • switching all production in my bases to Stockpile Energy, in case some glitch is occurring with unit or facility production, or in case there is some sort of "total facilities built" cap. No effect.
  • razing a bunch of high-pop (127) bases just before the turn change, in case total population is an issue. No effect. (Is there even a cap on total pop?) The pop I eliminated in this razing was greater than the per-turn pop growth of my total empire, so that rules out any exceeding of a (potential) pop cap.
Total energy credits accumulated can't be the cause; due to a recent energy market crash, my current reserves (1.22 million) are well below the reserves I've had at other times.

So, yeah, I dunno. The game just...freezes, independent of these controllable factors. Obviously something happens at one of my bases to cause the freeze, but I can't figure out what. It has nothing to do with production (unit or facility), pop growth, or energy generation, and it has nothing to do with unit actions or terraforming or anything like that (since the freeze occurs before units are processed).

A few ideas occur to me, but I'm not sure how to test them:
  • one thing I can't control is accrual of research points, or of Transcend Thought advances. Is there a cap to either of these? The last TT I reach before the freeze is 1190, which (along with 1189) comes along just before the freeze. (But not IMMEDIATELY before the freeze. It isn't the last thing processed, in other words; at least one city is processed between TT 1190 and the freeze.) I can't control this factor because even with Labs set to 0% and Lab-producing facilities all scrapped, I'm still having multiple breakthroughs per turn, due to the zillions of specialists. (And even if I went through all my bases and switched all specialists from Transcends to Engineers, each Engineer still generates +2 Labs.) I suppose I could go through and raze nearly all of my bases, until my breakthrough rate falls below 1/turn...but I doubt this is the issue in the first place. "1191" seems an odd number at which to halt Transcend Thought accumulation. (Although, strangely, 1191 was the number of my college mailbox from way back when...hmm...)
  • another thought is that perhaps there is an issue with the rate of generation of something, rather than the accumulation of something. Like, perhaps the rate at which I'm accruing _____ grows beyond a certain point, and a glitch occurs, even if the total amount of _____ that I possess at the time is not an issue. Any thoughts on this?
I'd appreciate any advice or ideas. Obviously this is a "luxury" problem, as I could easily rewind and beat the game on any of the last 500 turns or so, but it's frustrating to me. My particular enjoyment of games like these lies not so much in the winning as in the creation of as utopian a map as possible; it's more like an art project than a competition for me. And obviously I've already sunk quite a bit of time into the game.

(By the way, I altered the .ini file to effectively eliminate the mandatory retirement year, setting it to 9999 or something like that. The freeze occurs just as year 2841 begins, and as with the TT number, I can see no reason why this particular year would cause an issue. Besides, the freeze occurs during the base handling process anyway, after the year count increment has been processed.)

EDIT -- one thing I forgot to note: the only unusual occurrence to happen on this turn is Miriam's calling of a Planetary Council, for election of Planetary Governor. My ~44,000 votes blow away the remaining two factions (Mirian and Deirdre), of course, so I'm retained as Governor. I don't see how this could be the issue, since it--like the TT accumulation--is not the very last thing to occur before the freeze, but I include it here for the sake of completion.
 
Do you have a save file from right before the crash? If so, please post it we'll be glad to take a look. You've certainly considered many possible causes, but there are other reasons the game might crash.
 
Do you have a save file from right before the crash? If so, please post it we'll be glad to take a look. You've certainly considered many possible causes, but there are other reasons the game might crash.

Thank you! Here is a save from the very end of the previous turn, just before the freeze occurs. The following is the exact sequence of events (as experienced on my machine) that transpires once you end the turn, just in case there's any variance:
1. Miriam convenes the Council
2. Miriam moves her units
3. Kelp/forest/etc.
4. Crop failures at a city
5. Deirdre moves her units
6. My turn -- TT 1189 and 1190
7. Citizens starving at a base (intentionally; I'm starving it out)
8. ....freeze.
 

Attachments

  • Jedi 3.SAV
    651.5 KB · Views: 76
I took a look at your save file. Very impressive! I don't think I've ever seen a game advance this far without crashing. I haven't pinned down the cause of the freeze/crash, but it seems to be related to the Gaians. For example, if I ring up Deidre immediately upon opening the save file and cancel our pact, the game freezes right away. Also, there are several damaged Gaian units near Korriban (the base built in the ruins). Why are they damaged? Did you just pact with Deidre the preceding turn?
 
Weeeee-llll now, isn't this interesting. I just found the cause of the crash, with your assistance, and...it's bizarre! Let me explain...

Also, there are several damaged Gaian units near Korriban (the base built in the ruins). Why are they damaged? Did you just pact with Deidre the preceding turn?
You know, I've wondered about those damaged units myself. No, my pact with the Gaians was from ages ago, when they capitulated. I can only guess that those damaged units are the result of skirmishes with Miriam's troops, out in waters invisible to me. But I don't know for sure.

However, it was your directing my gaze to Korriban that alerted me to something weird: the stack of my units Holding steady in the water to the southeast of Korriban. I did not put those there. The stack composition, one of every unit "type" that I employ, is identical to the garrison stack I station in each of my bases. (Not that I need any such garrisons -- it's that aesthetic pleasure I mentioned before, plus a healthy amount of OCD, that leads me to do that.) When I activate those units, and move them, suddenly the camera is zoomed to another base--Kashyyyk---and the units there are activated/moved instead. So it seems that, somehow, Kashyyyk's garrison stack became "cloned" or something on that spot...but not really cloned, as there actually aren't any units southeast of Korriban; they are just graphics reflections, or something. Very odd.

On a hunch, I loaded a saved game from the beginning of the turn--the one I posted is at the end of the turn--and sure enough, those cloned/reflected units aren't sitting there. After replaying the turn and monitoring my actions, it is clear that the cloned stack is created when I move a Deathsphere (gravship) unit out from Korriban to take out the Fungal Tower sitting in the landmass to the southwest. As soon as that Deathsphere enters combat with the Tower, boom, that cloned stack becomes created. I have no idea why: why it happens at all, and why it is Kashyyyk's garrison stack that is chosen for the "cloning." (Alphabetically speaking, there are several bases "between" Kashyyyk and Korriban--Kessel, Kiffex, Kintan, and Klatooine--so it isn't the game simply jumping down the alphabetical list to the next base for the "cloning." (Which still wouldn't explain the cloning itself.))

When I end the turn without that cloned stack in existence, by not engaging the Tower in combat...there is no freeze crash, and everything works normally. :goodjob: Furthermore, engaging that Tower in combat on the following turn results in no cloned stack--at least not in that same spot--and ending that turn produces no freeze. So...? Chalk it up to a bit of random bytes being duplicated for no good reason, and then screwing up between-turn calculations, producing the crash?

Thanks for your help! I never would have noticed that "floating garrison stack" if you hadn't directed my gaze to Korriban.

For example, if I ring up Deidre immediately upon opening the save file and cancel our pact, the game freezes right away.
Hmm! You're right, it does for me too. Not sure why. But since that cloned stack is "built in" to that saved game file, it may be playing havoc across the board. Dunno.

Very impressive! I don't think I've ever seen a game advance this far without crashing.
Thanks! But, I must say that that's a pretty ominous comment...is it typical for games to just crash, randomly, upon advancing far enough? Maybe I can expect more of these random things, huh. Hmm. Well, thankfully this one seems to have been averted. I've gone ahead and attached a "clean" saved game here--it's the same turn as the corrupted file, only at the very beginning of the turn, before that cloned stack is created--in case anyone wants to look further (or just mess around with an OCD-inspired empire. :D )

Back to building utopia...
 

Attachments

  • Jedi.SAV
    651.4 KB · Views: 81
Glad you figured it out. That "linked units bug" comes up once in a while. My comment about never having seen a game go so far without crashing wasn't worded quite right. I meant to say that I never saw a game go that far at all. It's possible that the game will have other problems, simply because you're pushing the limits. Good luck on achieving utopia!
 
:) Thanks! When it's completed, I'll post the final product here. I plan to keep going until I've covered/terraformed the entire map, maxed out pop, etc., with only the Gaian capital left. Then I'll win by Transcendence and call it a game. :cool:
 
Howdy, I've experienced another weird problem with this super-late-game experiment of mine. It's similar to the first bug described in this thread, only instead of a freeze/lockup, the game crashes entirely, with a standard Windows "Terran.exe has stopped working" message. It happens just as my turn is beginning, after all the base production has been processed but before any of my units are activated for commands.

There are a few bizarre things going on that may be responsible for this, but I don't know how to isolate them or fix them.
--Petek, you'll recall that it was the "linked units bug" that seemed to be responsible for the first crash. I've noticed a few other bases' units becoming linked in this way as well, except that unlike with the previous crash, the linked stack did not appear anywhere unusual; it just stayed in the base(s), without producing a crash. Disbanding the units and building new ones properly doesn't seem to do much, as the new units usually wind up becoming linked as well. So I've just kind of ignored the issue. Perhaps it is responsible for this crash as well?
--One new thing: one of my bases, Bpfassh, has dipped into a negative population count, with all sorts of negative resource tallies. On the turn in question, just before the crash occurs, it has a -103 population, with a nutrient production of "-46 - 00206." I am only able to assign 8 citizens as workers, and assigning them by clicking on the various tiles on the base display behaves erratically, with citizens being assigned to tiles other than the ones clicked. After 8 tiles, I am unable to assign additional citizens. Also, the graphic display of citizens at the center/bottom of the base screen is empty, as though there were 0 citizens in the base; this appears to be a graphics glitch only, as when I click in the area as if to assign a specialist, the game reacts normally. I assume that the negative pop issue occurred as a result of some sort of population or nutrients rollover, although I don't know why this would have happened with a single base, as I have many bases with surplus nutrients well over the amount needed for the max 127 pop.

So, yeah. :) If anyone can isolate the crash bug, whether or not it is related to either of the two above issues, I'd be grateful. I'd love to bring this behemoth to completion. I've posted a save from the end of the turn immediately preceding the crash. Thanks!

--EDIT--
Whoops, forgot to add: the base with the negative pop has been in that state for several turns now, with no crash previous to this one. Each turn, the population increments by one, going from -105 to -104 for example, exactly as a normal base does (since I have the Cloning Vats). Not sure what would happen if it were to roll around from -1 to 0, but the point is, I doubt that this issue is by itself causing the crash, as several "negative pop" turns have elapsed with no problems.
 

Attachments

  • Glitch 2.SAV
    667.3 KB · Views: 63
I think you're just running into hard-coded limits in the game. You already seem to know about the population rollover when a base reaches size 127. There's also a limit (2048) on the total number of units in a game. The F7 screen in your save file shows fewer than that, but the F7 screen is known to be unreliable. If you want to try to continue playing, you might try deleting some of your units (beginning with any "linked" ones) and see if that prevents the crash. However, you might be running into limits on other items as total number of facilities built, total ECs amassed, etc. I don't know all that much about programming, but I think that any quantity that appears in the game has to be capped, or else risk crashing.
 
Yep, based only on your description, Lochlann, it sounds like your game is starting to have trouble keeping track of all of its stored array data. It can't remember where some of your newest units are supposed to be located and/or can't "find" them so recreates them; it can't remember some of the basic characteristics of some of your cities; etc. This type of problem is common in applications that have hard-coded limits and also have error routines that "try to keep things going" even when those limits are exceeded.

A telltale sign is the fact that, as far as you have reported at least, none of these oddities are affecting the other two factions - that is, neither one of them have run into such limits yet. But if Deidre or Miriam build a new base, new units, etc., I'd be willing to bet some of the same things will start happening to them.
 
Top Bottom