How to tell why a game is crashing.

kumquatelvis

Prince
Joined
Feb 27, 2007
Messages
310
Several time in the bug thread I've seen someone post a save with the message "my game keeps crashing, can someone help?" Then, a few posts later someone else will say "unit x had the wrong <something>; I've deleted it, and now you should be fine." I can't image that the helper is opening the world building and checking each and every unit; that could take hours and hours. As such, I assume that there must be a faster way to determine the exact cause the of the problem. So my question is this: what is the faster way to track down crash causes? Thank you for your help.
 
I agree with you, for example in the strange CTD I'm having, the problem seems to be random and everybody who tries the savegame does not have the crash. So, honestly, are there any tools out there which could determine what is going on?
 
My method is simple but requires a little programming and CIV knowledge . But this method is valid only if the bug comes from a language bug ( and not a problem with system compatibility , memory allocation , ....)
The first thing to do is trying to locate when the bug occur . Putting some log at the key points of the process . Every log in the event manager ON , some log between each process in CvGame.doTurn . At this point if you can tell when the bug occur , the rest is a problem of dichotomy . Trying to understand what can cause the bug at this state , check which functions are called , add logs and so on . This can looks like a huge work but in fact this go very fast .

Tcho !
 
Kael has some sort of method, but I don't remember exactly how, and I dunno where he posted it now.
 
Ah yeah. Thanks for that, I needed a refresher. I got my own methods but I really need to be better at debugging, I once spent two whole days on a problem in my AdvWars mod, I ended up rewriting the whole thing with a fresh SDK, part for part. It worked but could have been easier. :p
 
Back
Top Bottom