From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#39977: 28.0.50; Unhelpful stack trace Date: Tue, 17 Mar 2020 10:38:11 +0100 Message-ID: <69a74f9e-079b-a771-0213-f60ed0bf5720@gmx.at> 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> <83d09cb9gz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="30759"; mail-complaints-to="usenet@ciao.gmane.io" Cc: enometh@meer.net, 39977@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 17 10:39:37 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 1jE8hF-0007tG-KI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Mar 2020 10:39:37 +0100 Original-Received: from localhost ([::1]:55062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE8hE-0006aS-6j for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Mar 2020 05:39:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45810) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE8gi-0006Z9-BL for bug-gnu-emacs@gnu.org; Tue, 17 Mar 2020 05:39:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jE8gh-0003N1-46 for bug-gnu-emacs@gnu.org; Tue, 17 Mar 2020 05:39:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jE8gh-0003IY-0J for bug-gnu-emacs@gnu.org; Tue, 17 Mar 2020 05:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jE8gf-0006sF-Tz for bug-gnu-emacs@gnu.org; Tue, 17 Mar 2020 05:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Mar 2020 09:39:01 +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.158443790826368 (code B ref 39977); Tue, 17 Mar 2020 09:39:01 +0000 Original-Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 09:38:28 +0000 Original-Received: from localhost ([127.0.0.1]:38186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jE8g7-0006rE-UM for submit@debbugs.gnu.org; Tue, 17 Mar 2020 05:38:28 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jE8g6-0006r2-PP for 39977@debbugs.gnu.org; Tue, 17 Mar 2020 05:38:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1584437895; bh=B6sBakW2Pte2ynZXZRQ/boZBEj48ROXQaFC19Y54HMI=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=SKzPcHVcE7OccofH0Q2knTfoDIMkfjpI+Q26OqR92tA1ywdkX1tdcCb+HnzQRF2Rn hU5OgqXTFhdypTGaTYI9/yU2vzT5pne0uZGZ+wArFVQSjYmtsYWZAkJri0T2rngfmG VOjwX2UFIkQVMGMd1F57gp6nbNad35HA7mcgsIiY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.16]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mq2jC-1jaZ4X2FAQ-00nBnS; Tue, 17 Mar 2020 10:38:15 +0100 In-Reply-To: <83d09cb9gz.fsf@gnu.org> Content-Language: en-US X-Provags-ID: V03:K1:NnX+xS7g3Fz7h5qVPPyjr8gCIRO5tZJ8mBZKIjNmpSohHrzkLSL lg5wXqmFj0cs1yWcC+/9Ei2aXVk2nLCcOXmvV7YWknk71L84Qf+KrL6Qa9fM4lrLR/C8Bt5 +8fnBZhf2xYtwTbu5Y6S0YV8kwASctBJ0WQkREY1fNtiqWwHHORqgIne/7nJ2iG4f/Y3TUT EYnn0SuZvh6frFPAYXUmA== X-UI-Out-Filterresults: notjunk:1;V03:K0:B990qTyP+Ms=:F6sqJEqK1tUYn+HrxNnJZF 1c3rTlXX5gbBZRv9KqvBAs7Zxlj0Zf9Eyt/Djcjey2SEfgAb5PFjjoJxQoaHUAA5dStxUzQK+ /3y8c6hqsnYgQJbgDjIq2l8nLcYN/d6RK/qJbLhwoKAvD/TlAUfpQIyzW+CCE73yOA2Ewv0uQ mOz3ykjUPOsmeU7mCMrdKNdFrcWrKb/oWdjtSPmLwd+yld36XrIAwlVWCPj5nnCkeGF3mFhfM qXC8Or6zkE+VzmIN5SNcxmzGk+KxtQ6lr3m+uJIEpf/TRbyf9c/NLh+VqYpPWJbAdKpLoMqTT g8cBN5l5TqUtgkzEiYSc9B9h63nf5LVzJVKsLnfWOOkMsLHieYlJk1sukYJe/UvJCd7AdzCyp 2wgDQHE/KdHLkC5PFzOk2b37Y0J45yx6DQAWnP19itLT7sJbId5hnpWHmwp4PSX/aTfdotjuU sqlbe9rZ/hiLuWgfExUotGErThb9YHmX8tGDyRNesvwUdIYalPTN0C8Da93uOUUU1vB/f5OJf 17pD6YmP5egrofQMEkwh6Z64HBebMYJMaOpf4BmghpjQZXPAP3jquwW/ru8kAEyN+0nEKVlwI jGnp1+SWSviLW1zt1AEoWgyv1qzkibpsxg0SFLj+4WMZsa6L9zLDjozqjc+GsDho//sv/xiqa Xlj87/flVNFjwnZrGM1TJsRPc+hCEDo+TzTw6eZYzepABOON6j9vds4KTTZcB3d1Elna4f7Wb 9tgo7gsTA9GRXYx2o/5o13EmPOzXQhyVLY+hdr7u4awR1ilY8r/bfi/9ZPcbSTKMLdswp3vb 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:177441 Archived-At: > Why does it matter which SELECTED_FRAME crashes? Because the next crash may happen at some time in the future. Why not cure the first crash we have right away? > 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. Either we are miscommunicating or I' m just dumb. I would in no way restrict the display engine in choosing whatever live frame it wants to redisplay. > 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. As I said above: This is not about the frame its windows it has to redraw. It's about the display engine trying to select a frame after it has redrawn (parts of) another frame's windows. >> 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. But SELECTED_FRAME is not the cause of this problem. The cause of the problem is AFAICT the fact that :eval is allowed to do silly things while the display engine tries to redraw windows. The example above is only a mirror of ---------------------- With emacs -Q evaluate (defvar foo '(:eval (when (> (length (frame-list)) 1) (delete-frame)))) (setq-default mode-line-format foo) and do C-x 5 2. --------------- where I'm told that :eval deleted the frame being displayed So the display engine is, in principle, aware of one incarnation of the problem - the one where an :eval tries to delete under its feet the frame it currently tries to redraw and the comment correctly says that This is a nonsensical thing to do, and signaling an error from redisplay might be dangerous, but we cannot continue with an invalid frame. So here the display engine bows out. OTOH we allow it to set selected_frame to an equally invalid frame. Isn't that a bit selfish? martin