Subject: bug#13007: 24.3.50; emacs_backtrace.txt

From: Dmitry Antipov <[email-masked]>
Date: Tue, 27 Nov 2012 20:49:44 +0400

On 11/27/2012 07:14 PM, Eli Zaretskii wrote:

> The crash is due to assertion violation here:
>
>    static int
>    window_outdated (struct window *w)
>    {
>      eassert (XBUFFER (w->buffer) == current_buffer);  <<<<<<<<<<<<<<<<<<
>      return (w->last_modified < MODIFF
> 	    || w->last_overlay_modified < OVERLAY_MODIFF);
>    }
>
> Dmitry, why did you add this assertion?  What code that you introduced
> assumes that this condition is always true?

This eassert was installed just to trap on the suspicious use cases as we found
in this bug :-).

> I suspect that we need to change this assertion to
>
>      eassert (MINI_WINDOW_P (w) || w->pseudo_window_p
>               || XBUFFER (w->buffer) == current_buffer);
>
> At least in this case (see the backtrace below), window_outdated is
> called from code that handles minibuffer windows, so I'm guessing the
> above assertion is not true.

Hm... this really helps to bypass eassert, but:

1) is it meaningful to compare w->last_modified of minibuffer window with
MODIFF? Shouldn't we compare it against BUFF_MODIFF of appropriate minibuffer?

2) is it possible to have an overlay in a minibuffer?

3) should window_outdated_p be applicable to pseudowindows at all?

Dmitry