From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39977: 28.0.50; Unhelpful stack trace Date: Mon, 16 Mar 2020 17:33:32 +0200 Message-ID: <83d09cb9gz.fsf@gnu.org> References: <83zhcs80e5.fsf@gnu.org> <83imj88tpt.fsf@gnu.org> <550fbc22-09db-d30b-c194-8f26b5dca05f@gmx.at> <83wo7o6nxs.fsf@gnu.org> <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@gmx.at> <83blozckn2.fsf@gnu.org> <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@gmx.at> <83y2s2bswl.fsf@gnu.org> <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@gmx.at> <83k13lbgux.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="123994"; mail-complaints-to="usenet@ciao.gmane.io" Cc: enometh@meer.net, 39977@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 16 18:32:30 2020 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 1jDtbK-000W8Z-2X for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Mar 2020 18:32:30 +0100 Original-Received: from localhost ([::1]:44361 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDtbJ-0000Uv-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Mar 2020 13:32:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60041) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDrkh-000088-KS for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:34:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDrkg-0007Fs-HX for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDrkg-0007DX-CV for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jDrkg-0001kG-8I for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Mar 2020 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39977 X-GNU-PR-Package: emacs Original-Received: via spool by 39977-submit@debbugs.gnu.org id=B39977.15843728146660 (code B ref 39977); Mon, 16 Mar 2020 15:34:02 +0000 Original-Received: (at 39977) by debbugs.gnu.org; 16 Mar 2020 15:33:34 +0000 Original-Received: from localhost ([127.0.0.1]:37791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jDrkE-0001jL-Eg for submit@debbugs.gnu.org; Mon, 16 Mar 2020 11:33:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jDrkD-0001j4-9A for 39977@debbugs.gnu.org; Mon, 16 Mar 2020 11:33:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jDrk7-0002lr-Fv; Mon, 16 Mar 2020 11:33:27 -0400 Original-Received: from [176.228.60.248] (port=1645 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jDrk6-0002rq-Ir; Mon, 16 Mar 2020 11:33:27 -0400 In-Reply-To: (message from martin rudalics on Mon, 16 Mar 2020 10:24:14 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177419 Archived-At: > Cc: enometh@meer.net, 39977@debbugs.gnu.org > From: martin rudalics > Date: Mon, 16 Mar 2020 10:24:14 +0100 > > >> As far as xdisp.c is concerned it simply must not set selected_frame > >> to a dead frame. > > > > I don't think that's possible in xdisp.c cases you've shown. > > > >> Never ever. > > > > Why not? > > Because it might shift the abort to the next instance of SELECTED_FRAME. Why does it matter which SELECTED_FRAME crashes? Anyway, my point was a different one: it was that we cannot simply "not select" such a frame, we need to do something else. What exactly is not trivial, and I didn't understand what you were suggesting to do. > >> As far as frame.c is concerned, it should do something like in the > >> attached patch. > > > > We cannot punt like that in the display engine. > > Why not? Because we must have a frame that we were supposed to redisplay. > At least one of the frame restorations is unprotected anyway > and might leave the temporarily selected frame selected. The display engine doesn't select frames to show them to the user, it selects them to redraw their windows. So the considerations what to do in this case are different from those we need to consider when the user selects a frame. > > So you are saying that selecting such a frame will cause trouble to > > some other code, not to the display engine? > > Not "will" but "may". The problem is that it then might be harder > to find the cause. > > With emacs -Q evaluate > > (defvar foo > '(:eval > (when (> (length (frame-list)) 1) > (delete-frame (next-frame))))) > > (setq-default mode-line-format foo) > > and do C-x 5 2. The backtrace I get here is Which just means we need to add the protection to SELECTED_FRAME itself, so that it runs everywhere.