From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.bugs Subject: bug#16377: Undo Tree regression: (error "Unrecognized entry in undo list undo-tree-canary") Date: Wed, 8 Jan 2014 03:37:04 +0000 Message-ID: <20140108033704.GA16400@c3po> References: Reply-To: Toby Cubitt NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1389152292 10435 80.91.229.3 (8 Jan 2014 03:38:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2014 03:38:12 +0000 (UTC) Cc: 16377@debbugs.gnu.org To: Barry OReilly Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 08 04:38:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W0jyC-0003Pu-BN for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jan 2014 04:38:16 +0100 Original-Received: from localhost ([::1]:44717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0jyB-0007e6-TX for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 22:38:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0jy3-0007dI-71 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:38:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0jxy-0000nd-IU for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:38:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0jxy-0000nZ-F4 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0jxy-00029f-78 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Toby Cubitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jan 2014 03:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16377 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13891522528233 (code B ref -1); Wed, 08 Jan 2014 03:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jan 2014 03:37:32 +0000 Original-Received: from localhost ([127.0.0.1]:41811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0jxT-00028i-MN for submit@debbugs.gnu.org; Tue, 07 Jan 2014 22:37:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39237) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0jxR-00028a-DD for submit@debbugs.gnu.org; Tue, 07 Jan 2014 22:37:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0jxM-0000Wc-J0 for submit@debbugs.gnu.org; Tue, 07 Jan 2014 22:37:29 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0jxM-0000WX-FV for submit@debbugs.gnu.org; Tue, 07 Jan 2014 22:37:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0jxE-0007Wf-1A for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:37:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0jx9-0000Sb-2w for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:37:15 -0500 Original-Received: from starfish.geekisp.com ([216.168.135.166]:10122) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1W0jx8-0000S9-V3 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 22:37:11 -0500 Original-Received: (qmail 7612 invoked by uid 1003); 8 Jan 2014 03:37:09 -0000 Original-Received: from localhost (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Tue, 07 Jan 2014 22:37:06 -0500 Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.dr-qubit.org/gpg-toby-pub.asc User-Agent: Mutt/1.5.22 (2013-10-16) X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-Primary-Address: toby@dr-qubit.org X-detected-operating-system: by eggs.gnu.org: OpenBSD 4.x-5.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83160 Archived-At: 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. 14. 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@cantab.net web: www.dr-qubit.org