gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Crash


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Crash
Date: Thu, 02 May 2002 22:57:53 +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)

Dan wrote:
> Here's the output of the final showboard and the crash
> diagnostics. The black S12 was previously tried and
> undone. It is not on the board but has been tried by
> do_owl_attack. Backtrace at bottom. The crash does
> not occur if the call to top_moves_black is eliminated.
> I used out-of-the-box 3.2 to generate this backtrace,
> I suppose current CVS line numbers could differ.

It seems like bad data is obtained from the (non-persistent) reading
cache. I'm not sure whether this also indicates some subtler problem,
but the main problem is that reset_engine() is never run between the
undo command and the examine_position() call in the estimate_score
command. The appended patch stops the crash.

It is clear that the use of reset_engine() currently is too fragile.
We need to robustify this somehow.

/Gunnar

Index: interface/play_gtp.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_gtp.c,v
retrieving revision 1.74
diff -u -r1.74 play_gtp.c
--- interface/play_gtp.c        15 Apr 2002 17:40:01 -0000      1.74
+++ interface/play_gtp.c        2 May 2002 20:56:01 -0000
@@ -1847,6 +1847,8 @@
 
   if (!undo_move(number_moves))
     return gtp_failure(id, "undo failed");
+
+  reset_engine();
   
   return gtp_success(id, "");
 }



reply via email to

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