From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#7728: 24.0.50; GDB backtrace from abort Date: Tue, 11 Jan 2011 15:55:12 -0500 Message-ID: References: <30041A5C411E45A7B7AF7A9ECA3AA0BE@us.oracle.com> <83y67echvm.fsf@gnu.org> <837heopknq.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294781765 19290 80.91.229.12 (11 Jan 2011 21:36:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Jan 2011 21:36:05 +0000 (UTC) Cc: 7728@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 11 22:36:01 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pclsj-0003Cj-5n for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jan 2011 22:35:57 +0100 Original-Received: from localhost ([127.0.0.1]:46851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcljQ-0004xe-B7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jan 2011 16:26:20 -0500 Original-Received: from [140.186.70.92] (port=51002 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PclhQ-00040w-Lz for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2011 16:24:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PclhO-0000kn-04 for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2011 16:24:16 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PclhN-0000kj-SE for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2011 16:24:13 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Pcl8M-0006kS-Il; Tue, 11 Jan 2011 15:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jan 2011 20:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7728 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7728-submit@debbugs.gnu.org id=B7728.129477886825919 (code B ref 7728); Tue, 11 Jan 2011 20:48:02 +0000 Original-Received: (at 7728) by debbugs.gnu.org; 11 Jan 2011 20:47:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pcl88-0006k0-4W for submit@debbugs.gnu.org; Tue, 11 Jan 2011 15:47:48 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pcl86-0006jo-4z for 7728@debbugs.gnu.org; Tue, 11 Jan 2011 15:47:46 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p0BKtCAM021515; Tue, 11 Jan 2011 15:55:12 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 3D231B4AAD; Tue, 11 Jan 2011 15:55:12 -0500 (EST) In-Reply-To: <837heopknq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 01 Jan 2011 20:02:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 11 Jan 2011 15:48:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43267 Archived-At: > My conclusion after studying this is that everything that happens > below Fselect_frame is reasonable: we switch to the frame and redraw > the cursor in all of its windows. In particular, > update_cursor_in_window_tree simply walks the entire window tree of > the newly selected frame. I don't see how we can avoid any of this > when selected_window is nil, because selected_window has nothing to do > with the windows that are being processed. None of these functions > even references selected_window, which is TRT. Yes, I see that as well, now. > The first place that does reference selected_window is the > CURRENT_MODE_LINE_HEIGHT macro used in window_text_bottom_y, and that > leads to the abort. There's still one thing I don't understand: why do we call Fselect_frame? AFAICT, Fset_window_configuration has no reason to select a new frame, it all works within the selected-frame. > So I see 2 ways to prevent this particular problem: > 1) Handle the case of selected_window == Qnil in > CURRENT_MODE_LINE_FACE_ID. But should it always return the mode-line-inactive face here, or should it always return the mode-line face? > 2) Change the code of Fset_window_configuration and Fselect_window, > to have some other way of preventing the latter from storing point > in the old selected window, without setting selected_window to > nil. That sounds like a better solution. E.g. move the code of Fselect_window to another function, add a third argument to it specifying whether to swap-out point in selected_window, and make Fset_window_configuration call that new internal function. But maybe Fselect_frame should simply not be run in this case. Stefan