GNU bug report logs - #16377
Undo Tree regression: (error "Unrecognized entry in undo list undo-tree-canary")

Previous Next

Package: emacs;

Reported by: Barry OReilly <gundaetiapo <at> gmail.com>

Date: Tue, 7 Jan 2014 00:33:02 UTC

Severity: normal

Merged with 16523

Done: Barry OReilly <gundaetiapo <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Barry OReilly <gundaetiapo <at> gmail.com>
To: Toby Cubitt <toby-dated-1390277686.3b79b1 <at> dr-qubit.org>
Cc: 16377 <at> debbugs.gnu.org
Subject: bug#16377: Undo Tree regression: (error "Unrecognized entry in undo list undo-tree-canary")
Date: Tue, 21 Jan 2014 22:23:37 -0500
[Message part 1 (text/plain, inline)]
> * Sometimes the navigate down hangs with backtrace:
>
>   Debugger entered--Lisp error: (quit)
>      undo-tree-copy-list((nil))
>      undo-tree-redo-1(1)
>      undo-tree-visualize-redo(1)
>      call-interactively(undo-tree-visualize-redo nil nil)
>      command-execute(undo-tree-visualize-redo)

In a reproduction of this, at the start of undo-tree-copy-list,
undo-list is:

  (nil (undo-tree-id3 . -2))

Then in this while loop:

  (while (null copy)
    (setq copy
          (undo-tree-restore-GC-elts-from-pool (pop undo-list))))

undo-tree-restore-GC-elts-from-pool returns nil for both elements, so
the while loop never ends. Perhaps you want instead (ignore-whitespace
diff):

--- a/emacs/lisp/undo-tree.el    Fri Jan 17 19:18:15 2014 -0500
+++ b/emacs/lisp/undo-tree.el    Tue Jan 21 22:17:50 2014 -0500
@@ -1690,13 +1690,13 @@
 (defun undo-tree-copy-list (undo-list)
   ;; Return a deep copy of first changeset in `undo-list'. Object id's are
   ;; replaced by corresponding objects from `buffer-undo-tree' object-pool.
-  (when undo-list
     (let (copy p)
       ;; if first element contains an object id, replace it with object
from
       ;; pool, discarding element entirely if it's been GC'd
-      (while (null copy)
+    (while (and undo-list (null copy))
     (setq copy
           (undo-tree-restore-GC-elts-from-pool (pop undo-list))))
+    (when copy
       (setq copy (list copy)
         p copy)
       ;; copy remaining elements, replacing object id's with objects from
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.