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

Previous Next

Package: emacs;

Reported by: Toby Cubitt <toby-dated-1391620129.532598 <at> dr-qubit.org>

Date: Wed, 22 Jan 2014 17:10:02 UTC

Severity: normal

Merged with 16377

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

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Toby Cubitt <tsc25 <at> cantab.net>
To: Barry OReilly <gundaetiapo <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: Undo Tree regression: (error "Unrecognized entry in undo list
 undo-tree-canary")
Date: Wed, 22 Jan 2014 17:08:44 +0000
On Tue, Jan 21, 2014 at 10:23:37PM -0500, Barry OReilly wrote:
> > * 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):

Could well be. Thanks a lot for the patch!

I need to step through the minimal example and remember what this code is
supposed to be doing, and then either apply your patch or figure out what
the correct fix is (to this, and the other undo-list-pop-changeset issue
you pointed out, which at the moment seem to be separate issues).

Cheers,
Toby


> --- 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

-- 
Dr T. S. Cubitt
Royal Society University Research Fellow
and Fellow of Churchill College, Cambridge
Centre for Quantum Information
DAMTP, University of Cambridge

email: tsc25 <at> cantab.net
web:   www.dr-qubit.org




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

Previous Next


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