From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50096: args-out-of-range in redisplay_internal Date: Wed, 18 Aug 2021 20:01:52 +0300 Message-ID: <838s0y4rgf.fsf@gnu.org> References: <87r1esys1a.fsf@mail.linkov.net> <83v94456sn.fsf@gnu.org> <87h7foyo67.fsf@mail.linkov.net> <87im04x8mm.fsf@mail.linkov.net> <83sfz8543o.fsf@gnu.org> <874kbox736.fsf@mail.linkov.net> <83mtpf6hjb.fsf@gnu.org> <87eearx5tz.fsf@mail.linkov.net> <83k0kj6gmq.fsf@gnu.org> <87im03tc6g.fsf@mail.linkov.net> <834kbn54kq.fsf@gnu.org> <87y28yspf2.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8600"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50096@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 18 19:03:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGOyE-00022U-4o for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 19:03:18 +0200 Original-Received: from localhost ([::1]:49202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGOyC-0001be-U5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 13:03:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGOxy-0001XM-8w for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:03:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45908) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGOxy-0004IU-2J for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGOxx-0002aS-NX for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Aug 2021 17:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50096 X-GNU-PR-Package: emacs Original-Received: via spool by 50096-submit@debbugs.gnu.org id=B50096.16293061309875 (code B ref 50096); Wed, 18 Aug 2021 17:03:01 +0000 Original-Received: (at 50096) by debbugs.gnu.org; 18 Aug 2021 17:02:10 +0000 Original-Received: from localhost ([127.0.0.1]:57454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOx4-0002Z7-BA for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:02:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGOwz-0002YX-HD for 50096@debbugs.gnu.org; Wed, 18 Aug 2021 13:02:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57134) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGOws-0003sX-GY; Wed, 18 Aug 2021 13:01:55 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2809 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGOwr-0001l1-QS; Wed, 18 Aug 2021 13:01:54 -0400 In-Reply-To: <87y28yspf2.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 19:32:01 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212164 Archived-At: > From: Juri Linkov > 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.