Debugging crashes in the wild

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Debugging crashes in the wild

Post by Evert »

ZirconiumX wrote: The Dutch G makes an English H sound. So it's pronounced Dorps-heck. It's hard to wrap the tongue around though.

As for the origin, I have friends in Flanders, which is Dutch speaking.
I wouldn't say it's similar to an H-sound in English; it's a much harder sound that doesn't actually exist in English - and you actually have to pronounce the r to get it right too :P.
On the other hand, the g is much softer in Flemish than it is in Dutch Dutch*, so perhaps that is closer.

*It seems a bit odd to render the distinction as "Flemish" and "Dutch", seeing as both are Dutch (neither is more correct than the other, although of course I would never admit that to my Flemish friends and relatives), but with a slightly different pronunciation and idiom.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Debugging crashes in the wild

Post by Henk »

[Giechelend] Van Gog en Scheveningen graag.

Pronouncing Spanish R needs an extra course too.
BeyondCritics
Posts: 396
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: Debugging crashes in the wild

Post by BeyondCritics »

ZirconiumX wrote:
Dann Corbit wrote:Load the core dump. If you have compiled with symbols, it will take you right to the offending line.
Haven't figured out how to do that with MinGW yet. Though I do have an Ubuntu VM that may get put to use.
Use gdb -c <progname>
For more options type "man gdb".
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: Debugging crashes in the wild

Post by ZirconiumX »

BeyondCritics wrote:
ZirconiumX wrote:
Dann Corbit wrote:Load the core dump. If you have compiled with symbols, it will take you right to the offending line.
Haven't figured out how to do that with MinGW yet. Though I do have an Ubuntu VM that may get put to use.
Use gdb -c <progname>
For more options type "man gdb".
Windows doesn't create core files. So that's not an option unless I fire up Ubuntu.
Some believe in the almighty dollar.

I believe in the almighty printf statement.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Debugging crashes in the wild

Post by Dann Corbit »

I think you can make them from the CODE::Blocks GUI, (IIRC) in order to get gcc to create them on windows.

Or you can get the free MS compiler and it will make them because I do it all the time.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Debugging crashes in the wild

Post by Dann Corbit »

I think maybe it comes with this thing:
https://github.com/jrfonseca/drmingw
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Debugging crashes in the wild

Post by syzygy »

ZirconiumX wrote:The problem is, despite my best efforts, I can't reproduce any of the crashes. They're all heisenbugs that disappear under GDB.
That seems pretty unlikely. It seems more likely that you're just having difficulty at reproducing the conditions that trigger the crashes.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Debugging crashes in the wild

Post by syzygy »

ZirconiumX wrote:
Evert wrote:
Dann Corbit wrote:I love it. I believe it's "Village Idiot" in English.
That I would find rather surprising.
In fact I'd be surprised if an English speaker can pronounce the word... maybe if they're Scottish.
The Dutch G makes an English H sound. So it's pronounced Dorps-heck. It's hard to wrap the tongue around though.

As for the origin, I have friends in Flanders, which is Dutch speaking.
Funny, I read the name in the opening post but did not register it was a common Dutch word.

Nice name. Indeed it means village idiot.

Flemish and Dutch differ in how the "g" is pronounced though!
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Debugging crashes in the wild

Post by bob »

ZirconiumX wrote:So my chess program Dorpsgek crashes fairly often in games. To be expected, really - it's pretty new.

The problem is, despite my best efforts, I can't reproduce any of the crashes. They're all heisenbugs that disappear under GDB.

So what do people normally use as a method to debug problems that occur in games, but cannot be reproduced?
If you are running under Linux, enable core dumps, and when you get a crash, type "gdb progname corename" and you will magically be in the middle of the program at the instant it crashed...
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Debugging crashes in the wild

Post by cdani »

ZirconiumX wrote: Windows doesn't create core files.
Andscacs has built in mindump generation on crash. I took from here:

http://stackoverflow.com/questions/5028 ... -dump-file