From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: n142857@gmail.com, 73022@debbugs.gnu.org
Subject: bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size
Date: Wed, 11 Sep 2024 15:22:03 +0300 [thread overview]
Message-ID: <861q1qpehg.fsf@gnu.org> (raw)
In-Reply-To: <4c3591f1-7c26-489f-ba68-8586e98cd99e@gmx.at> (message from martin rudalics on Wed, 11 Sep 2024 10:07:21 +0200)
> Date: Wed, 11 Sep 2024 10:07:21 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 73022@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
>
> > For instance, Eli recently added this code (dispnew.c):
> >
> > /* This should never happen, but evidently sometimes does if one
> > resizes the frame quickly enough. Prevent aborts in cmcheckmagic. */
> > if (vpos >= FRAME_TOTAL_LINES (f))
> > return;
> >
> > But this is checking the *frame*. Later, the assertion in
> > cmcheckmagic will be made about the *terminal*.
>
> Right. This should probably be
>
> if (FRAME_TERMCAP_P (f) && vpos >= FrameRows (FRAME_TTY (f)))
> return;
That code is in update_frame_line, which is used only for TTY frames
and uses frame glyph matrices. IOW, it updates the entire frame as a
single large window. In addition, on a TTY terminal there's only one
frame visible at any given time, and only that one frame is being
redrawn, ever.
Given the above, why is that code incorrect?
> And it's not about resizing frames "quickly". Here I can crash it in a
> very slow fashion too.
Good for you, but my comment describes the situation in which I saw
that particular problem. As I already said, I can never crash Emacs
if I resize the terminal emulator window slowly.
> The cmcheckmagic code is about a very peculiar situation that is hardly
> relevant for today's terminals I think. Here I can never crash a build
> that doesn't check assertions.
Most probably because the terminal driver simply ignores such writes.
AFAIU, the assertion there is not because of the terminal, it is there
to catch Emacs bugs.
next prev parent reply other threads:[~2024-09-11 12:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 6:09 bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size Daniel Clemente
[not found] ` <handler.73022.B.172543028723315.ack@debbugs.gnu.org>
2024-09-04 6:25 ` bug#73022: Acknowledgement (31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size) Daniel Clemente
2024-09-04 7:28 ` bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-04 12:21 ` Eli Zaretskii
2024-09-04 13:23 ` Eli Zaretskii
2024-09-05 8:18 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 9:19 ` Eli Zaretskii
2024-09-05 14:46 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 14:58 ` Eli Zaretskii
2024-09-05 15:48 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 16:05 ` Eli Zaretskii
2024-09-05 16:30 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 16:58 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 18:41 ` Eli Zaretskii
2024-09-05 18:15 ` Eli Zaretskii
2024-09-08 11:07 ` Daniel Clemente
2024-09-08 14:36 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 8:18 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 9:18 ` Eli Zaretskii
2024-09-05 14:45 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 15:10 ` Eli Zaretskii
2024-09-05 16:27 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 11:08 ` Daniel Clemente
2024-09-08 11:31 ` Eli Zaretskii
2024-09-08 14:58 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-10 17:43 ` Daniel Clemente
2024-09-11 8:07 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 12:22 ` Eli Zaretskii [this message]
2024-09-11 14:37 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-11 15:06 ` Eli Zaretskii
2024-09-12 9:49 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 11:09 ` Daniel Clemente
2024-09-08 14:43 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 15:32 ` Eli Zaretskii
2024-09-08 17:01 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=861q1qpehg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73022@debbugs.gnu.org \
--cc=n142857@gmail.com \
--cc=rudalics@gmx.at \
/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).