PDA

View Full Version : Let's do some debugging



Saffith
08-21-2010, 04:06 PM
Since the builds have so many crashes we can't reproduce, we're going to try another approach to finding them. If you're encountering crashes in ZC or ZQuest, any help here would be appreciated.

This is for Windows only, at the moment.

Download this: http://www.mediafire.com/?7dcb1c8so5q67hn
It's a slightly modified build of 1340, plus some other stuff. It's probably better to unzip it to a new directory rather than overwrite the regular build.

Just run zlaunch-w.exe, like normal. Don't run ZC or ZQuest directly, always go through the launcher.
Whenever it crashes, just post the contents of gdb.log and let us know what you were doing at the time.

It should be safe to work on quests in this build. It may not be possible to use the same zc.sav, but you can certainly try. Just be sure to back stuff up first, as always.

This will only work if cmd.exe is in C:\Windows\System32. If you're not sure, it almost certainly is. (I did try using %WINDIR%, but that didn't seem to work.)
If it doesn't run at all, let me know and we'll try and work something out.

Anthus
08-23-2010, 08:08 AM
someone such as myself, who has no experience in debugging, I ask, what exactly are we looking for? Are we just trying to see what causes it to crash, and have it dump the errors to a log?

... that sentence structure went to hell and back... sorry, very tired >.>

Joe123
08-23-2010, 09:09 AM
You can now get hold of a file containing what was happening inside ZC when it crashes that you can send to a developer to look at.

pkmnfrk
08-23-2010, 11:44 AM
someone such as myself, who has no experience in debugging, I ask, what exactly are we looking for? Are we just trying to see what causes it to crash, and have it dump the errors to a log?

... that sentence structure went to hell and back... sorry, very tired >.>

The "bt" command asks the debugger for a "backtrace", which shows where specifically the program crashes.

Nicholas Steel
08-24-2010, 05:01 AM
someone such as myself, who has no experience in debugging, I ask, what exactly are we looking for? Are we just trying to see what causes it to crash, and have it dump the errors to a log?

... that sentence structure went to hell and back... sorry, very tired >.>

They are looking for people to use it on a regular basis to help eliminate the "random" crash problems.

MagiMaster
08-25-2010, 01:02 AM
ZQ crashed. Here's the trace. (Segmentation fault, Ugh.) I had just finished compiling and recompiling the scripts, but it might be more related to the fact that it's been running for a while now. Edit: It could be a memory leak. The task manager showed the memory usage at about 100M before restarting and 70M afterwards.

Program received signal SIGSEGV, Segmentation fault.
0x0071ed6a in ?? ()
(gdb) bt
#0 0x0071ed6a in ?? ()
#1 0x006f102c in ?? ()
#2 0x006da2ab in ?? ()
#3 0x006da1dc in ?? ()
#4 0x0040b9a5 in ?? ()
#5 0x0040fd5e in ?? ()
#6 0x00449654 in ?? ()
#7 0x006af627 in ?? ()
#8 0x006af77d in ?? ()
#9 0x006b0f5e in ?? ()
#10 0x00448528 in ?? ()
#11 0x006c70b6 in ?? ()
#12 0x004485e0 in ?? ()
#13 0x007557f6 in ?? ()
#14 0x004010b6 in ?? ()
#15 0x00401128 in ?? ()
#16 0x75e23677 in KERNEL32!BasepMapModuleHandle ()
from C:\Windows\syswow64\kernel32.dll
#17 0x7efde000 in ?? ()
#18 0x777d9d42 in ntdll!RtlpNtQueryValueKey ()
from C:\Windows\system32\ntdll.dll
#19 0x777d9d15 in ntdll!RtlpNtQueryValueKey ()
from C:\Windows\system32\ntdll.dll
#20 0x00000000 in ?? ()
(gdb)

Saffith
08-25-2010, 01:41 AM
Looks like it crashed trying to draw a rectangle in refresh(). That's the second crash in a row like that... Maybe it'd be worth it to go through the whole function and make it check every single rectangle coordinate.

MagiMaster
08-25-2010, 02:11 AM
Got another one, although the trace looks exactly the same. This time the memory usage only got to 88M, and I wasn't doing anything with scripts. I had just right-clicked to bring up the select combo option (I think).

Edit: Again, on a different computer. This time I was just clicking on the page up button on one of the combo-selector, so my idea that it had something to do with dialog boxes is shot (unless it was about to make a timed save). Anyway, the trace is the same except for the kernel stuff, so it's just a single problem at least.

Imzogelmo
08-30-2010, 07:54 PM
Could this topic be stickied?

Saffith
10-06-2010, 11:38 AM
Updated to build 1316.
MagiMaster, the crashes you saw are hopefully fixed now, so be sure to let us know if it happens again.

Saffith
10-11-2010, 02:39 PM
Updated to build 1317, and modified to work through the launcher. This shouldn't require any additional effort anymore.

Saffith
11-21-2010, 04:52 PM
Updated to 1329.

Saffith
12-04-2010, 03:27 PM
And again. 1340 now.

XMuppetSB
12-05-2010, 02:31 PM
Okay, I found a fatal bug that sometimes causes ZC to instantly crash every time you continue on the last DMap you saved your game on.
PS: I have never done any debugging before. Furthermore, I think that the way ZC is as of late, it really is becoming increasingly unstable because of random crashes, including fatal crashes that happen every time you start a quest. Besides, allegro is just about the most unstable thing you could possibly use when making EXE programs!
EDIT: I think the fatal quest start-up crash may have to do with the fact that the DMap I saved my game on has a title that is displayed when the player first enters the DMap. However, it only occurs sometimes. Note that the DMap I last saved my game on had a a save point combo and a save and quit combo, and was set to 'Continue Here', with the Save-Continue Screen Flag checked on the screen where Link would start/continue on that DMap.

Saffith
12-05-2010, 02:43 PM
PS: I have never done any debugging before.
All you have to do is run the game normally and post gdb.log whenever it crashes. That tells us where in the code it happened, which is what we need to know to fix it.

Imzogelmo
11-09-2011, 07:41 PM
OK, I've been using RC2 for a while but I just had 2 crashes in ZQuest this afternoon-- any chance of a new debug build so I can help track this down?

Saffith
11-09-2011, 07:54 PM
It would take a It would take some time to get them set up again. It could be something easy, though; what were you doing when it crashed?

Imzogelmo
11-09-2011, 08:39 PM
It was different in each of the (now 3) times, but the similarity was that I was drawing a screen (relative mode if it matters) and then exited (once just by exiting, another time by opening another quest, the third time I'm not sure).

EDIT: Now the 4th crash today, and this on different quests. I'm pretty sure I can re-create this if needed. I'm getting an access violation at 0x7C910A19.