Help needed: Game freezes

Commander Bello

Say No 2 Net Validations
Joined
Sep 3, 2003
Messages
3,858
Location
near Koblenz, Germany
I have to ask you guys for help.

Since today, I cannot play Col anymore.
The game which I played without errors yesterday I could continue today for only some turns, until it got frozen (turn 95 - my turn). I tried several restarts, yet to no avail.
Then I started a new game, which froze after ~20 turns during my turn.

This made me curious, and I rebooted my system to start another new game, which then froze after ~15 turns in the interturn.

I now have completely switched off my computer and restarted, and the new (! - not continued) game now freezes at turn 5 (interturn again).
All I can do then is to manually kill the task in the task-manager.

I have created a debug DLL and put breakpoints to all my recent changes (although they have been made three days ago and up to now playing was no problem). None of the breakpoints has been reached, although, just for checking, I've put one at CvPlayer::doTurn().

These are the three last lines from the debugger:
Code:
Warning: DirectSound playback reset due to non-moving playback cursor (buggy sound driver) time: 32904 play: 134112 write: 142044. <<< last message when attaching to colonization.exe
Der Thread 'Win32-Thread' (0x910) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32-Thread' (0x13e8) hat mit Code 0 (0x0) geendet.
Der Thread 'Win32-Thread' (0xdf4) hat mit Code 0 (0x0) geendet.

Additional info: none of the log files indicates any error, either.
As said above, my last changes have been made three days before since when up to now I could play without any problem.

All other applications so far seem to run without any hassle. I don't have any unnormal high temperatures in my rig and there aren't any indications that something wouldn't work as it should from the hardware side.
Whatever has changed seems to have changed between yesterday evening (no problems at all) and today (no play possible, and from attempt to attempt the freezing starts even earlier)
Any ideas how to locate the error? :sad:
 
When RaR had random freezes and nobody had any idea of the cause, I did the following to locate the cause:
  1. Downloaded the savegame from the forum, which caused it every time you hit end turn (savegames like that are good, make one)
  2. I compiled a profile DLL
  3. Loaded the savegame
  4. Started profiling
  5. End turn
  6. Stopped profiling after 5 minutes or something (way more than the normally expected wait)
The profiling result will then reveal where the CPU time is spend while profiling. Since you are stuck inside a loop somewhere, that loop will use 100% of the time after you are stuck in it, which if you waited long enough is 80-90% of total.

So far that's the only method that I'm aware of, which can locate infinite loop bugs. In fact the only alternative that I'm aware of is looking at the changes and take a guess, possibly just using break in a debug build to see where it is. I would dare to say that the non-profiling method quickly turns into a game of luck, yet Kailric has managed to do so once. It was a case of: it worked this morning, what was committed today? and I read it like you already tried doing that and failed.

EDIT:
Write after posting this, I realized the easiest solution is likely to abandon this thread and use this one instead: http://forums.civfanatics.com/showthread.php?t=531189
It is precisely the same problem and the same solution.
 
Updated your thread with the latest information from profile dll and Sleepy.
 
Top Bottom