Author: Eric Oldre
Date: 23:20:12 01/15/05
i found a funny bug tonight in latista in implementing the analyze command.
basically when a search starts i set an abort time for the
search, when analyzing I was adding a really
big number to the current time so that it would search forever basically
if(!usetimerules){ //analyzing
searchinfo->abort_at_time = starttime + 100000000;
}
when I first wrote this it seemed to work fine, I didn't think much
of it.
however tonight I wanted to do some analyzing with Latista.
but found that it wasn't responding, the log file showed it was
aborting the search after 0 seconds.
some debugging found that the above code was overflowing my integer
so that "abort_at_time" was negative. I think it's kind of funny that
the current time just became a large enough number tonight to trigger this
bug. it worked fine this afternoon.
It didn't take me long to track down so I'm not too frustrated.
I just thought it was a funny example of how stuff you take for
granded in your code doesn't always hold up. :)
It was simple to fix by just changing 100000000 to a reasonable number.
Anyone else have examples of funny bugs?
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.