From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7348: 23.2.50; Emacs crashes on fast window resize with scrollbars on under OSX Date: Mon, 08 Nov 2010 21:24:27 +0200 Message-ID: <831v6vobys.fsf@gnu.org> References: <4CD680B0.4060503@gmx.at> <4CD7CBC8.9010103@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1289245528 30196 80.91.229.12 (8 Nov 2010 19:45:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 8 Nov 2010 19:45:28 +0000 (UTC) Cc: yacoob@gmail.com, 7348@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 08 20:45:21 2010 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 1PFXeS-0004Ua-45 for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Nov 2010 20:45:12 +0100 Original-Received: from localhost ([127.0.0.1]:58726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFXeR-000877-GB for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Nov 2010 14:45:11 -0500 Original-Received: from [140.186.70.92] (port=41778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFXd5-0006oH-2u for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2010 14:43:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFXd2-00053Y-A5 for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2010 14:43:46 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFXd2-00053M-7M for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2010 14:43:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PFXG7-0007bi-Au; Mon, 08 Nov 2010 14:20:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2010 19:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7348-submit@debbugs.gnu.org id=B7348.128924398929231 (code B ref 7348); Mon, 08 Nov 2010 19:20:03 +0000 Original-Received: (at 7348) by debbugs.gnu.org; 8 Nov 2010 19:19:49 +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 1PFXFt-0007bQ-Ds for submit@debbugs.gnu.org; Mon, 08 Nov 2010 14:19:49 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFXFr-0007bL-GR for 7348@debbugs.gnu.org; Mon, 08 Nov 2010 14:19:48 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LBK00F00Z4T5N00@a-mtaout20.012.net.il> for 7348@debbugs.gnu.org; Mon, 08 Nov 2010 21:24:18 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBK00EFRZ8GYE40@a-mtaout20.012.net.il>; Mon, 08 Nov 2010 21:24:18 +0200 (IST) In-reply-to: <4CD7CBC8.9010103@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 08 Nov 2010 14:20:03 -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:41442 Archived-At: > Date: Mon, 08 Nov 2010 11:07:04 +0100 > From: martin rudalics > Cc: Jakub Turski , 7348@debbugs.gnu.org > > > The call to do_pending_window_change at line 11397 in xdisp.c > > (emacs-23 branch) seems to change selected_window because of the > > following call chain, but the variable `w' in redisplay_internal still > > points to the old selected window. > > > > redisplay_internal > > -> do_pending_window_change > > -> change_frame_size > > -> change_frame_size_1 > > -> set_window_height > > -> size_window > > -> delete_window (/* Delete WINDOW if it's too small. */) > > That's bad. So basing redisplay_internal entirely on > > struct window *w = XWINDOW (selected_window); > > is inherently broken. But simply reassigning > > w = XWINDOW (selected_window); > > after every do_pending_window_change call is hairy since it changes the > selected window under our feet, so any things done for the window that > was selected before the call would probably have to be redone for the > now selected window. The only thing I see that uses selected_window and is done between this line: ++redisplaying_p; and the 1st call to do_pending_window_change is this call: reconsider_clip_changes (w, current_buffer); We could simply call reconsider_clip_changes again if we detect that the selected_window changed after the call to do_pending_window_change. The second call to do_pending_window_change is conditioned on must_finish being zero, which I think cannot happen when this situation hits. And the third call to do_pending_window_change already goes back to retry anyway. So maybe there's no problem in updating the value of w in this case.