[Top][All Lists]
[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: |
Mon, 17 Nov 2003 11:15:49 +0100 |
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) |
I wrote:
> This is extremely bad. The crash happens when reading the constraint
> for the small avalanche joseki, pattern JK68 in komoku.db. It turns
> out that the computed vertices used in the constraint come out all
> wrong. It looks like the constraint callback might be called with the
> wrong transformation number from do_corner_matchpat(), or at least
> with a transformation number which isn't consistent with the pattern
> that has been matched.
The appended patch implements a quick and dirty workaround to get the
right transformation number, awaiting a proper fix.
- temporary workaround for a bug in do_corner_matchpat()
/Gunnar
Index: engine/matchpat.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/matchpat.c,v
retrieving revision 1.61
diff -u -r1.61 matchpat.c
--- engine/matchpat.c 13 Nov 2003 22:48:41 -0000 1.61
+++ engine/matchpat.c 17 Nov 2003 10:07:19 -0000
@@ -1262,6 +1262,10 @@
*/
static int pattern_stones[BOARDMAX];
+#define TEMPORARY_WORKAROUND 1
+#if TEMPORARY_WORKAROUND
+static int reorder[8] = {7, 4, 5, 6, 1, 2, 3, 0};
+#endif
/* Recursively performs corner matching. This function checks whether
* `num_variation' variations pointed by `variation' parameter match.
@@ -1288,7 +1292,12 @@
/* We have found a matching pattern. */
ASSERT1(board[move] == EMPTY, move);
+#if TEMPORARY_WORKAROUND
+ callback(move, callback_color, pattern, reorder[trans],
+ pattern_stones, stones);
+#else
callback(move, callback_color, pattern, trans, pattern_stones, stones);
+#endif
continue;
}
}
- [gnugo-devel] crash, Evan Berggren Daniel, 2003/11/16
- Re: [gnugo-devel] crash, Gunnar Farneback, 2003/11/16
- Re: [gnugo-devel] crash,
Gunnar Farneback <=
- Re: [gnugo-devel] crash, Paul Pogonyshev, 2003/11/17
- Re: [gnugo-devel] crash, Evan Berggren Daniel, 2003/11/19
- Re: [gnugo-devel] crash, Paul Pogonyshev, 2003/11/19
- Re: [gnugo-devel] crash, Arend Bayer, 2003/11/19