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#47207: 28.0.50; decode_next_window_args crash Date: Thu, 15 Apr 2021 13:07:31 +0000 Message-ID: References: <83h7l9d651.fsf@gnu.org> <83eegdd4uz.fsf@gnu.org> <8335wsdcob.fsf@gnu.org> <11b795a6-1a20-cc58-73d6-b75227dc732a@gmx.at> <83r1kcflv6.fsf@gnu.org> 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="10083"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 47207@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 15 15:08:14 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 1lX1jB-0002S3-Du for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Apr 2021 15:08:13 +0200 Original-Received: from localhost ([::1]:45130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lX1jA-0002WI-Ex for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Apr 2021 09:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX1j1-0002TN-Kb for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 09:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lX1j0-00048L-3b for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 09:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lX1iz-0008Sl-T8 for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 09:08: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: Thu, 15 Apr 2021 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47207 X-GNU-PR-Package: emacs Original-Received: via spool by 47207-submit@debbugs.gnu.org id=B47207.161849206032502 (code B ref 47207); Thu, 15 Apr 2021 13:08:01 +0000 Original-Received: (at 47207) by debbugs.gnu.org; 15 Apr 2021 13:07:40 +0000 Original-Received: from localhost ([127.0.0.1]:36716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX1ie-0008S9-Bh for submit@debbugs.gnu.org; Thu, 15 Apr 2021 09:07:40 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:20022 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lX1ic-0008Rv-GD for 47207@debbugs.gnu.org; Thu, 15 Apr 2021 09:07:39 -0400 Original-Received: (qmail 88895 invoked by uid 3782); 15 Apr 2021 13:07:32 -0000 Original-Received: from acm.muc.de (p4fe159f6.dip0.t-ipconnect.de [79.225.89.246]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 15 Apr 2021 15:07:32 +0200 Original-Received: (qmail 20055 invoked by uid 1000); 15 Apr 2021 13:07:31 -0000 Content-Disposition: inline In-Reply-To: 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:204060 Archived-At: Hello, Martin. On Tue, Apr 13, 2021 at 19:12:41 +0200, martin rudalics wrote: > > OK. There's a long-standing comment to the contrary in > > choose_minibuf_frame (src/minibuf.c): > > /* I don't think that any frames may validly have a null > > * minibuffer window anymore. */ > > , so it looks like that comment is no longer valid. It needs > > changing/removing and the code it annotates seems to want fixing. There > > might well be other places in the earlier part of minibuf.c that assume > > a non-null ->minibuffer_window. > > Either the ->minibuffer_window of tootip frames must be given a sensible > > non-null value (is this practicable and sensible?), or the code needs > > fixing to not assume it. > See > https://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00694.html That's quite an involved thread. I've read through it, but can't remember seeing a firm decision on how to fix the problem, or even if it was fixed then. The current problem in minibuf.c seems to be that we assume f->minibuffer_window to be non-nil in several (~6) places, rather than checking it. In most of these places, if we detect NILP (f->m_w), we can simply skip the action we were intending to take. This is certainly the case in the bit that gave you the trouble in read_minibuf_unwind, where we're stepping through all frames looking for the expired minibuffer. It might well be that we never call do_switch_frame to a tool-tip frame, for example. Do you know if this is the case? This could save some checking code. So, where do we go from here? I'm quite willing to make these changes to minibuf.c. Would that be OK with everybody else? > martin -- Alan Mackenzie (Nuremberg, Germany).