gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] gnugo 3.1.30 bug


From: Gunnar Farneback
Subject: Re: [gnugo-devel] gnugo 3.1.30 bug
Date: Tue, 09 Apr 2002 17:53:07 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Przemo wrote:
> gnugo 3.1.30 playing at the PlGS (aurora.go.art.pl 9696) crashed. I send you
> the fragment of the log of gnugoclient and the game in sgf. The game was
> previously adjourned and the sgf looks strange to me... however, it
> shouldn't crash...

This is indeed not a typical game. :-) The cause for the crash is an
incorrect assertion, fixed by the patch below. Thanks for the report.

/Gunnar

Index: engine/worm.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/worm.c,v
retrieving revision 1.35
diff -u -r1.35 worm.c
--- engine/worm.c       4 Mar 2002 06:49:08 -0000       1.35
+++ engine/worm.c       9 Apr 2002 15:49:51 -0000
@@ -1561,8 +1561,15 @@
 
   /* We should have returned now, unless the board is completely empty.
    * Verify that this is the case and then return GRAY_BORDER.
+   *
+   * Notice that the board appears completely empty if there's only a
+   * single string and pos points to it.
    */
-  gg_assert(border_color == EMPTY && stones_on_board(BLACK | WHITE) == 0);
+  gg_assert(border_color == EMPTY
+           && ((pos == NO_MOVE
+                && stones_on_board(BLACK | WHITE) == 0)
+               || (pos != NO_MOVE
+                   && stones_on_board(BLACK | WHITE) == countstones(pos))));
   
   return GRAY_BORDER;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]