From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#48337: Fwd: 28.0.50; Emacs crashing randomly (possibly minibuffer activity related) Date: Sat, 15 May 2021 12:00:01 +0000 Message-ID: References: <87tunasd2u.fsf@linaro.org> <83fsyu57oj.fsf@gnu.org> <87y2ckgby0.fsf@linaro.org> <87o8ddc59q.fsf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18983"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48337@debbugs.gnu.org To: Alex =?UTF-8?Q?Benn=C3=A9e?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 14:01:27 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhsz1-0004lV-I5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 14:01:27 +0200 Original-Received: from localhost ([::1]:38160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhsz0-0000rb-LU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 08:01:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsyc-0000pe-3t for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 08:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhsyb-0004c8-SE for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 08:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhsyb-0006qu-R3 for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 08:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 May 2021 12:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48337 X-GNU-PR-Package: emacs Original-Received: via spool by 48337-submit@debbugs.gnu.org id=B48337.162108000926255 (code B ref 48337); Sat, 15 May 2021 12:01:01 +0000 Original-Received: (at 48337) by debbugs.gnu.org; 15 May 2021 12:00:09 +0000 Original-Received: from localhost ([127.0.0.1]:47789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhsxl-0006pP-Ib for submit@debbugs.gnu.org; Sat, 15 May 2021 08:00:09 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:44394 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lhsxk-0006nl-61 for 48337@debbugs.gnu.org; Sat, 15 May 2021 08:00:08 -0400 Original-Received: (qmail 97339 invoked by uid 3782); 15 May 2021 12:00:02 -0000 Original-Received: from acm.muc.de (p4fe15ace.dip0.t-ipconnect.de [79.225.90.206]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 15 May 2021 14:00:01 +0200 Original-Received: (qmail 18138 invoked by uid 1000); 15 May 2021 12:00:01 -0000 Content-Disposition: inline In-Reply-To: <87o8ddc59q.fsf@linaro.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206596 Archived-At: Hello, Alex. On Fri, May 14, 2021 at 23:35:34 +0100, Alex Bennée wrote: > Alan Mackenzie writes: > > On Fri, May 14, 2021 at 17:52:46 +0100, Alex Bennée wrote: > >> Sadly not, testing with 780b1db126fcfdbb50da5c1acf24b3c6e614dd9f I got a > >> crash when I tried to switch buffer. > > Thanks for the two dumps. They make it obvious what has happened. > > buffer-list-update-hook is getting called before the new minibuffer has > > been pushed onto the minnibuffer list. > > Could I ask you to try out the following patch which should fix that > > problem. Thanks! > That seems to sort out both the recent crash and the original failure > mode I reported in this bug. Excellent! Thanks for doing the testing. I think I'd rather leave the bug open a bit longer, just in case any other failures turn up. > > diff --git a/src/minibuf.c b/src/minibuf.c > > index 428998a639..d4702ee684 100644 > > --- a/src/minibuf.c > > +++ b/src/minibuf.c > > @@ -653,11 +653,11 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, > > return unbind_to (count, val); > > } > > - minibuf_level++; /* Before calling choose_minibuf_frame. */ > > /* Ensure now that the latest minibuffer has been created, in case > > anything happens which depends on MINNIBUF_LEVEL and > > Vminibuffer_list being consistent with eachother. */ > > - minibuffer = get_minibuffer (minibuf_level); > > + minibuffer = get_minibuffer (minibuf_level + 1); > > + minibuf_level++; /* Before calling choose_minibuf_frame. */ > > > > /* Choose the minibuffer window and frame, and take action on them. */ > -- > Alex Bennée -- Alan Mackenzie (Nuremberg, Germany).