From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Toby Cubitt Newsgroups: gmane.emacs.bugs Subject: bug#24640: Crashes in 25.1 Date: Wed, 12 Oct 2016 14:50:20 +0100 Message-ID: <20161012135020.GA21177@marvin.cs.ucl.ac.uk> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476280478 20817 195.159.176.226 (12 Oct 2016 13:54:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 13:54:38 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 24640@debbugs.gnu.org, phillip.lord@russet.org.uk, rrt@sc3d.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 12 15:54:31 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buJzL-0004c6-3v for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 15:54:31 +0200 Original-Received: from localhost ([::1]:33751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buJzJ-0003dL-T2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 09:54:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buJw3-0001KR-H1 for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 09:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buJvy-0007hm-Gj for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 09:51:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buJvy-0007hX-D8 for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 09:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1buJvy-00060C-7z for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2016 09:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Toby Cubitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Oct 2016 13:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24640-submit@debbugs.gnu.org id=B24640.147628023223035 (code B ref 24640); Wed, 12 Oct 2016 13:51:02 +0000 Original-Received: (at 24640) by debbugs.gnu.org; 12 Oct 2016 13:50:32 +0000 Original-Received: from localhost ([127.0.0.1]:52811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buJvT-0005zS-M0 for submit@debbugs.gnu.org; Wed, 12 Oct 2016 09:50:31 -0400 Original-Received: from starfish.geekisp.com ([216.168.135.166]:22637) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1buJvR-0005zE-3T for 24640@debbugs.gnu.org; Wed, 12 Oct 2016 09:50:30 -0400 Original-Received: (qmail 279 invoked by uid 1003); 12 Oct 2016 13:49:01 -0000 Original-Received: from marvin.localdomain (localhost.geekisp.com [127.0.0.1]) by localhost.geekisp.com (tmda-ofmipd) with ESMTP; Wed, 12 Oct 2016 09:48:58 -0400 Original-Received: by marvin.localdomain (Postfix, from userid 1000) id 7E3B6120BE91; Wed, 12 Oct 2016 14:50:20 +0100 (BST) Content-Disposition: inline In-Reply-To: <83h98hc106.fsf@gnu.org> X-PGP-Key: http://www.dr-qubit.org/gpg-toby-pub.asc X-Delivery-Agent: TMDA/1.1.11 (Ladyburn) X-Primary-Address: toby@dr-qubit.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:124386 Archived-At: On Wed, Oct 12, 2016 at 01:31:05PM +0300, Eli Zaretskii wrote: > > Date: Tue, 11 Oct 2016 19:33:20 +0300 > > From: Eli Zaretskii > > Cc: 24640@debbugs.gnu.org > >=20 > > > =E2=80=8BYes, the crashes appear to stop when I comment out (global= -undo-tree-mode) in vars.el. You can also disable history loading without disabling global-undo-tree-mode, by disabling undo-tree-auto-save-history. Might be worth doing this more fine-grained check to confirm. > > OK, so we have our prime suspect. Can you tell where I can find the > > exact version of undo-tree-mode you are using? > >=20 > > Phillip, could you please look into that package and see if you can > > spot any potential problems with the Emacs 25 undo internals? TIA. >>From the bug tracker discussion, it sounds like you're close to boiling this down to some simple steps involving one undo-tree history file that trigger the crash. If you can send me the file and a list of steps to reproduce from emacs -Q, I'd be happy to look into the undo-tree side of things. > Some functions in undo-tree refer to or manipulate Emacs undo > internals: >=20 > undo-list-pop-changeset > undo-list-transfer-to-tree > undo-list-rebuild-from-tree > undo-tree-pull-undo-in-region-branch > undo-tree-pull-redo-in-region-branch > undo-tree-adjust-elements-to-elt > undo-tree-apply-deltas > undo-tree-undo-1 > undo-tree-redo-1 >=20 > Do they perhaps need some adjustments to Emacs 25's undo? The only Emacs undo internal that undo-tree manipulates is the buffer-undo-list variable. The only functions that do so are: undo-list-pop-changeset undo-list-transfer-to-tree undo-list-rebuild-from-tree All the others either call one of these, or only touch buffer-undo-tree which is a variable defined in the undo-tree package and which the Emacs undo internals know nothing about. Has the format of buffer-undo-list has changed at all? If so, then the three above might need adjustment. If not, they should work as before. The only other Emacs undo internals used by undo-tree are to call primitive-undo and undo-boundary when undo/redoing. > Another potential issue is the new undo timer we have in Emacs 25 (see > undo-auto--boundary-ensure-timer in simple.el). One way of checking > whether this is related to the crashes is to modify that function to > use a much larger value for the 1st argument of run-at-time, say > 10000, so that the undo timer never fires during the startup. Reuben, > could you try that? As far as I understand, the timer just adds undo boundaries to buffer-undo-list in some of the open buffers. Undo-tree doesn't touch buffer-undo-list (or do anything at all, in fact) until you call one of its interactive commands. Since the timer can't run whilst undo-tree lisp code is running, and extra undo boundaries are no problem for undo-tree, I'd be surprised if the new undo timer is the culprit. Best, Toby --=20 Dr T. S. Cubitt Royal Society University Research Fellow Quantum Information Theory Department of Computer Science University College London email: tsc25@cantab.net web: www.dr-qubit.org