Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: An interesting bug i found tonight in latista.

Author: milix

Date: 04:45:23 01/16/05

Go up one level in this thread


On January 16, 2005 at 02:20:12, Eric Oldre wrote:

>
>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?

It will be very interesting to have some kind of a sticky thread where we can
post our solved bugs. It will be funny and productive for other programmers at
the same time!



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.