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: Wed, 18 Aug 2021 15:18:29 +0300 [thread overview]
Message-ID: <834kbn54kq.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
>
> >> (gdb) xstring
> >> $8 = (struct Lisp_String *) 0x7f015341fb80
> >> " *Minibuf-0*"
> >
> > Hm... something else is at work here.
>
> I don't understand how this is supposed to work. The buffer " *Minibuf-0*"
> is always empty at the time of calling message3_nolog, whereas the buffer
> " *Echo Area 0*" contains the message to display.
Yes, some code switches to another buffer at the wrong moment.
> The steps are following:
>
> 1. message3_nolog calls echo_area_display
> 2. echo_area_display calls redisplay_internal
> 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:
Any idea why we call hscroll_window_tree in this case? I'm guessing
this is due to some customizations of yours, in which case I'd
appreciate a reproduction recipe starting from "emacs -Q". It is very
hard to debug such problems via email.
> > You are saying that if you remove the ":(literal)" part without
> > changing anything else, the problem goes away?
>
> Indeed, it broke after the commit 3572613550.
> But after applying this patch it works again without errors:
Does this patch work by preventing hscrolling?
> I guess additional ":(literal)" string increases the length
> of the displayed message, and longer message triggers the bug.
How does it trigger it? via hscrolling or some other way?
next prev parent reply other threads:[~2021-08-18 12:18 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834kbn54kq.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).