all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 50096@debbugs.gnu.org
Subject: bug#50096: args-out-of-range in redisplay_internal
Date: Thu, 19 Aug 2021 10:32:14 +0300	[thread overview]
Message-ID: <835yw13n5u.fsf@gnu.org> (raw)
In-Reply-To: <87im03tc6g.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 10:42:23 +0300)

> From: Juri Linkov <juri@linkov.net>
> Cc: 50096@debbugs.gnu.org
> Date: Wed, 18 Aug 2021 10:42:23 +0300
> 
> 1. message3_nolog calls echo_area_display
> 2. echo_area_display calls redisplay_internal

This step 2 happens only if display of the mini-window needs to resize
the mini-window for some reason.  When that happens, we need to
perform a thorough redisplay (as opposed to just redisplaying the
mini-window), because the bottom-most window needs to be resized as
result of resizing the mini-window.

> 3. redisplay_internal clears all matrices with clear_desired_matrices
> 4. redisplay_internal calls echo_area_display
>    that temporarily changes mini_window's buffer
>    from " *Minibuf-0*" to " *Echo Area 0*".
>    This updates w->desired_matrix to contain information
>    about " *Echo Area 0*" displayed in the mini_window.
>    But unwind_with_echo_area_buffer immediately
>    changes mini_window's buffer back to empty " *Minibuf-0*".
> 5. redisplay_internal calls hscroll_window_tree
>    where cursor_row already contains information
>    that was valid when " *Echo Area 0*" was temporarily
>    displayed in mini_window:

And step 5 says that you have somehow set up auto-hscroll in the
mini-window.  Which means the lines in the mini-window are truncated?
Does that also mean you set max-mini-window-height to 1?  But if so,
how come Emacs decided above that the mini-window needs to be resized?

So please show your customizations that seem to be parts of this
puzzle.  I think if these customizations are set up, a simple call to
'message' with a long enough string should be able to reproduce the
problem and allow debugging it.

> (gdb) l
> 14896		    cursor_row = MATRIX_ROW (w->desired_matrix, w->cursor.vpos);
> (gdb) p *cursor_row
> ...
>   start = {
>     pos = {
>       charpos = 1737,
>       bytepos = 1737
>     },
> ...
>   end = {
>     pos = {
>       charpos = 2150,
>       bytepos = 2150
> 
> These numbers are valid positions in " *Echo Area 0*"
> that was temporarily displayed in mini_window,
> but now mini_window's buffer is empty " *Minibuf-0*".

This means that the window's desired_matrix was produced for another
buffer, and is no longer valid.  That buffer is supposed to be
recorded in desired_matrix->buffer, please show it.





      parent reply	other threads:[~2021-08-19  7:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 16:06 bug#50096: args-out-of-range in redisplay_internal Juri Linkov
2021-08-17 17:18 ` Eli Zaretskii
2021-08-17 17:30   ` Juri Linkov
2021-08-17 17:51     ` Juri Linkov
2021-08-17 18:16       ` Eli Zaretskii
2021-08-17 18:24         ` Juri Linkov
2021-08-17 18:40           ` Eli Zaretskii
2021-08-17 18:51             ` Juri Linkov
2021-08-17 19:00               ` Eli Zaretskii
2021-08-18  7:42                 ` Juri Linkov
2021-08-18 12:18                   ` Eli Zaretskii
2021-08-18 16:32                     ` Juri Linkov
2021-08-18 17:01                       ` Eli Zaretskii
2021-08-18 18:07                         ` Eli Zaretskii
2021-08-19  7:17                           ` Juri Linkov
2021-08-19  8:12                             ` Eli Zaretskii
2021-08-19 12:39                               ` Eli Zaretskii
2021-08-20  7:09                                 ` Juri Linkov
2021-08-20  7:49                                   ` Eli Zaretskii
2021-08-19  7:32                   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835yw13n5u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=50096@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.