From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Clemente Newsgroups: gmane.emacs.bugs Subject: bug#71289: 30.0.50; cmcheckmagic aborts when tty_write_glyphs writes "Garbage collecting..." in some cases Date: Mon, 3 Jun 2024 15:35:20 +0000 Message-ID: References: <86o78mp6wg.fsf@gnu.org> <86cyp1q20h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006d7ec10619fe1628" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34141"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71289@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 03 20:23:20 2024 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 1sECL1-0008ab-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Jun 2024 20:23:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sECKZ-0007QD-Jb; Mon, 03 Jun 2024 14:22:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sECKX-0007Pz-Tr for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2024 14:22:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sECKX-0008Nr-On for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2024 14:22:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sECKk-0005Du-F9 for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2024 14:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Clemente Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jun 2024 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71289 X-GNU-PR-Package: emacs Original-Received: via spool by 71289-submit@debbugs.gnu.org id=B71289.171743896720033 (code B ref 71289); Mon, 03 Jun 2024 18:23:02 +0000 Original-Received: (at 71289) by debbugs.gnu.org; 3 Jun 2024 18:22:47 +0000 Original-Received: from localhost ([127.0.0.1]:55373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sECKT-0005D2-Vk for submit@debbugs.gnu.org; Mon, 03 Jun 2024 14:22:47 -0400 Original-Received: from mail-il1-f182.google.com ([209.85.166.182]:52652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sECKQ-0005Ch-7e for 71289@debbugs.gnu.org; Mon, 03 Jun 2024 14:22:43 -0400 Original-Received: by mail-il1-f182.google.com with SMTP id e9e14a558f8ab-37491216a2bso11363915ab.1 for <71289@debbugs.gnu.org>; Mon, 03 Jun 2024 11:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717438883; x=1718043683; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ei78Ga9ZSCF1M1PFBgdEA3EiSR0h+OuYqXpCYogNKZI=; b=BImcQkUk5msfhsP7glvlnDs5WF81z8JTjj06VYODBjcsh0tVnfw2Hgpd6levMJQp5T ZG1l4oOg+dYjEa+bIAlNDTbmaHmT5gEWaNZcLEHAqjV83BOT98Xu0yAwFAwTLC5q+yE/ P6as7ujb3kzchjoX3DzVKKfB35f1GpedmBD45bsduxfrxjmHHsOmZMuym2RLWCLuJoEq SQJ7I8N+YP3gKI+zl+CSXPOo5t1P+e/P0OC5ujogWYrb0RZ3lXBQZgbcTQMN0snmG4+t kzakRtmqQV26Ru3S9G5x0HKrxsOHn7qg2oUU/HaPJDra+j21oIIgxKjKrd+LvPYkHQ/M Ll4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717438883; x=1718043683; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ei78Ga9ZSCF1M1PFBgdEA3EiSR0h+OuYqXpCYogNKZI=; b=d2cruBU8ZaW4yzFFr7kEHfHRDAC2Wha5uy1z06Ps6IDA9cHM80paRobV6+5ncWBPfz 1/Y38RB92BWo1t25ZWpQmeDorw6YROOUBD9jCxd6ZNSx3w3B3eykwrvilCnHEURyEJW+ FWnZpXzIpjUgi4KCtUdMtbE/S8KR+RymSA1AW6yh46wcmZj8pgccxHSS0g4LFAVsUwma TlRtCcsw2DxQ75hjQ8lBxx3+cbPPdZw8e+ilyT2+m4+IU41niFmEI74iKFsIOxasHq/b OGZcRyw9q5EgEEK9122jZ8Llw3WFpdKl6oLyby4OM5R+yvkn2LgYmZtoiiP7yeSkqEQI acQw== X-Gm-Message-State: AOJu0YxbILYxaiaBhOVx3T8Z+4JpaQr+hHlVAek8F2jiJgK8LbUpS3eN 63wQZ01sWG3c1peCS/vPBc6azaCa6L32NHsMxGLo3Y2tF9Tt/B0UKaJZ7YAKHI3ZN4nvad1adRc TIwc8W1lpCVF8dle3W72ESrY3ordRuQ== X-Google-Smtp-Source: AGHT+IFwyzrOVimpL+12tR+cnQWQQZgISCGUlB8DuOIAH4/0O2CnLp++s9ctvlpPHvq8vWLP2KHHxLMLPb3s0nK/m2g= X-Received: by 2002:a05:6122:3611:b0:4eb:d47:a5b3 with SMTP id 71dfb90a1353d-4eb0d47b567mr4851861e0c.14.1717428948923; Mon, 03 Jun 2024 08:35:48 -0700 (PDT) In-Reply-To: <86cyp1q20h.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286482 Archived-At: --0000000000006d7ec10619fe1628 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable >> > At point cmcheckmagic, =C2=BFabort? 1. MagicWrap 1, curY 3, vs. 3 - 1.= Now >> tty has 3 rows, 14 cols > > So you are saying that the terminal lies to us? It has 3 rows, but > somehow wraps the cursor to the 4th row? What are the window and > frame dimensions at this point? I don't know enough to say whether the terminal is providing wrong numbers. But it seems that the positions and terminal dimensions aren't wrong, they're just outdated. They were right a moment ago (i.e. the terminal was really as large as reported) but I was resizing the window during a slow operation (GC) that was trying to display a message due to garbage-collection-messages t, and it seems that the GC message is using outdated information about the terminal size. That's my hypothesis. I have reproduced this in a more drastic way, e.g. the cursor in line 14 and the terminal being 4. At point cmcheckmagic, =C2=BFabort? 1. MagicWrap 1, curY 13, vs. 4 - 1. Now= tty has 4 rows, 80 cols > What are the window and > frame dimensions at this point? (I'm using the example mentioned above: 13, vs. 4 - 1). The frame seems 4 lines 80 columns. I'm not sure how to obtain the window dimensions from gdb, since there are several fields. Here are two attempts to get it, but total_cols/total_lines are 0 so it seems I'm not looking at the right fields. (gdb) bt #0 terminate_due_to_signal (sig=3D6, backtrace_limit=3D40) at emacs.c:443 #1 0x00005555556bdde1 in emacs_abort () at sysdep.c:2391 #2 0x0000555555669c8e in cmcheckmagic (tty=3D0x5555620ec360) at cm.c:124 #3 0x000055555566e1a0 in tty_write_glyphs (f=3D0x555562caa780, string=3D0x55555fb81720, len=3D80) at term.c:819 #4 0x0000555555678534 in write_glyphs (f=3D0x555562caa780, string=3D0x55555fb80820, len=3D80) at terminal.c:163 #5 0x0000555555591958 in update_frame_line (f=3D0x555562caa780, vpos=3D13, updating_menu_p=3Dfalse) at dispnew.c:5321 #6 0x0000555555590a43 in update_frame_1 (f=3D0x555562caa780, force_p=3Dtru= e, inhibit_id_p=3Dtrue, set_cursor_p=3Dtrue, updating_menu_p=3Dfalse) at dispnew.c:4980 #7 0x000055555558cfad in update_frame (f=3D0x555562caa780, force_p=3Dtrue, inhibit_hairy_id_p=3Dtrue) at dispnew.c:3346 #8 0x00005555555ca441 in echo_area_display (update_frame_p=3Dtrue) at xdisp.c:13487 #9 0x00005555555c63fb in message3_nolog (m=3DXIL(0x55555fcf7e54)) at xdisp.c:12385 #10 0x00005555555c64a7 in message1_nolog (m=3D0x55555586f976 "Garbage collecting...") at xdisp.c:12413 #11 0x0000555555732a80 in garbage_collect () at alloc.c:6587 #12 0x0000555555732817 in maybe_garbage_collect () at alloc.c:6507 #13 0x0000555555769a95 in maybe_gc () at /w/emacs/src/lisp.h:5927 #14 0x000055555576f4d7 in eval_sub (form=3DXIL(0x5555616dda13)) at eval.c:2= 502 #15 0x000055555576a6f5 in Fprogn (body=3DXIL(0)) at eval.c:439 #16 0x000055555576a725 in prog_ignore (body=3DXIL(0x5555616dd8f3)) at eval.c:450 #17 0x000055555576c30a in Fwhile (args=3DXIL(0x5555616dd803)) at eval.c:113= 0 #18 0x000055555576f82d in eval_sub (form=3DXIL(0x5555616dd7f3)) at eval.c:2= 549 #19 0x000055555576a6f5 in Fprogn (body=3DXIL(0x5555616dd923)) at eval.c:439 #20 0x000055555576beb8 in FletX (args=3DXIL(0x5555616dd7a3)) at eval.c:1042 #21 0x000055555576f82d in eval_sub (form=3DXIL(0x5555616dd793)) at eval.c:2= 549 (gdb) frame 3 #3 0x000055555566e1a0 in tty_write_glyphs (f=3D0x555562caa780, string=3D0x55555fb81720, len=3D80) at term.c:819 (gdb) p *f $1 =3D { header =3D { size =3D 4611686018595348501 }, name =3D XIL(0x55555ffbf4a4), icon_name =3D XIL(0), [=E2=80=A6] text_cols =3D 80, text_lines =3D 4, text_width =3D 80, text_height =3D 4, total_cols =3D 80, total_lines =3D 4, pixel_width =3D 80, pixel_height =3D 4, new_width =3D -1, new_height =3D -1, [=E2=80=A6] (gdb) p *((struct window*) f->selected_window) $6 =3D { header =3D { size =3D 6152702861785432064 }, frame =3D XIL(0x55), next =3D XIL(0x5562caa9a5000000), prev =3D XIL(0x556252b675000055), parent =3D XIL(0xfff21ef0c7000055), normal_lines =3D XIL(0xfff2ba75bf00007f), normal_cols =3D XIL(0x1a00007f), new_total =3D XIL(0), new_normal =3D XIL(0x1a000000), new_pixel =3D XIL(0x5559e3af55000000), contents =3D XIL(0x5559e3af55000055), old_buffer =3D XIL(0x555f92c855000055), start =3D XIL(0x5559d0c41d000055), pointm =3D XIL(0x55604735d5000055), old_pointm =3D XIL(0xa000055), temslot =3D XIL(0), vertical_scroll_bar =3D XIL(0x30000000), vertical_scroll_bar_type =3D XIL(0), horizontal_scroll_bar =3D XIL(0x30000000), horizontal_scroll_bar_type =3D XIL(0), display_table =3D XIL(0), dedicated =3D XIL(0), combination_limit =3D XIL(0x5562913c43000000), window_parameters =3D XIL(0x30000055), cursor_type =3D XIL(0x555fcf7c94000000), mode_line_help_echo =3D XIL(0x5562966770000055), current_matrix =3D 0x5562a39930000055, desired_matrix =3D 0x55641a3233000055, prev_buffers =3D XIL(0x55), next_buffers =3D XIL(0x3cb000000), use_time =3D 3019898880, sequence_number =3D 3103784960, change_stamp =3D 117440512, pixel_left =3D 0, pixel_top =3D 117440512, left_col =3D 1342177280, top_line =3D 100663296, pixel_width =3D 100663296, pixel_height =3D 335544320, old_pixel_width =3D 100663296, old_pixel_height =3D 318767104, old_body_pixel_width =3D 1342177280, old_body_pixel_height =3D 100663296, total_cols =3D 0, total_lines =3D 0, hscroll =3D 0, min_hscroll =3D 0, hscroll_whole =3D 0, last_modified =3D 0, last_overlay_modified =3D 4144676995072, last_point =3D 3548213411840, last_mark =3D 0, base_line_number =3D 0, base_line_pos =3D -16777216, column_number_displayed =3D 72057594071482367, nrows_scale_factor =3D 16777216, ncols_scale_factor =3D 150994944, cursor =3D { x =3D 16777216, --Type for more, q to quit, c to continue without paging-- y =3D 150994944, hpos =3D 0, vpos =3D 0 }, phys_cursor =3D { x =3D 0, y =3D 0, hpos =3D 0, vpos =3D 0 }, output_cursor =3D { x =3D 0, y =3D 0, hpos =3D 150994944, vpos =3D -16777216 }, last_cursor_vpos =3D -1, left_fringe_width =3D 16777215, right_fringe_width =3D 0, left_margin_cols =3D -16777216, right_margin_cols =3D -1, scroll_bar_width =3D 33554431, scroll_bar_height =3D -16777216, mode_line_height =3D -1, header_line_height =3D -2080374785, tab_line_height =3D 352, window_end_pos =3D 1441151881060548608, window_end_vpos =3D 260, mini =3D false, horizontal =3D false, update_mode_line =3D false, last_had_star =3D false, start_at_line_beg =3D false, force_start =3D false, optional_new_start =3D false, phys_cursor_on_p =3D false, cursor_off_p =3D false, last_cursor_off_p =3D false, must_be_updated_p =3D false, pseudo_window_p =3D false, fringes_outside_margins =3D false, fringes_persistent =3D false, scroll_bars_persistent =3D false, window_end_valid =3D false, redisplay =3D false, suspend_auto_hscroll =3D false, preserve_vscroll_p =3D false, vscroll =3D 419430400, window_end_bytepos =3D 281543696187392 } (gdb) p *((struct window*) f->root_window) $7 =3D { header =3D { size =3D 6152702861785432064 }, frame =3D XIL(0x55620a01ed000055), next =3D XIL(0x55), prev =3D XIL(0), parent =3D XIL(0xfff2ba41a7000000), normal_lines =3D XIL(0xfff2ba419f00007f), normal_cols =3D XIL(0x3600007f), new_total =3D XIL(0), new_normal =3D XIL(0x36000000), new_pixel =3D XIL(0x5562caa9a5000000), contents =3D XIL(0x55599fab25000055), old_buffer =3D XIL(0x55), start =3D XIL(0), pointm =3D XIL(0), old_pointm =3D XIL(0x2000000), temslot =3D XIL(0), vertical_scroll_bar =3D XIL(0x30000000), vertical_scroll_bar_type =3D XIL(0), horizontal_scroll_bar =3D XIL(0x30000000), horizontal_scroll_bar_type =3D XIL(0), display_table =3D XIL(0), dedicated =3D XIL(0), combination_limit =3D XIL(0), window_parameters =3D XIL(0x30000000), cursor_type =3D XIL(0), mode_line_help_echo =3D XIL(0), current_matrix =3D 0x0, desired_matrix =3D 0x555d5785a3000000, prev_buffers =3D XIL(0x55), next_buffers =3D XIL(0x290000000), use_time =3D 3003121664, sequence_number =3D 100663296, change_stamp =3D 0, pixel_left =3D 0, pixel_top =3D 0, left_col =3D 1342177280, top_line =3D 218103808, pixel_width =3D 1207959552, pixel_height =3D 805306368, old_pixel_width =3D 1207959552, old_pixel_height =3D 788529152, old_body_pixel_width =3D 1342177280, old_body_pixel_height =3D 218103808, total_cols =3D 0, total_lines =3D 0, hscroll =3D 0, min_hscroll =3D 0, hscroll_whole =3D 36758880256, last_modified =3D 3741319168, last_overlay_modified =3D 1599271337984, last_point =3D 1589456666624, last_mark =3D 18740150272, base_line_number =3D 0, base_line_pos =3D 989855744, column_number_displayed =3D 72057594054705152, nrows_scale_factor =3D 0, ncols_scale_factor =3D 0, cursor =3D { x =3D 0, --Type for more, q to quit, c to continue without paging-- y =3D 0, hpos =3D 0, vpos =3D 0 }, phys_cursor =3D { x =3D 0, y =3D 0, hpos =3D 0, vpos =3D 0 }, output_cursor =3D { x =3D 0, y =3D 0, hpos =3D 0, vpos =3D -16777216 }, last_cursor_vpos =3D -1, left_fringe_width =3D 16777215, right_fringe_width =3D 0, left_margin_cols =3D -16777216, right_margin_cols =3D -1, scroll_bar_width =3D 33554431, scroll_bar_height =3D -16777216, mode_line_height =3D -1, header_line_height =3D 16777215, tab_line_height =3D 0, window_end_pos =3D 1152921504606846976, window_end_vpos =3D 0, mini =3D false, horizontal =3D false, update_mode_line =3D false, last_had_star =3D false, start_at_line_beg =3D false, force_start =3D false, optional_new_start =3D false, phys_cursor_on_p =3D false, cursor_off_p =3D false, last_cursor_off_p =3D false, must_be_updated_p =3D false, pseudo_window_p =3D false, fringes_outside_margins =3D false, fringes_persistent =3D false, scroll_bars_persistent =3D false, window_end_valid =3D false, redisplay =3D false, suspend_auto_hscroll =3D false, preserve_vscroll_p =3D false, vscroll =3D 1191182336, window_end_bytepos =3D 6152702647217422336 } On Fri, 31 May 2024 at 18:18, Eli Zaretskii wrote: > > From: Daniel Clemente > > Date: Fri, 31 May 2024 17:07:45 +0000 > > Cc: 71289@debbugs.gnu.org > > > > > Thanks, but these backtraces are not enough, because they don't > > > explain why was emacs_abort called. We need to see all the values > > > involved in this condition: > > > > > > if (curX (tty) =3D=3D FrameCols (tty)) > > > { > > > if (!MagicWrap (tty) || curY (tty) >=3D FrameRows (tty) - 1) > <<<<<<<<<<< > > > emacs_abort (); > > > > > > These were the variables just before emacs_abort, and (abort=3D=3D1) wh= en > aborting. > > > > At point cmcheckmagic, =C2=BFabort? 0. MagicWrap 1, curY 0, vs. 3 - 1. = Now > > tty has 3 rows, 14 cols > > At point cmcheckmagic, =C2=BFabort? 0. MagicWrap 1, curY 1, vs. 3 - 1. = Now > > tty has 3 rows, 14 cols > > At point cmcheckmagic, =C2=BFabort? 1. MagicWrap 1, curY 3, vs. 3 - 1. = Now > > tty has 3 rows, 14 cols > > So you are saying that the terminal lies to us? It has 3 rows, but > somehow wraps the cursor to the 4th row? What are the window and > frame dimensions at this point? > --0000000000006d7ec10619fe1628 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>> > At point cmcheckmagic, =C2=BFabort? 1. MagicWrap 1, curY 3, vs. 3 - 1.= Now
>> tty has 3 rows, 14 cols
>
> So you are saying that the terminal lies to us?=C2=A0 = It has 3 rows, but
> somehow wraps the cursor to the 4th row?=C2=A0 What are the window and=
> frame dimensions at this point?

I don't k= now enough to say whether the terminal is providing wrong numbers.
But it seems that the positions and terminal dimensions aren't wrong,= they're just outdated. They were right a moment ago (i.e. the terminal= was really as large as reported) but I was resizing the window during a sl= ow operation (GC) that was trying to display a message due to garbage-colle= ction-messages t, and it seems that the GC message is using outdated inform= ation about the terminal size. That's my hypothesis.

I have reproduced this in a more drastic way, e.g. the cursor in lin= e 14 and the terminal being 4.

At point cmcheckmag= ic, =C2=BFabort? 1. MagicWrap 1, curY 13, vs. 4 - 1. Now tty has 4 rows, 80= cols


> What are the window and
> frame dimensions at this point?

(I'm= using the example mentioned above: 13, vs. 4 - 1).
The frame see= ms 4 lines 80 columns.
I'm not sure how to obtain the win= dow dimensions from gdb, since there are several fields. Here are two attem= pts to get it, but total_cols/total_lines are 0 so it seems I'm not loo= king at the right fields.

(gdb) bt
#0 =C2=A0terminate_= due_to_signal (sig=3D6, backtrace_limit=3D40) at emacs.c:443
#1 =C2=A00x= 00005555556bdde1 in emacs_abort () at sysdep.c:2391
#2 =C2=A00x000055555= 5669c8e in cmcheckmagic (tty=3D0x5555620ec360) at cm.c:124
#3 =C2=A00x00= 0055555566e1a0 in tty_write_glyphs (f=3D0x555562caa780, string=3D0x55555fb8= 1720, len=3D80) at term.c:819
#4 =C2=A00x0000555555678534 in write_glyph= s (f=3D0x555562caa780, string=3D0x55555fb80820, len=3D80) at terminal.c:163=
#5 =C2=A00x0000555555591958 in update_frame_line (f=3D0x555562caa780, v= pos=3D13, updating_menu_p=3Dfalse) at dispnew.c:5321
#6 =C2=A00x00005555= 55590a43 in update_frame_1 (f=3D0x555562caa780, force_p=3Dtrue, inhibit_id_= p=3Dtrue, set_cursor_p=3Dtrue,
=C2=A0 =C2=A0 updating_menu_p=3Dfalse) a= t dispnew.c:4980
#7 =C2=A00x000055555558cfad in update_frame (f=3D0x5555= 62caa780, force_p=3Dtrue, inhibit_hairy_id_p=3Dtrue) at dispnew.c:3346
#= 8 =C2=A00x00005555555ca441 in echo_area_display (update_frame_p=3Dtrue) at = xdisp.c:13487
#9 =C2=A00x00005555555c63fb in message3_nolog (m=3DXIL(0x5= 5555fcf7e54)) at xdisp.c:12385
#10 0x00005555555c64a7 in message1_nolog = (m=3D0x55555586f976 "Garbage collecting...") at xdisp.c:12413
= #11 0x0000555555732a80 in garbage_collect () at alloc.c:6587
#12 0x00005= 55555732817 in maybe_garbage_collect () at alloc.c:6507
#13 0x0000555555= 769a95 in maybe_gc () at /w/emacs/src/lisp.h:5927
#14 0x000055555576f4d7= in eval_sub (form=3DXIL(0x5555616dda13)) at eval.c:2502
#15 0x000055555= 576a6f5 in Fprogn (body=3DXIL(0)) at eval.c:439
#16 0x000055555576a725 i= n prog_ignore (body=3DXIL(0x5555616dd8f3)) at eval.c:450
#17 0x000055555= 576c30a in Fwhile (args=3DXIL(0x5555616dd803)) at eval.c:1130
#18 0x0000= 55555576f82d in eval_sub (form=3DXIL(0x5555616dd7f3)) at eval.c:2549
#19= 0x000055555576a6f5 in Fprogn (body=3DXIL(0x5555616dd923)) at eval.c:439#20 0x000055555576beb8 in FletX (args=3DXIL(0x5555616dd7a3)) at eval.c:104= 2
#21 0x000055555576f82d in eval_sub (form=3DXIL(0x5555616dd793)) at eva= l.c:2549

(gdb) frame 3
#3 =C2=A00x000055555= 566e1a0 in tty_write_glyphs (f=3D0x555562caa780, string=3D0x55555fb81720, l= en=3D80) at term.c:819
(gdb) p *f
$1 =3D {
=C2=A0 header = =3D {
=C2=A0 =C2=A0 size =3D 4611686018595348501
=C2=A0 },
=C2=A0 = name =3D XIL(0x55555ffbf4a4),
=C2=A0 icon_name =3D XIL(0),
[= =E2=80=A6]
=C2=A0 text_cols =3D 80,
=C2=A0 text_lines =3D = 4,
=C2=A0 text_width =3D 80,
=C2=A0 text_height =3D 4,
=C2=A0 tota= l_cols =3D 80,
=C2=A0 total_lines =3D 4,
=C2=A0 pixel_width =3D 80,=C2=A0 pixel_height =3D 4,
=C2=A0 new_width =3D -1,
=C2=A0 new_heig= ht =3D -1,
[=E2=80=A6]

(gdb) p *((st= ruct window*) f->selected_window)
$6 =3D {
=C2=A0 header =3D {
= =C2=A0 =C2=A0 size =3D 6152702861785432064
=C2=A0 },
=C2=A0 frame =3D= XIL(0x55),
=C2=A0 next =3D XIL(0x5562caa9a5000000),
=C2=A0 prev =3D = XIL(0x556252b675000055),
=C2=A0 parent =3D XIL(0xfff21ef0c7000055),
= =C2=A0 normal_lines =3D XIL(0xfff2ba75bf00007f),
=C2=A0 normal_cols =3D = XIL(0x1a00007f),
=C2=A0 new_total =3D XIL(0),
=C2=A0 new_normal =3D X= IL(0x1a000000),
=C2=A0 new_pixel =3D XIL(0x5559e3af55000000),
=C2=A0 = contents =3D XIL(0x5559e3af55000055),
=C2=A0 old_buffer =3D XIL(0x555f92= c855000055),
=C2=A0 start =3D XIL(0x5559d0c41d000055),
=C2=A0 pointm = =3D XIL(0x55604735d5000055),
=C2=A0 old_pointm =3D XIL(0xa000055),
= =C2=A0 temslot =3D XIL(0),
=C2=A0 vertical_scroll_bar =3D XIL(0x30000000= ),
=C2=A0 vertical_scroll_bar_type =3D XIL(0),
=C2=A0 horizontal_scro= ll_bar =3D XIL(0x30000000),
=C2=A0 horizontal_scroll_bar_type =3D XIL(0)= ,
=C2=A0 display_table =3D XIL(0),
=C2=A0 dedicated =3D XIL(0),
= =C2=A0 combination_limit =3D XIL(0x5562913c43000000),
=C2=A0 window_para= meters =3D XIL(0x30000055),
=C2=A0 cursor_type =3D XIL(0x555fcf7c9400000= 0),
=C2=A0 mode_line_help_echo =3D XIL(0x5562966770000055),
=C2=A0 cu= rrent_matrix =3D 0x5562a39930000055,
=C2=A0 desired_matrix =3D 0x55641a3= 233000055,
=C2=A0 prev_buffers =3D XIL(0x55),
=C2=A0 next_buffers =3D= XIL(0x3cb000000),
=C2=A0 use_time =3D 3019898880,
=C2=A0 sequence_nu= mber =3D 3103784960,
=C2=A0 change_stamp =3D 117440512,
=C2=A0 pixel_= left =3D 0,
=C2=A0 pixel_top =3D 117440512,
=C2=A0 left_col =3D 13421= 77280,
=C2=A0 top_line =3D 100663296,
=C2=A0 pixel_width =3D 10066329= 6,
=C2=A0 pixel_height =3D 335544320,
=C2=A0 old_pixel_width =3D 1006= 63296,
=C2=A0 old_pixel_height =3D 318767104,
=C2=A0 old_body_pixel_w= idth =3D 1342177280,
=C2=A0 old_body_pixel_height =3D 100663296,
=C2= =A0 total_cols =3D 0,
=C2=A0 total_lines =3D 0,
=C2=A0 hscroll =3D 0,=
=C2=A0 min_hscroll =3D 0,
=C2=A0 hscroll_whole =3D 0,
=C2=A0 last= _modified =3D 0,
=C2=A0 last_overlay_modified =3D 4144676995072,
=C2= =A0 last_point =3D 3548213411840,
=C2=A0 last_mark =3D 0,
=C2=A0 base= _line_number =3D 0,
=C2=A0 base_line_pos =3D -16777216,
=C2=A0 column= _number_displayed =3D 72057594071482367,
=C2=A0 nrows_scale_factor =3D 1= 6777216,
=C2=A0 ncols_scale_factor =3D 150994944,
=C2=A0 cursor =3D {=
=C2=A0 =C2=A0 x =3D 16777216,
--Type <RET> for more, q to quit= , c to continue without paging--
=C2=A0 =C2=A0 y =3D 150994944,
=C2= =A0 =C2=A0 hpos =3D 0,
=C2=A0 =C2=A0 vpos =3D 0
=C2=A0 },
=C2=A0 p= hys_cursor =3D {
=C2=A0 =C2=A0 x =3D 0,
=C2=A0 =C2=A0 y =3D 0,
=C2= =A0 =C2=A0 hpos =3D 0,
=C2=A0 =C2=A0 vpos =3D 0
=C2=A0 },
=C2=A0 o= utput_cursor =3D {
=C2=A0 =C2=A0 x =3D 0,
=C2=A0 =C2=A0 y =3D 0,
= =C2=A0 =C2=A0 hpos =3D 150994944,
=C2=A0 =C2=A0 vpos =3D -16777216
= =C2=A0 },
=C2=A0 last_cursor_vpos =3D -1,
=C2=A0 left_fringe_width = =3D 16777215,
=C2=A0 right_fringe_width =3D 0,
=C2=A0 left_margin_col= s =3D -16777216,
=C2=A0 right_margin_cols =3D -1,
=C2=A0 scroll_bar_w= idth =3D 33554431,
=C2=A0 scroll_bar_height =3D -16777216,
=C2=A0 mod= e_line_height =3D -1,
=C2=A0 header_line_height =3D -2080374785,
=C2= =A0 tab_line_height =3D 352,
=C2=A0 window_end_pos =3D 14411518810605486= 08,
=C2=A0 window_end_vpos =3D 260,
=C2=A0 mini =3D false,
=C2=A0 = horizontal =3D false,
=C2=A0 update_mode_line =3D false,
=C2=A0 last_= had_star =3D false,
=C2=A0 start_at_line_beg =3D false,
=C2=A0 force_= start =3D false,
=C2=A0 optional_new_start =3D false,
=C2=A0 phys_cur= sor_on_p =3D false,
=C2=A0 cursor_off_p =3D false,
=C2=A0 last_cursor= _off_p =3D false,
=C2=A0 must_be_updated_p =3D false,
=C2=A0 pseudo_w= indow_p =3D false,
=C2=A0 fringes_outside_margins =3D false,
=C2=A0 f= ringes_persistent =3D false,
=C2=A0 scroll_bars_persistent =3D false,=C2=A0 window_end_valid =3D false,
=C2=A0 redisplay =3D false,
=C2= =A0 suspend_auto_hscroll =3D false,
=C2=A0 preserve_vscroll_p =3D false,=
=C2=A0 vscroll =3D 419430400,
=C2=A0 window_end_bytepos =3D 28154369= 6187392
}
(gdb) p *((struct window*) f->root_window)
$7 =3D {=C2=A0 header =3D {
=C2=A0 =C2=A0 size =3D 6152702861785432064
=C2= =A0 },
=C2=A0 frame =3D XIL(0x55620a01ed000055),
=C2=A0 next =3D XIL(= 0x55),
=C2=A0 prev =3D XIL(0),
=C2=A0 parent =3D XIL(0xfff2ba41a70000= 00),
=C2=A0 normal_lines =3D XIL(0xfff2ba419f00007f),
=C2=A0 normal_c= ols =3D XIL(0x3600007f),
=C2=A0 new_total =3D XIL(0),
=C2=A0 new_norm= al =3D XIL(0x36000000),
=C2=A0 new_pixel =3D XIL(0x5562caa9a5000000),=C2=A0 contents =3D XIL(0x55599fab25000055),
=C2=A0 old_buffer =3D XIL(= 0x55),
=C2=A0 start =3D XIL(0),
=C2=A0 pointm =3D XIL(0),
=C2=A0 o= ld_pointm =3D XIL(0x2000000),
=C2=A0 temslot =3D XIL(0),
=C2=A0 verti= cal_scroll_bar =3D XIL(0x30000000),
=C2=A0 vertical_scroll_bar_type =3D = XIL(0),
=C2=A0 horizontal_scroll_bar =3D XIL(0x30000000),
=C2=A0 hori= zontal_scroll_bar_type =3D XIL(0),
=C2=A0 display_table =3D XIL(0),
= =C2=A0 dedicated =3D XIL(0),
=C2=A0 combination_limit =3D XIL(0),
=C2= =A0 window_parameters =3D XIL(0x30000000),
=C2=A0 cursor_type =3D XIL(0)= ,
=C2=A0 mode_line_help_echo =3D XIL(0),
=C2=A0 current_matrix =3D 0x= 0,
=C2=A0 desired_matrix =3D 0x555d5785a3000000,
=C2=A0 prev_buffers = =3D XIL(0x55),
=C2=A0 next_buffers =3D XIL(0x290000000),
=C2=A0 use_t= ime =3D 3003121664,
=C2=A0 sequence_number =3D 100663296,
=C2=A0 chan= ge_stamp =3D 0,
=C2=A0 pixel_left =3D 0,
=C2=A0 pixel_top =3D 0,
= =C2=A0 left_col =3D 1342177280,
=C2=A0 top_line =3D 218103808,
=C2=A0= pixel_width =3D 1207959552,
=C2=A0 pixel_height =3D 805306368,
=C2= =A0 old_pixel_width =3D 1207959552,
=C2=A0 old_pixel_height =3D 78852915= 2,
=C2=A0 old_body_pixel_width =3D 1342177280,
=C2=A0 old_body_pixel_= height =3D 218103808,
=C2=A0 total_cols =3D 0,
=C2=A0 total_lines =3D= 0,
=C2=A0 hscroll =3D 0,
=C2=A0 min_hscroll =3D 0,
=C2=A0 hscroll= _whole =3D 36758880256,
=C2=A0 last_modified =3D 3741319168,
=C2=A0 l= ast_overlay_modified =3D 1599271337984,
=C2=A0 last_point =3D 1589456666= 624,
=C2=A0 last_mark =3D 18740150272,
=C2=A0 base_line_number =3D 0,=
=C2=A0 base_line_pos =3D 989855744,
=C2=A0 column_number_displayed = =3D 72057594054705152,
=C2=A0 nrows_scale_factor =3D 0,
=C2=A0 ncols_= scale_factor =3D 0,
=C2=A0 cursor =3D {
=C2=A0 =C2=A0 x =3D 0,
--T= ype <RET> for more, q to quit, c to continue without paging--
=C2= =A0 =C2=A0 y =3D 0,
=C2=A0 =C2=A0 hpos =3D 0,
=C2=A0 =C2=A0 vpos =3D = 0
=C2=A0 },
=C2=A0 phys_cursor =3D {
=C2=A0 =C2=A0 x =3D 0,
=C2= =A0 =C2=A0 y =3D 0,
=C2=A0 =C2=A0 hpos =3D 0,
=C2=A0 =C2=A0 vpos =3D = 0
=C2=A0 },
=C2=A0 output_cursor =3D {
=C2=A0 =C2=A0 x =3D 0,
= =C2=A0 =C2=A0 y =3D 0,
=C2=A0 =C2=A0 hpos =3D 0,
=C2=A0 =C2=A0 vpos = =3D -16777216
=C2=A0 },
=C2=A0 last_cursor_vpos =3D -1,
=C2=A0 lef= t_fringe_width =3D 16777215,
=C2=A0 right_fringe_width =3D 0,
=C2=A0 = left_margin_cols =3D -16777216,
=C2=A0 right_margin_cols =3D -1,
=C2= =A0 scroll_bar_width =3D 33554431,
=C2=A0 scroll_bar_height =3D -1677721= 6,
=C2=A0 mode_line_height =3D -1,
=C2=A0 header_line_height =3D 1677= 7215,
=C2=A0 tab_line_height =3D 0,
=C2=A0 window_end_pos =3D 1152921= 504606846976,
=C2=A0 window_end_vpos =3D 0,
=C2=A0 mini =3D false,=C2=A0 horizontal =3D false,
=C2=A0 update_mode_line =3D false,
=C2= =A0 last_had_star =3D false,
=C2=A0 start_at_line_beg =3D false,
=C2= =A0 force_start =3D false,
=C2=A0 optional_new_start =3D false,
=C2= =A0 phys_cursor_on_p =3D false,
=C2=A0 cursor_off_p =3D false,
=C2=A0= last_cursor_off_p =3D false,
=C2=A0 must_be_updated_p =3D false,
=C2= =A0 pseudo_window_p =3D false,
=C2=A0 fringes_outside_margins =3D false,=
=C2=A0 fringes_persistent =3D false,
=C2=A0 scroll_bars_persistent = =3D false,
=C2=A0 window_end_valid =3D false,
=C2=A0 redisplay =3D fa= lse,
=C2=A0 suspend_auto_hscroll =3D false,
=C2=A0 preserve_vscroll_p= =3D false,
=C2=A0 vscroll =3D 1191182336,
=C2=A0 window_end_bytepos = =3D 6152702647217422336
}



On Fri, 31 May 2024 at 18:18, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Daniel Clemente <<= a href=3D"mailto:n142857@gmail.com" target=3D"_blank">n142857@gmail.com= >
> Date: Fri, 31 May 2024 17:07:45 +0000
> Cc: 71289@d= ebbugs.gnu.org
>
> > Thanks, but these backtraces are not enough, because they don'= ;t
> > explain why was emacs_abort called.=C2=A0 We need to see all the = values
> > involved in this condition:
> >
> >=C2=A0 if (curX (tty) =3D=3D FrameCols (tty))
> >=C2=A0 =C2=A0 {
> >=C2=A0 =C2=A0 =C2=A0 if (!MagicWrap (tty) || curY (tty) >=3D Fr= ameRows (tty) - 1) <<<<<<<<<<<
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 emacs_abort ();
>
>
> These were the variables just before emacs_abort, and (abort=3D=3D1) w= hen aborting.
>
> At point cmcheckmagic, =C2=BFabort? 0. MagicWrap 1, curY 0, vs. 3 - 1.= Now
> tty has 3 rows, 14 cols
> At point cmcheckmagic, =C2=BFabort? 0. MagicWrap 1, curY 1, vs. 3 - 1.= Now
> tty has 3 rows, 14 cols
> At point cmcheckmagic, =C2=BFabort? 1. MagicWrap 1, curY 3, vs. 3 - 1.= Now
> tty has 3 rows, 14 cols

So you are saying that the terminal lies to us?=C2=A0 It has 3 rows, but somehow wraps the cursor to the 4th row?=C2=A0 What are the window and
frame dimensions at this point?
--0000000000006d7ec10619fe1628--