unofficial mirror of bug-gnu-emacs@gnu.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: Wed, 18 Aug 2021 20:01:52 +0300	[thread overview]
Message-ID: <838s0y4rgf.fsf@gnu.org> (raw)
In-Reply-To: <87y28yspf2.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 19:32:01 +0300)

> From: Juri Linkov <juri@linkov.net>
> Cc: 50096@debbugs.gnu.org
> Date: Wed, 18 Aug 2021 19:32:01 +0300
> 
> >> 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.
> 
> There are no buffer switching involved neither in the successful case
> nor in the failing case.

What is the "successful case" and what is the "failing case"?

I think we've just established that the reason for failure is a longer
line displayed in the mini-window with auto-hscrolling enabled.  So
the problem was probably there for quite some time, it just didn't
happen because two conditions are needed to trigger it:

 . a relatively long line displayed in the mini-window (rare)
 . auto-hscroll enabled in that window (even more rare)

As for switching buffers: how else can you explain that the window's
glyph matrix is correct for another buffer?  And, btw, what is the
value of it->w->contents inside init_to_row_start?  I mean here:

> #11 0x000055c2da79bf2e in init_to_row_start (it=0x7ffdc316c8c0, w=0x55c2dd062400, row=0x55c2e3f9fc50) at xdisp.c:3735

it->w->contents should be a buffer, but what buffer is that?

Also, what is the value of it->w->desired_matrix->buffer->name_ ?
It's a Lisp string, but what's its Lisp value?

> It's 100% reproducible for me, but I'm not sure how easy would be
> to create a test case for "emacs -Q".

I'd appreciate if you could try.

> >> 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?
> 
> It reduces the length of the displayed message,
> so there is no wrapped line and no hscrolling.

OK, thanks.





  reply	other threads:[~2021-08-18 17:01 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 [this message]
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=838s0y4rgf.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).