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: Thu, 13 May 2021 09:52:19 +0000 Message-ID: References: <83fsyu57oj.fsf@gnu.org> <838s4l5uld.fsf@gnu.org> <83zgx14cal.fsf@gnu.org> <83cztx3v04.fsf@gnu.org> <37291ae0-11cb-c817-cf26-b90ad50bfaaa@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alex.bennee@linaro.org, 48337@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 13 11:53:11 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 1lh81m-0006WW-DI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 May 2021 11:53:10 +0200 Original-Received: from localhost ([::1]:40802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lh81l-000499-CM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 May 2021 05:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lh81e-00048k-Na for bug-gnu-emacs@gnu.org; Thu, 13 May 2021 05:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lh81e-0004sy-GQ for bug-gnu-emacs@gnu.org; Thu, 13 May 2021 05:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lh81e-0007By-Ew for bug-gnu-emacs@gnu.org; Thu, 13 May 2021 05:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 May 2021 09:53:02 +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.162089954927590 (code B ref 48337); Thu, 13 May 2021 09:53:02 +0000 Original-Received: (at 48337) by debbugs.gnu.org; 13 May 2021 09:52:29 +0000 Original-Received: from localhost ([127.0.0.1]:41350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lh817-0007Aw-Hf for submit@debbugs.gnu.org; Thu, 13 May 2021 05:52:29 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:53680 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lh814-0007Ai-Tn for 48337@debbugs.gnu.org; Thu, 13 May 2021 05:52:27 -0400 Original-Received: (qmail 2695 invoked by uid 3782); 13 May 2021 09:52:20 -0000 Original-Received: from acm.muc.de (p4fe15ecf.dip0.t-ipconnect.de [79.225.94.207]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 13 May 2021 11:52:19 +0200 Original-Received: (qmail 8772 invoked by uid 1000); 13 May 2021 09:52:19 -0000 Content-Disposition: inline In-Reply-To: <37291ae0-11cb-c817-cf26-b90ad50bfaaa@gmx.at> 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:206410 Archived-At: Hello, Martin. On Thu, May 13, 2021 at 09:54:52 +0200, martin rudalics wrote: > > The deeper cause of the bug is that calling buffer-list-update-hook > > simply doesn't belong in record-window-buffer. That hook should be > > called when the buffer list changes, not when a window's current buffer > > gets "recorded". > > So, as the main fix, I propose moving the call of buffer-list-update-hook > > to (some of) the places where record-window-buffer gets called, those > > places where the buffer list changes. There are exactly two such places, > > both in window.c. This will prevent the chain of events in read_minibuf > > outlined above. > Alan, please take one step back and reconsider. IIUC you added the > `record-window-buffer' call to read_minibuf, added the DO-MINIBUF > argument to `record-window-buffer' and now decide that > `buffer-list-update-hook' doesn't belong into `record-window-buffer'. > Aren't you putting the cart before the horse? That decision might be > correct but still constitutes a change that affects all applications > running `buffer-list-update-hook'. Maybe you're right. I've never really liked those changes to record-window-buffer, they're a bit scruffy. The requirement is simply to push a minibuffer onto w->prev_buffers, where w is the mini-window of a frame. Maybe I should instead undo those changes to r-w-b, and write a separate function for pushing the minibuffer onto w->prev_buffers. This would surely be cleaner. Whether that function should be in C or in Lisp (like record-window-buffer) would need to be decided. Maybe r-w-b could use that new function to avoid duplicating code. > martin -- Alan Mackenzie (Nuremberg, Germany).