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


Message #11 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, 8 Jan 2014 03:37:04 +0000
On Mon, Jan 06, 2014 at 07:32:45PM -0500, Barry OReilly wrote:
> Don't know yet if the code change belongs in Undo Tree or Emacs but
> the recipe is:
> 
>   • Start Emacs in scratch buffer with global-undo-tree-mode enabled
>   • Go to BOB and insert "xxx"
>   • Select first line
>   • undo-tree-undo in region
>   • undo-tree-redo in region
>   • undo-tree-visualize
>   • Navigate down (redo)*
>   • Navigate up (undo)
> 
> Upon the navigate up, this error occurs:
> 
>   Debugger entered--Lisp error: (error "Unrecognized entry in undo list
> undo-tree-canary")
>      signal(error ("Unrecognized entry in undo list undo-tree-canary"))
>      error("Unrecognized entry in undo list %S" undo-tree-canary)
>      primitive-undo(1 (undo-tree-canary))
>      undo-tree-undo-1(1)
>      undo-tree-visualize-undo(1)
>      call-interactively(undo-tree-visualize-undo nil nil)
>      command-execute(undo-tree-visualize-undo)
>
> * 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)

OK, I can reproduce this. Here's a precise recipe:

1.  emacs -Q
2.  M-x load-file ~/undo-tree.elc
3.  M-x global-undo-tree-mode
4.  M-<
5.  type "xxx"
6.  C-a, C-SPC, C-e
7.  C-/
8.  C-g
9.  C-a, C-SPC, C-e
10. C-?
11. C-g
12.  C-x u
13. <down>
14. <up>

For me, this causes Emacs to hang in an infinite loop. I managed to
trigger the "Unrecognized entry" error once, but now I can't reproduce
it.

(Unfortunately, because of the way Emacs' undo system works, tiny changes
to the precise sequence of commands can affect how it behaves - even
apparently benign things like moving the point. I've never encountered so
many Heisenbugs as when coding undo-tree :-/

This looks like an undo-tree bug to me. The "Unrecognised entry" error
suggests the undo-tree-canary symbol has somehow ended up in a
`buffer-undo-tree' entry. That should never happen.

However, I don't understand why this should depend on which Emacs version
one runs.

I'll keep investigating. If you can rediscover the precise sequence of
steps required to trigger the error instead of the hang, please send them
to me!

Best,
Toby

-- 
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 12 days ago.

Previous Next


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