From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#7728: 24.0.50; GDB backtrace from abort Date: Wed, 12 Jan 2011 18:42:55 +0100 Message-ID: <4D2DE81F.5040002@gmx.at> References: <30041A5C411E45A7B7AF7A9ECA3AA0BE@us.oracle.com> <83y67echvm.fsf@gnu.org> <837heopknq.fsf@gnu.org> <4D2D5E29.3010502@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070608010403090906020005" X-Trace: dough.gmane.org 1294855299 23682 80.91.229.12 (12 Jan 2011 18:01:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 12 Jan 2011 18:01:39 +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 Wed Jan 12 19:01:34 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 1Pd50c-0000Yw-S0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 19:01:32 +0100 Original-Received: from localhost ([127.0.0.1]:39743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd4tz-0001xz-PU for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 12:54:31 -0500 Original-Received: from [140.186.70.92] (port=48506 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd4tn-0001uf-8g for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 12:54:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd4tk-0005y1-Ie for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 12:54:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd4tk-0005xx-Fe for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 12:54:16 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Pd4c6-0001qW-6r; Wed, 12 Jan 2011 12:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2011 17:36: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.12948537317059 (code B ref 7728); Wed, 12 Jan 2011 17:36:02 +0000 Original-Received: (at 7728) by debbugs.gnu.org; 12 Jan 2011 17:35:31 +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 1Pd4ba-0001pn-A4 for submit@debbugs.gnu.org; Wed, 12 Jan 2011 12:35:30 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Pd4bX-0001pa-IV for 7728@debbugs.gnu.org; Wed, 12 Jan 2011 12:35:29 -0500 Original-Received: (qmail invoked by alias); 12 Jan 2011 17:42:57 -0000 Original-Received: from 62-47-34-89.adsl.highway.telekom.at (EHLO [62.47.34.89]) [62.47.34.89] by mail.gmx.net (mp028) with SMTP; 12 Jan 2011 18:42:57 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18O28A8NIMOxx3z2up1TN3Hgdh3JQnvjIXY1Z6dWA 6ELEPddy1JijN6 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 12 Jan 2011 12:36: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:43303 Archived-At: This is a multi-part message in MIME format. --------------070608010403090906020005 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > Are you saying tha this isn't kosher, because the body of > save-window-excursion is not allowed to select a different frame? I doubt it's kosher because if the old selected window is not on the restored frame and a window on the restored frame gets selected, the point of the buffer whose window is deselected is not stored in the old selected window's pointm which is certainly not TRT. Inherently, the source of all evil is the idea to have (1) these two variables selected_frame and selected_window and (2) to allow setting them independently from each other. To avoid the present crash we could try something like the attached patch (which does not try to solve anything but that crash). martin --------------070608010403090906020005 Content-Type: text/plain; name="window.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="window.c.diff" *** c:/window.c 2011-01-07 08:25:53.406250000 +0100 --- c:/window.c 2011-01-12 18:25:01.859375000 +0100 *************** *** 158,163 **** --- 158,167 ---- static int window_initialized; + /* ... */ + + static int inhibit_point_swap; + /* Hook to run when window config changes. */ static Lisp_Object Qwindow_configuration_change_hook; *************** *** 3594,3600 **** /* Store the current buffer's actual point into the old selected window. It belongs to that window, and when the window is not selected, must be in the window. */ ! if (!NILP (selected_window)) { ow = XWINDOW (selected_window); if (! NILP (ow->buffer)) --- 3598,3606 ---- /* Store the current buffer's actual point into the old selected window. It belongs to that window, and when the window is not selected, must be in the window. */ ! if (inhibit_point_swap) ! inhibit_point_swap = 0; ! else { ow = XWINDOW (selected_window); if (! NILP (ow->buffer)) *************** *** 3602,3607 **** --- 3608,3615 ---- BUF_PT (XBUFFER (ow->buffer)), BUF_PT_BYTE (XBUFFER (ow->buffer))); } + else + inhibit_point_swap = 0; selected_window = window; *************** *** 5767,5773 **** /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer when passed below to set_marker_both. */ error ("move-to-window-line called from unrelated buffer"); ! window = selected_window; start = marker_position (w->start); if (start < BEGV || start > ZV) --- 5775,5781 ---- /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer when passed below to set_marker_both. */ error ("move-to-window-line called from unrelated buffer"); ! window = selected_window; start = marker_position (w->start); if (start < BEGV || start > ZV) *************** *** 6147,6153 **** /* Prevent "swapping out point" in the old selected window using the buffer that has been restored into it. We already swapped out point that from that window's old buffer. */ ! selected_window = Qnil; /* Arrange *not* to restore point in the buffer that was current when the window configuration was saved. */ --- 6155,6161 ---- /* Prevent "swapping out point" in the old selected window using the buffer that has been restored into it. We already swapped out point that from that window's old buffer. */ ! inhibit_point_swap = 1; /* Arrange *not* to restore point in the buffer that was current when the window configuration was saved. */ --------------070608010403090906020005--