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#71475: 30.0.50; crash in adjust_frame_glyphs (called by delete_frame) Date: Mon, 10 Jun 2024 15:58:33 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14859"; mail-complaints-to="usenet@ciao.gmane.io" To: 71475@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 18:41:27 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 1sGi5G-0003kY-EQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 18:41:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGi4e-00058e-4w; Mon, 10 Jun 2024 12:40:48 -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 1sGi4c-00057a-0a for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 12:40:46 -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 1sGi4b-0001e9-Nr for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 12:40:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGi4s-0005Am-Ln for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 12:41: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, 10 Jun 2024 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71475 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171803762319708 (code B ref -1); Mon, 10 Jun 2024 16:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jun 2024 16:40:23 +0000 Original-Received: from localhost ([127.0.0.1]:45606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGi4E-00057i-E6 for submit@debbugs.gnu.org; Mon, 10 Jun 2024 12:40:23 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGhwc-0004k3-T7 for submit@debbugs.gnu.org; Mon, 10 Jun 2024 12:32:32 -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 1sGhQF-0005J9-Dt for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 11:59:03 -0400 Original-Received: from mail-vs1-xe33.google.com ([2607:f8b0:4864:20::e33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGhQD-0007W2-3r for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 11:59:03 -0400 Original-Received: by mail-vs1-xe33.google.com with SMTP id ada2fe7eead31-48c482acdb0so344506137.3 for ; Mon, 10 Jun 2024 08:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718035139; x=1718639939; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JsdvSjqkwe739AsBA4ocugdcFzqptsrzjADSXHt9ULc=; b=h4b6dViNmKsPiq+AFTGTVIfssf/+dl5dp45iGR3AngbwlCW5IYsevn3Qm9slZmpz8a nuPVaDFQQXNG+vlAEdh7cQpMAP2Zio/5LZUlSKYLLMYn0bGqknu1aSjhrzMmEbBWQ0F/ T3Wzg66KErXwKFdxsQ5PM+bwtOt/x0mX4homm/X8YcMUF3VZd64bhVCd2nBj1eqxqXe3 wqy8AFnv5/AH0keWfNSpvdkJ88WeHbS59DTOhqm0F4mh2Yqx4KyWOIjsOrNi8Kj8+ie0 cHjGmLrm/GQkIQxECcDH5dOLBW7GnGr8fTLXtQiAuQI7/kJPTE8npTH5xYyuGvFLXAHC ML+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718035139; x=1718639939; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JsdvSjqkwe739AsBA4ocugdcFzqptsrzjADSXHt9ULc=; b=wesFFlfAi0K6M14QTRwa+mAr1K0Ej0uY56nufEBCewRcpoZ2BJDb6FuWcHocWQr3Pw cOkO+cVc+zhUZny1tlts5lGh2EpbYMmIEc1m+Vciliydd4xQ1vu6VWrz7qm1qiGZU5o6 MmY+FMhbDgD7JM7MUNPsPXRk2nHoPs5Nw1UYzWPUNEVT1TrL0+8FR2jlmoC08bY/c999 l++tXGbuqKHXlAEdjPA7yeghL7cAQrI5RqIVGDQqTo4Q59wCv2ETc94pehEt0WvEHovF Om8GxngXpfGE4VK5JTTdtxluaCWy4RCiYvWTEtHTa8zMpQ/7LDV2LmZGbGRZFJjGWpBi wE1g== X-Gm-Message-State: AOJu0YxHP/Xkc70/VCfJAHq3rcztyluwy+/kEkOsiZy3D8eJuZer4YXT NQgrQkQpE0JKcK7drX3/8SZg9g+9hyaFKy3pQoncne/sdaIX74YaSvtG+taoOhHrmleba/vGcPG BMLoGJ9tf1wNtFjvM3RVuhU5pJxDs2z6Y X-Google-Smtp-Source: AGHT+IHg1j6vBExD49rehpbh6VfYNun60+JTGA84C7V5HxCivbr84bEqUfPkJq5wf13HAXN+lo9qjaCfJ3vjNUUftHY= X-Received: by 2002:a05:6102:2a67:b0:48c:54e8:e08a with SMTP id ada2fe7eead31-48c54e8e122mr3166695137.32.1718035139423; Mon, 10 Jun 2024 08:58:59 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::e33; envelope-from=n142857@gmail.com; helo=mail-vs1-xe33.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:287051 Archived-At: This is a continuation of bug 71224 and it may be a similar issue. I'm using Emacs without X support but running it in an X terminal. With glyph debug enabled. emacsclient, with -Q. I was using the same reproduction procedure as in bug 71224. So I was randomly mixing these 4 actions: - call to (debug) to open a backtrace window - call to (recurse) to cause an error - open a new frame - close a frame In the beginning I was using this for-loop to cause more stress by opening lots of frames, but I think it's not needed; the crash also happened when I just had 2 manually opened frames. for j in `seq 100`; do for i in `seq 10`; do urxvt -e emacsclient '-nw' '-e' '(dired "~")' &; done; sleep 7 && killall emacsclient; done Apparently we're in a case in which the frame's glyph matrix exists but it has 0 rows, and adjust_frame_glyphs doesn't like that. Backtraces+variables follow. Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2=80=99: 1622 Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2=80=99: 1622 dispnew.c:1851: Emacs fatal error: assertion failed: FRAME_INITIAL_P (f) || noninteractive || !initialized || (f->current_matrix && f->current_matrix->nrows > 0 && f->current_matrix->rows && f->desired_matrix && f->desired_matrix->nrows > 0 && f->desired_matrix->rows) Breakpoint 1, terminate_due_to_signal (sig=3D6, backtrace_limit=3D2147483647) at emacs.c:443 443 signal (sig, SIG_DFL); (gdb) bt #0 terminate_due_to_signal (sig=3D6, backtrace_limit=3D2147483647) at emac= s.c:443 #1 0x0000555555735324 in die ( msg=3D0x55555584e4e8 "FRAME_INITIAL_P (f) || noninteractive || !initialized || (f->current_matrix && f->current_matrix->nrows > 0 && f->current_matrix->rows && f->desired_matrix && f->desired_matrix->nrows > 0 && f->desire"..., file=3D0x55555584e231 "dispnew.c", line=3D1851) at alloc.c:8082 #2 0x0000555555589ecc in adjust_frame_glyphs (f=3D0x555556438e00) at dispnew.c:1851 #3 0x0000555555617fe0 in apply_window_adjustment (w=3D0x5555564392b8) at window.c:7848 #4 0x000055555560c18a in set_window_buffer (window=3DXIL(0x5555564392bd), buffer=3DXIL(0x7ffff2090c65), run_hooks_p=3Dfalse, keep_margins_p=3Dfalse) at window.c:4189 #5 0x00005555556e157b in zip_minibuffer_stacks (dest_window=3DXIL(0x555555fdd67d), source_window=3DXIL(0x5555564392bd)) at minibuf.c:185 #6 0x00005555556e16f2 in move_minibuffers_onto_frame (of=3D0x555556438e00, frame=3DXIL(0x555555fdd1c5), for_deletion=3Dtrue) at minibuf.c:209 #7 0x000055555559c8ca in delete_frame (frame=3DXIL(0x555556438e05), force=3DXIL(0xc1e0)) at frame.c:2232 #8 0x000055555567814d in delete_terminal (terminal=3D0x55555649d9b0) at terminal.c:333 #9 0x00005555556771f0 in delete_tty (terminal=3D0x55555649d9b0) at term.c:= 4697 #10 0x0000555555678435 in Fdelete_terminal (terminal=3DXIL(0x55555649d9b5), force=3DXIL(0xc1e0)) at terminal.c:398 #11 0x00005555556a0239 in gobble_input () at keyboard.c:7931 #12 0x0000555555697d62 in kbd_buffer_get_event (kbp=3D0x7fffffeff208, used_mouse_menu=3D0x0, end_time=3D0x7fffffeff880) at keyboard.c:4036 (gdb) xbacktrace "sit-for" (0xffeffa98) "server--message-sit-for" (0xffeffc18) "server-return-error" (0xffeffde0) "server--process-filter-1" (0xfff00048) "server--process-filter-all-pending" (0xfff001d0) "server-process-filter" (0xfff00348) "read--expression" (0xf0dff0a8) "byte-code" (0xfff01d80) "command-execute" (0xfff025e8) "recursive-edit" (0xfff02a30) "debug" (0xfff02bd8) "eval-expression--debug" (0xfff02d78) "recurse" (0xfff030e0) "recurse" (0xfff03360) "recurse" (0xfff035e0) "recurse" (0xfff03860) "recurse" (0xfff03ae0) (gdb) frame 2 #2 0x0000555555589ecc in adjust_frame_glyphs (f=3D0x555556438e00) at dispnew.c:1851 1851 eassert (FRAME_INITIAL_P (f) (gdb) list 1846 if (FRAME_WINDOW_P (f)) 1847 adjust_frame_glyphs_for_window_redisplay (f); 1848 else 1849 { 1850 adjust_frame_glyphs_for_frame_redisplay (f); 1851 eassert (FRAME_INITIAL_P (f) 1852 || noninteractive 1853 || !initialized 1854 || (f->current_matrix 1855 && f->current_matrix->nrows > 0 (gdb) 1856 && f->current_matrix->rows 1857 && f->desired_matrix 1858 && f->desired_matrix->nrows > 0 1859 && f->desired_matrix->rows)); 1860 } 1861 1862 /* Don't forget the buffer for decode_mode_spec. */ 1863 adjust_decode_mode_spec_buffer (f); 1864 1865 f->glyphs_initialized_p =3D true; (gdb) p FRAME_INITIAL_P(f) $1 =3D 0 (gdb) p noninteractive $2 =3D false (gdb) p initialized $1 =3D true (gdb) p f->current_matrix $3 =3D (struct glyph_matrix *) 0x55555645f0b0 (gdb) p f->current_matrix->nrows $4 =3D 0 (gdb) p f->desired_matrix $5 =3D (struct glyph_matrix *) 0x555556815870 (gdb) p f->desired_matrix->nrows $6 =3D 0 (gdb) (gdb) p* f $8 =3D { header =3D { size =3D 4611686018595348501 }, name =3D XIL(0x555556428d14), icon_name =3D XIL(0), title =3D XIL(0), last_mouse_device =3D XIL(0), focus_frame =3D XIL(0), root_window =3D XIL(0x555556439025), selected_window =3D XIL(0x555556439025), old_selected_window =3D XIL(0), minibuffer_window =3D XIL(0x5555564392bd), param_alist =3D XIL(0x7ffff0935d63), scroll_bars =3D XIL(0), condemned_scroll_bars =3D XIL(0), menu_bar_items =3D XIL(0), face_hash_table =3D XIL(0x555556439555), menu_bar_vector =3D XIL(0), buffer_predicate =3D XIL(0), buffer_list =3D XIL(0x7ffff0935cf3), buried_buffer_list =3D XIL(0), tool_bar_position =3D XIL(0xfc00), tab_bar_items =3D XIL(0), tool_bar_items =3D XIL(0), face_cache =3D 0x55555656eac0, last_tab_bar_item =3D 0, menu_bar_items_used =3D 0, current_pool =3D 0x5555562588b0, desired_pool =3D 0x5555561acac0, desired_matrix =3D 0x555556815870, current_matrix =3D 0x55555645f0b0, glyphs_initialized_p =3D true, resized_p =3D false, default_face_done_p =3D false, already_hscrolled_p =3D false, updated_p =3D false, fonts_changed =3D false, cursor_type_changed =3D false, redisplay =3D true, visible =3D 1, iconified =3D false, garbaged =3D true, wants_modeline =3D true, auto_raise =3D false, auto_lower =3D false, no_split =3D false, explicit_name =3D false, window_change =3D true, window_state_change =3D false, mouse_moved =3D false, pointer_invisible =3D false, frozen_window_starts =3D false, output_method =3D output_termcap, can_set_window_size =3D false, after_make_frame =3D false, tab_bar_redisplayed =3D false, tab_bar_resized =3D false, tool_bar_redisplayed =3D false, tool_bar_resized =3D false, inhibit_horizontal_resize =3D false, --Type for more, q to quit, c to continue without paging-- inhibit_vertical_resize =3D false, face_change =3D true, inhibit_clear_image_cache =3D false, new_size_p =3D true, was_invisible =3D false, select_mini_window_flag =3D false, change_stamp =3D 1, number_of_windows =3D 0, tab_bar_lines =3D 0, tab_bar_height =3D 0, n_tab_bar_rows =3D 0, n_tab_bar_items =3D 0, tool_bar_lines =3D 0, tool_bar_height =3D 0, n_tool_bar_rows =3D 0, n_tool_bar_items =3D 0, decode_mode_spec_buffer =3D 0x5555563a32b0 "", insert_line_cost =3D 0x0, delete_line_cost =3D 0x0, insert_n_lines_cost =3D 0x0, delete_n_lines_cost =3D 0x0, text_cols =3D 80, text_lines =3D 24, text_width =3D 80, text_height =3D 24, total_cols =3D 80, total_lines =3D 25, pixel_width =3D 80, pixel_height =3D 25, new_width =3D 130, new_height =3D 54, left_pos =3D 0, top_pos =3D 0, win_gravity =3D 0, size_hint_flags =3D 0, border_width =3D 0, child_frame_border_width =3D 0, internal_border_width =3D 0, right_divider_width =3D 0, bottom_divider_width =3D 0, left_fringe_width =3D 0, right_fringe_width =3D 0, fringe_cols =3D 0, menu_bar_lines =3D 1, menu_bar_height =3D 1, column_width =3D 1, line_height =3D 1, terminal =3D 0x55555649d9b0, output_data =3D { tty =3D 0x555556384b90, x =3D 0x555556384b90, w32 =3D 0x555556384b90, ns =3D 0x555556384b90, pgtk =3D 0x555556384b90, haiku =3D 0x555556384b90, android =3D 0x555556384b90 }, font_driver_list =3D 0x0, desired_cursor =3D FILLED_BOX_CURSOR, cursor_width =3D 0, blink_off_cursor =3D FILLED_BOX_CURSOR, --Type for more, q to quit, c to continue without paging-- blink_off_cursor_width =3D 0, config_scroll_bar_width =3D 0, config_scroll_bar_cols =3D 0, config_scroll_bar_height =3D 0, config_scroll_bar_lines =3D 0, cost_calculation_baud_rate =3D 0, alpha =3D {0, 0}, alpha_background =3D 0, gamma =3D 0, extra_line_spacing =3D 0, background_pixel =3D 18446744073709551613, foreground_pixel =3D 18446744073709551614 } (gdb) p f->root_window $9 =3D XIL(0x555556439025) (gdb) p f->root_window->contents There is no member named contents. (gdb) p ((struct window*)f->root_window)->contents $10 =3D XIL(0x7f) (gdb) xpr Lisp_Float Cannot access memory at address 0x78 (gdb) p ((struct window*)f->selected_window)->contents $11 =3D XIL(0x7f) (gdb) xpr Lisp_Float Cannot access memory at address 0x78 (gdb) In GNU Emacs 30.0.50 (build 8, x86_64-pc-linux-gnu) of 2024-06-09 built on sonn Repository revision: 19806248167b9c4edaadbf4ed428a62fd8c5e412 Repository branch: master System Description: Devuan GNU/Linux 5 (daedalus) Configured using: 'configure --prefix=3D/opt/dc/emacs/ --with-tiff=3Dno --without-tiff --without-libsystemd --without-dbus --with-mailutils --with-native-compilation --with-x-toolkit=3Dno --without-imagemagick --without-xft --without-harfbuzz --without-freetype --without-libotf --without-xwidgets --without-xpm --without-jpeg --without-gif --without-png --without-webp --without-rsvg --without-cairo --without-x --enable-checking=3Dyes,glyphs 'CFLAGS=3D-g3 -O0'' Configured features: GMP GNUTLS LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3 THREADS XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3DSCIM locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: server-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort hashcash mail-extr compile comint ansi-osc ansi-color ring tool-bar comp-run comp-common rx emacsbug message mailcap yank-media puny rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils pp dired-aux cl-loaddefs cl-lib regexp-opt dired dnd dired-loaddefs term/rxvt term/xterm xterm byte-opt gv bytecomp byte-compile server rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads inotify lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 79456 11259) (symbols 48 7266 2) (strings 32 19563 4524) (string-bytes 1 555520) (vectors 16 9518) (vector-slots 8 101651 9432) (floats 8 33 11518) (intervals 56 2220 0) (buffers 984 14))