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#13007: 24.3.50; emacs_backtrace.txt Date: Fri, 30 Nov 2012 11:53:11 +0200 Message-ID: <83a9tzv2m0.fsf@gnu.org> References: <9FE4F131C0C94FC79470495A8506A387@us.oracle.com> <83k3t7xemd.fsf@gnu.org> <50B4EF28.6040905@yandex.ru> <834nkbx7if.fsf@gnu.org> <50B5BB01.2070304@yandex.ru> <50B63309.1070404@yandex.ru> <838v9lwqvn.fsf@gnu.org> <50B6FE89.20304@yandex.ru> <83txs8uzkc.fsf@gnu.org> <50B79A19.2050707@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1354269258 6649 80.91.229.3 (30 Nov 2012 09:54:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2012 09:54:18 +0000 (UTC) Cc: 13007@debbugs.gnu.org, lekktu@gmail.com To: Dmitry Antipov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 30 10:54:29 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TeNId-0007Le-Nx for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Nov 2012 10:54:23 +0100 Original-Received: from localhost ([::1]:59954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeNIS-0005pa-Dk for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Nov 2012 04:54:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeNIK-0005jq-Ev for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2012 04:54:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeNIE-0000dm-Fx for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2012 04:54:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeNIE-0000di-CP for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2012 04:53:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TeNKE-0006dA-E9 for bug-gnu-emacs@gnu.org; Fri, 30 Nov 2012 04:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Nov 2012 09:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13007-submit@debbugs.gnu.org id=B13007.135426933525447 (code B ref 13007); Fri, 30 Nov 2012 09:56:02 +0000 Original-Received: (at 13007) by debbugs.gnu.org; 30 Nov 2012 09:55:35 +0000 Original-Received: from localhost ([127.0.0.1]:46215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeNJn-0006cO-9k for submit@debbugs.gnu.org; Fri, 30 Nov 2012 04:55:35 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:38668) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeNJk-0006cG-TR for 13007@debbugs.gnu.org; Fri, 30 Nov 2012 04:55:33 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MEA00H00OOZ9900@a-mtaout22.012.net.il> for 13007@debbugs.gnu.org; Fri, 30 Nov 2012 11:53:26 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MEA00HG4OT22760@a-mtaout22.012.net.il>; Fri, 30 Nov 2012 11:53:26 +0200 (IST) In-reply-to: <50B79A19.2050707@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67638 > Date: Thu, 29 Nov 2012 21:23:37 +0400 > From: Dmitry Antipov > CC: 13007@debbugs.gnu.org, lekktu@gmail.com, drew.adams@oracle.com > > On 11/29/2012 08:46 PM, Eli Zaretskii wrote: > > > For starters, can you tell what triggered the assertion violation in > > Juanma's case? IOW, how did we wind up in a situation where (AFAIU) > > the selected window displays a buffer other than the current one? > > IIUC, here is the sequence: > > Function set_window_buffer (W, B, ...) is called where W is selected_window > and XBUFFER (B) != current_buffer. This function temporary sets current > buffer to XBUFFER (B) to run hooks, and then restore old current_buffer [1]. > So, on exit we have XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer, > and these gets _finally_ synchronized only when read_key_sequence is called with > fix_current_buffer == true [2]. If redisplay is invoked between [1] and [2], > its routines may see the condition which was eassert'ed; _finally_ means > that some redisplay routines may do the synchronization temporary and > then restore original value of current buffer (see pos_visible_p for example). OK. So what do you suggest, in practical terms? Are you saying that we should use BUF_MODIFF(XBUFFER (w->buffer)) instead of MODIFF and BUF_OVERLAY_MODIFF(XBUFFER (w->buffer)) instead of OVERLAY_MODIFF inside window_outdated? Or do you suggest something else? I'm okay with using BUF_* macros in window_outdated. My reading of redisplay_internal is that it goes by the selected window, not assuming that the buffer of that window is the current buffer. But when redisplay_window is called, it temporarily selects the window's buffer as current buffer, and all the functions called by redisplay_window then rely on that. So if window_outdated is called not from redisplay_window or its subroutines, we cannot assume that current_buffer and the selected window's buffer are the same. Also, for minibuffer windows and pseudo-windows, we may need more care, but I'm not sure.