Hi,
When re-evaluating candidate moves at a depth of 3ply or 4ply for a
move in the middle of a game after analyze match, the view jumps to
the final move of the game.
Upon further investigation, this appears to be a GTK3-specific issue.
- It reproduces in the master --with-gtk3 build.
- It does not reproduce in the master --with-gtk (GTK2) build.
In GTK3, it already reproduces as of at least version 1.08.003.
The steps to reproduce are: analyze match, select a move in the middle
of a game, and re-evaluate the candidate moves for that move at 3ply
or 4ply. After the evaluation finishes, instead of staying on that
move, it jumps to the final move of the game.
Adding the following guard to the beginning of GameListSelectRow()
stopped this issue from occurring even on GTK3.
--------------------------------
--- a/gtk/gtkgamelist.c
+++ b/gtk/gtkgamelist.c
@@ -80,6 +80,10 @@ GameListSelectRow(GtkTreeView * tree_view, gpointer
UNUSED(p))
int *pPlayer;
listOLD *pl;
+ /* GTK3 may emit cursor-changed while the gamelist is being rebuilt */
+ if (frozen)
+ return;
+
gtk_tree_view_get_cursor(tree_view, &path, &column);
if (!path)
return;
--------------------------------
I suspect that ChangeGame(NULL) rebuilds the game list while frozen
with GTK3Freeze(), and in GTK3, a cursor-changed signal occurs during
this process, calling GameListSelectRow() and modifying plLastMove.
Since GameListSelectRow() already contains processing with the comment
/* This didn't seem to happen with GTK2 but has been noticed with GTK3 */
the difference in signal emission timing between GTK2 and GTK3 may be
related. I haven't verified whether it is always correct to ignore
cursor-changed while frozen, but at least in this reproduction case,
the above guard resolves the issue.
Best regards,
--
TAKAHASHI Kaoru