The Game Hangs

T C

Prince
Joined
Dec 3, 2011
Messages
332
I'm having a problem in my latest game. I get to a certain turn and when I press enter the game just hangs, processing the end of turn but it never completes, no actions are taken during the end turn period (such as animal movement) as far as I can see.

My usual end turn time is around 20-30 seconds, yet I can leave this for 10 minutes or more without result. I can reproduce it and it seems to happen no matter what I do. I've tried changing the build queues, the research, unit movements etc. in the turns leading up to the hang but always with the same result.

I attach the save game (from the turn where the hang occurs), any help to diagnose the problem (or advice on how I might self-diagnose) would be greatly appreciated.

I am using the latest SVN.
 

Attachments

  • Biz Two.CivBeyondSwordSave
    2 MB · Views: 50
I'm having a problem in my latest game. I get to a certain turn and when I press enter the game just hangs, processing the end of turn but it never completes, no actions are taken during the end turn period (such as animal movement) as far as I can see.

My usual end turn time is around 20-30 seconds, yet I can leave this for 10 minutes or more without result. I can reproduce it and it seems to happen no matter what I do. I've tried changing the build queues, the research, unit movements etc. in the turns leading up to the hang but always with the same result.

I attach the save game (from the turn where the hang occurs), any help to diagnose the problem (or advice on how I might self-diagnose) would be greatly appreciated.

I am using the latest SVN.

Obvious first question - do you have a stack limit set?
 
Just a thought (I haven't checked out you save yet), but the loop in the tch tree that was in the SVN for about a day (think it was fixed sotime yesterday) might cause this I suspect. Can you confirm you are still hanging on the very latest SVN (as of today)?
 
No stack limit and this is the first time something like this has happened with C2C.

As I recall the loop was with mining and pottery? I'm a long way from those two techs, I think I'm 3 turns from bead making when the hang occurs.

I can confirm that it's still happening with the latest SVN. It happened yesterday evening and I updated SVN this morning but that didn't solve the problem.
 
Update: I updated to the SVN that was just posted (2342) and reloaded the game. I changed the tech I was researching and the lumber camp that was due to be finished the next turn. This (I don't know what exactly did it) seems to have worked, the game waits for a while and then does the enemy turns.

However the turn time has gone up enormously. As I said it generally takes 20-30 seconds at this stage of the game but now it's around 5 minutes. The delay seems to occur between me pressing enter to end the turn and the animal's turn. Everything else is at normal speed. Very strange.
 
I think its stack-looping. If you have units per tile rule this behaviour is sometimes shown. Turn off UPT and see what happens. Turn UPT on again after a few turns, the problem should be gone (for some time at least). Repeat this if it comes back.
 
Ok, I have found the explanation for this (and most likely DH's slow down issue).

There are two bugs:

1) The player reserach queue is not being tarnslated to new tech ids on load, so if the tech tree has been changed since the save the current research may be changed to some other tech.

2) Multiple research is not being processed correctly by the AI, which means if it has enough research overflow to complete its current tech TWICE OVER it essentially hangs

I'll fix both of these, but because my codebase is mid-change in other regards the DLL I push to SVN will be potentially a bit buggy - I'll disable to work-in-progress so it SHOULDN'T have any effect, but there is lots of scope for error in that regard (you have been warned!).

Anyone having these problems (hangs, dramatic slowdowns, maybe even crashes if some player's research queue current tech id happens to fall onto a particularly bad choice in the current tech ids) please confirm by posting here:

i) It is an existing game which you have updated the SVN on in the past couple of days (i.e. - when all the tech tree changes have been happening)

ii) (at least for those of you hanging or slowing down a lot) you have the multiple research option on
 
i) I think it was after the first lot of tech changes, but before the ones from the last two days.

ii) Yes.

I've been playing on, and the speed seems to have picked up somewhat, although it's still rather slow.

Thanks for the quick resposne Koshling. :)
 
i) I think it was after the first lot of tech changes, but before the ones from the last two days.

ii) Yes.

I've been playing on, and the speed seems to have picked up somewhat, although it's still rather slow.

Thanks for the quick resposne Koshling. :)

Your save game is rather odd. Was it saved AFTER the tech tree updates (in which case it's basically saved a broken state, which explains the oddness)?
 
I've been playing it for the last couple of days, so yes.

What is so odd about it? Is it odd enough to mean I have to start again in your opinion?
 
I've been playing it for the last couple of days, so yes.

What is so odd about it? Is it odd enough to mean I have to start again in your opinion?

Odd in that the broken tech id mapping is 'baked in' in the save. This situation would only arise if a game were saved, the underlying tech tree got chnaged, the game was loaded, then saved again in the resulting state. That is to say, given a save from before the tech changes it would still be repairable (which my fix should do, but I don't have a test case), but the save you posted has already lost the necessary information. The fix I have will still let it run ok, but its possible some players are researching something they probably shouldnt be. This is not game-breaking, but I'd like to be able to test the first case as well really is all.
 
Fix available on SVN. See SVN thread for details.

Anyone who was having this issue (hang or very slow turns) please let me know if the fix I posted addressed your issue.
 
Top Bottom