unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
@ 2023-10-08 20:32 Yuchen Guo
  2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (4 more replies)
  0 siblings, 5 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-08 20:32 UTC (permalink / raw)
  To: 66416


Emacs occasionally crashes when displaying multi-lingual text.  It has
crashed several times in the last few days, such as visiting HELLO file
or browsing a web page with eww.  Sometime it crashes immediately when
the HELLO file is visited,  other times it crashes when I scroll the
screen.

Worth mentioning is that, to deal with font fallback, I have configured
a custom fontset:
  https://codeberg.org/m0p/dotfiles/raw/commit/62d1a6008c0e391a33239a809aee92e4c03f14b5/imports/not-nix-config-files/emacs-init.el


I can not reliably reproduce the crash. In most cases, the text in HELLO
would be displayed with a delay.  The backtrace is the following:

Backtrace:
/bin/emacs(emacs_backtrace+0x48)[0x57e268]
/bin/emacs(terminate_due_to_signal+0x8b)[0x46814b]
/bin/emacs[0x4686ac]
/bin/emacs[0x57c1c8]
/bin/emacs[0x57c24c]
/lib/libc.so.6(+0x38d30)[0x6593484e9d30]
/bin/emacs[0x68912d]
/bin/emacs[0x689521]
/bin/emacs[0x6b76df]
/bin/emacs[0x6b9cfa]
/bin/emacs[0x4cb024]
/bin/emacs(gui_write_glyphs+0x91)[0x4cd7b1]
/bin/emacs[0x47343f]
/bin/emacs[0x479694]
/bin/emacs[0x47b183]
/bin/emacs(update_frame+0x1cb)[0x47b37b]
/bin/emacs[0x4c2e07]
/bin/emacs(read_char+0xe60)[0x56b9a0]
/bin/emacs[0x56e046]
/bin/emacs[0x570006]
/bin/emacs(internal_condition_case+0x5f)[0x5eb85f]
/bin/emacs(command_loop_2+0x26)[0x55b376]
/bin/emacs(internal_catch+0x33)[0x5eb7c3]
/bin/emacs[0x55b311]
/bin/emacs(recursive_edit_1+0x9b)[0x55fbbb]
/bin/emacs(Frecursive_edit+0xdf)[0x55ff3f]
/bin/emacs(main+0x1faf)[0x47174f]
/lib/libc.so.6(+0x23ace)[0x6593484d4ace]
/lib/libc.so.6(__libc_start_main+0x89)[0x6593484d4b89]
/bin/emacs(_start+0x25)[0x471d45]
Process 5932 (.emacs-29.1-wra) of user 1001 dumped core.
emacs.service: Main process exited, code=dumped, status=11/SEGV
systemd[5840]: emacs.service: Failed with result 'core-dump'.

In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,
cairo version 1.16.0)
System Description: NixOS 23.11 (Tapir)

Configured using:
 'configure
 --prefix=/nix/store/jafxp698l6f4wxzkmw48vg9nixjfd2qh-emacs-pgtk-29.1
 --disable-build-details --with-modules --with-pgtk
 --with-native-compilation --with-tree-sitter --with-xwidgets'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM XWIDGETS GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $EMACSNATIVELOADPATH: 
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  server-mode: t
  pdf-occur-global-minor-mode: t
  override-global-mode: t
  pixel-scroll-precision-mode: t
  electric-pair-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  global-prettify-symbols-mode: t
  prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/nix/store/fdprfbhw9zcghxj2wz9nbv8sab90zaym-emacs-packages-deps/share/emacs/site-lisp/site-start hides /nix/store/jafxp698l6f4wxzkmw48vg9nixjfd2qh-emacs-pgtk-29.1/share/emacs/site-lisp/site-start
/nix/store/fdprfbhw9zcghxj2wz9nbv8sab90zaym-emacs-packages-deps/share/emacs/site-lisp/elpa/transient-20230915.1911/transient hides /nix/store/jafxp698l6f4wxzkmw48vg9nixjfd2qh-emacs-pgtk-29.1/share/emacs/29.1/lisp/transient
/nix/store/fdprfbhw9zcghxj2wz9nbv8sab90zaym-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/jafxp698l6f4wxzkmw48vg9nixjfd2qh-emacs-pgtk-29.1/share/emacs/29.1/lisp/emacs-lisp/let-alist

Features:
(shadow sort face-remap mail-extr emacsbug message yank-media puny
rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums comp comp-cstr warnings rx server
pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist advice
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local find-func cedet
pdf-isearch let-alist pdf-misc imenu pdf-tools compile comint ansi-osc
ansi-color cus-edit icons pdf-view bookmark pp jka-compr pdf-cache
pdf-info tq pdf-util format-spec pdf-macs image-mode dired
dired-loaddefs exif pyim-basedict pyim-dict gnus nnheader gnus-util
text-property-search time-date mail-utils range mm-util mail-prsvr
wid-edit edmacro kmacro cl-extra help-mode use-package-bind-key bind-key
easy-mmode use-package-core modus-operandi-theme modus-themes
pixel-scroll cua-base ring elec-pair cus-load auctex-autoloads tex-site
magit-autoloads pcase git-commit-autoloads nix-mode-autoloads
magit-section-autoloads dash-autoloads pdf-tools-autoloads
pyim-autoloads async-autoloads pyim-basedict-autoloads tablist-autoloads
transient-autoloads with-editor-autoloads info compat-autoloads
xr-autoloads package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp
byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar 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
xwidget-internal dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 274697 10668)
 (symbols 48 19084 0)
 (strings 32 51565 2840)
 (string-bytes 1 1784963)
 (vectors 16 30611)
 (vector-slots 8 566632 13506)
 (floats 8 170 34)
 (intervals 56 302 0)
 (buffers 984 14))





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
@ 2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-09 11:19   ` Eli Zaretskii
  2023-10-09 11:24 ` Eli Zaretskii
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-09 10:31 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

Yuchen Guo <yguo@posteo.net> writes:

> Emacs occasionally crashes when displaying multi-lingual text.  It has
> crashed several times in the last few days, such as visiting HELLO file
> or browsing a web page with eww.  Sometime it crashes immediately when
> the HELLO file is visited,  other times it crashes when I scroll the
> screen.
>
> Worth mentioning is that, to deal with font fallback, I have configured
> a custom fontset:
>   https://codeberg.org/m0p/dotfiles/raw/commit/62d1a6008c0e391a33239a809aee92e4c03f14b5/imports/not-nix-config-files/emacs-init.el
>
>
> I can not reliably reproduce the crash. In most cases, the text in HELLO
> would be displayed with a delay.  The backtrace is the following:
>
> Backtrace:
> /bin/emacs(emacs_backtrace+0x48)[0x57e268]
> /bin/emacs(terminate_due_to_signal+0x8b)[0x46814b]
> /bin/emacs[0x4686ac]
> /bin/emacs[0x57c1c8]
> /bin/emacs[0x57c24c]
> /lib/libc.so.6(+0x38d30)[0x6593484e9d30]
> /bin/emacs[0x68912d]
> /bin/emacs[0x689521]
> /bin/emacs[0x6b76df]
> /bin/emacs[0x6b9cfa]
> /bin/emacs[0x4cb024]
> /bin/emacs(gui_write_glyphs+0x91)[0x4cd7b1]
> /bin/emacs[0x47343f]
> /bin/emacs[0x479694]
> /bin/emacs[0x47b183]
> /bin/emacs(update_frame+0x1cb)[0x47b37b]
> /bin/emacs[0x4c2e07]
> /bin/emacs(read_char+0xe60)[0x56b9a0]
> /bin/emacs[0x56e046]
> /bin/emacs[0x570006]
> /bin/emacs(internal_condition_case+0x5f)[0x5eb85f]
> /bin/emacs(command_loop_2+0x26)[0x55b376]
> /bin/emacs(internal_catch+0x33)[0x5eb7c3]
> /bin/emacs[0x55b311]
> /bin/emacs(recursive_edit_1+0x9b)[0x55fbbb]
> /bin/emacs(Frecursive_edit+0xdf)[0x55ff3f]
> /bin/emacs(main+0x1faf)[0x47174f]
> /lib/libc.so.6(+0x23ace)[0x6593484d4ace]
> /lib/libc.so.6(__libc_start_main+0x89)[0x6593484d4b89]
> /bin/emacs(_start+0x25)[0x471d45]
> Process 5932 (.emacs-29.1-wra) of user 1001 dumped core.
> emacs.service: Main process exited, code=dumped, status=11/SEGV
> systemd[5840]: emacs.service: Failed with result 'core-dump'.

Thanks, but the backtrace you have provided is of no use to us, as
should have been apparent from the absence of information within.
Please follow the steps illustrated within (emacs)Crashing to transform
it into a complete backtrace incorporating both symbol information and
line numbers.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-09 11:19   ` Eli Zaretskii
  0 siblings, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-09 11:19 UTC (permalink / raw)
  To: Po Lu; +Cc: yguo, 66416

> Cc: 66416@debbugs.gnu.org
> Date: Mon, 09 Oct 2023 18:31:58 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Thanks, but the backtrace you have provided is of no use to us, as
> should have been apparent from the absence of information within.
> Please follow the steps illustrated within (emacs)Crashing to transform
> it into a complete backtrace incorporating both symbol information and
> line numbers.

Either that, or start Emacs from GDB, and when it crashes type

  (gdb) thread apply all bt

and post here everything that GDB produces as result.

Thanks.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
  2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-09 11:24 ` Eli Zaretskii
       [not found]   ` <87bkd7k6b8.fsf@lan>
  2023-10-09 18:44 ` bug#66416: Coredump Yuchen Guo
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-09 11:24 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Date: Sun, 08 Oct 2023 20:32:00 +0000
> 
> 
> Emacs occasionally crashes when displaying multi-lingual text.  It has
> crashed several times in the last few days, such as visiting HELLO file
> or browsing a web page with eww.  Sometime it crashes immediately when
> the HELLO file is visited,  other times it crashes when I scroll the
> screen.
> 
> Worth mentioning is that, to deal with font fallback, I have configured
> a custom fontset:
>   https://codeberg.org/m0p/dotfiles/raw/commit/62d1a6008c0e391a33239a809aee92e4c03f14b5/imports/not-nix-config-files/emacs-init.el

Regardless of our attempts to understand the immediate reason(s) for
these crashes and try preventing them, your setup, viz.:

  (create-fontset-from-fontset-spec
   ;; derived from standard-fontset-spec
   "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-custom")
  (setq my-font-list
	'("NewComputerModernMono10"
	  "STIX Two Math"
	  "Noto Sans Mono CJK SC"))
  (dolist (font my-font-list)
    (set-fontset-font "fontset-custom" 'unicode (font-spec :name font) nil 'append))
  (add-to-list 'default-frame-alist
	       '(font . "fontset-custom"))

is not a good idea, to say the least.  Since 'unicode' is a script
that includes all the characters supported by Emacs, the above
basically tells Emacs that each of the 3 fonts you name support the
entire Unicode range of characters, and that cannot be right.

The correct way of customizing your fonts is set a single
ASCII-compatible font as the default font (in your case, this is
probably NewComputerModernMono10), and then use set-fontset-font to
add the other two fonts for specific scripts or ranges of character
codepoints, not for the entire Unicode space.  For each such font use
only the range of characters that it supports well, and that other
fonts don't cover or cover less well.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: Coredump
  2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
  2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-09 11:24 ` Eli Zaretskii
@ 2023-10-09 18:44 ` Yuchen Guo
  2023-10-12  7:46 ` bug#66416: GDB output from new crash Yuchen Guo
  2023-10-14 19:14 ` bug#66416: 29.1; pgtk build crashes due to ftcrfont Yuchen Guo
  4 siblings, 0 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-09 18:44 UTC (permalink / raw)
  To: 66416

Crashed again with

https://codeberg.org/m0p/dotfiles/raw/commit/df09d92304f3545f86c2d1dba78a8e61e3411cf0/imports/not-nix-config-files/emacs-init.el

(gdb) thread apply all bt

Thread 5 (Thread 0x6bc9a52ff6c0 (LWP 15642)):
#0  0x00006bc9aed4b77f in poll () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#1  0x00006bc9b87080ce in g_main_context_iterate.constprop () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#2  0x00006bc9b870840f in g_main_loop_run () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#3  0x00006bc9b89759f6 in gdbus_shared_thread_func () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libgio-2.0.so.0
#4  0x00006bc9b87347cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#5  0x00006bc9aecd6dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#6  0x00006bc9aed589b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6

Thread 4 (Thread 0x6bc9a4aea6c0 (LWP 15643)):
#0  0x00006bc9aed4b77f in poll () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#1  0x00006bc9b87080ce in g_main_context_iterate.constprop () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#2  0x00006bc9b87081ec in g_main_context_iteration () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#3  0x00006bc9a4af78ad in dconf_gdbus_worker_thread () from /nix/store/74z0q6qcc86xrf5k95g398ydrvz7sa3m-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
#4  0x00006bc9b87347cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#5  0x00006bc9aecd6dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#6  0x00006bc9aed589b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6

Thread 3 (Thread 0x6bc9a630a6c0 (LWP 15640)):
#0  0x00006bc9aed4b77f in poll () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#1  0x00006bc9b87080ce in g_main_context_iterate.constprop () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#2  0x00006bc9b87081ec in g_main_context_iteration () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#3  0x00006bc9b8708231 in glib_worker_main () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#4  0x00006bc9b87347cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#5  0x00006bc9aecd6dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#6  0x00006bc9aed589b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6

Thread 2 (Thread 0x6bc9a6b0b6c0 (LWP 15639)):
#0  0x00006bc9aed50d8d in syscall () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#1  0x00006bc9b8761c30 in g_cond_wait () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#2  0x00006bc9b86d205b in g_async_queue_pop_intern_unlocked () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#3  0x00006bc9b8734e12 in g_thread_pool_spawn_thread () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#4  0x00006bc9b87347cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
#5  0x00006bc9aecd6dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#6  0x00006bc9aed589b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6

Thread 1 (Thread 0x6bc9a961c240 (LWP 15629)):
#0  0x00006bc9aecd8a8c in __pthread_kill_implementation () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#1  0x00006bc9aec89c86 in raise () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
#2  0x0000000000468178 in terminate_due_to_signal ()
#3  0x00000000004686ac in handle_fatal_signal ()
#4  0x000000000057c1c8 in deliver_thread_signal.constprop ()
#5  0x000000000057c24c in handle_sigsegv ()
#6  <signal handler called>
#7  0x000000000068912d in ftcrfont_glyph_extents ()
#8  0x0000000000689521 in ftcrfont_draw ()
#9  0x00000000006b76df in pgtk_draw_composite_glyph_string_foreground ()
--Type <RET> for more, q to quit, c to continue without paging--
#10 0x00000000006b9cfa in pgtk_draw_glyph_string ()
#11 0x00000000004cb024 in draw_glyphs ()
#12 0x00000000004cd7b1 in gui_write_glyphs ()
#13 0x000000000047343f in update_window_line ()
#14 0x0000000000479694 in update_window ()
#15 0x000000000047b183 in update_window_tree ()
#16 0x000000000047b37b in update_frame ()
#17 0x00000000004c3a9e in redisplay_internal ()
#18 0x000000000056b9a0 in read_char ()
#19 0x000000000056e046 in read_key_sequence ()
#20 0x0000000000570006 in command_loop_1 ()
#21 0x00000000005eb85f in internal_condition_case ()
#22 0x000000000055b376 in command_loop_2 ()
#23 0x00000000005eb7c3 in internal_catch ()
#24 0x000000000055b311 in command_loop ()
#25 0x000000000055fbbb in recursive_edit_1 ()
#26 0x000000000055ff3f in Frecursive_edit ()
#27 0x000000000047174f in main ()
(gdb)





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
       [not found]   ` <87bkd7k6b8.fsf@lan>
@ 2023-10-09 18:45     ` Eli Zaretskii
  2023-10-09 19:07       ` Yuchen Guo
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-09 18:45 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

[Pleased use Reply All to reply, so that the bug tracker is CC'ed.]

> From: Yuchen Guo <yguo@posteo.net>
> Date: Mon, 09 Oct 2023 18:18:51 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Regardless of our attempts to understand the immediate reason(s) for
> > these crashes and try preventing them, your setup, viz.:
> > ...
> > is not a good idea, to say the least.
> 
> After setting up Emacs exactly the way you described, the original
> problem is fully resolved, it seems.  Again, this is my new config[1].

Regardless of this, we would still like to see a full human-readable
backtrace with your original setup, so that we could prevent those
crashes if that is feasible.

> I think it is advisable to include information on how to properly
> configure font fallback in the manual.  As someone who had just
> completed (eintr), it was indeed a frustrating experience trying to get
> the font fallback correctly configured.

Emacs is supposed to be properly configured regarding fonts out of the
box.  If the default configuration somehow didn't work for you, please
describe the problems, and we will see if the defaults need some
changes.

Setting the font sets manually is a tricky business which requires
some non-trivial understanding of scripts, fonts, text-shaping
requirements and expectations, etc., and is quite hard to explain in a
comprehensive way that will cover enough use cases.  Therefore, we try
to have the defaults that work for the users, such that manual
customizations are reserved for rare cases and for people who know
what they are doing.  We don't want to confuse users with too many
technical explanations and details about font setup.

> CJK users would appreciate such instructions due to Han Unification[2].

What are the issues with font setup that Han Unification causes to
Emacs users?





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-09 18:45     ` Eli Zaretskii
@ 2023-10-09 19:07       ` Yuchen Guo
  2023-10-10  2:30         ` Eli Zaretskii
  2023-10-10  4:39         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-09 19:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416

Eli Zaretskii <eliz@gnu.org> writes:

> [Pleased use Reply All to reply, so that the bug tracker is CC'ed.]

Thanks.  Haven't pressed `F' (wide-reply) in Gnus before.  Still learning.

> Regardless of this, we would still like to see a full human-readable
> backtrace with your original setup, so that we could prevent those
> crashes if that is feasible.

Emacs just crashed again after sending you the last email.
Here is the output from gdb

     https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/gdb-1.txt

> If the default configuration somehow didn't work for you, please
> describe the problems, and we will see if the defaults need some
> changes.

I would like to use

- NewComputerModernMono10 as default Monospace font,
- Tex Gyre Schola as both Serif and Sans Serif font,
- Fallback to STIX Two Math for missing mathematical symbols
- Fallback to Noto Serif CJK SC for missing 'han and 'cjk-misc glyphs

The interface looks like this when configured, but Emacs continues to
crash with this setup:

https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/correct-font.png
https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/auctex-1.png
https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/auctex-stix.png

> What are the issues with font setup that Han Unification causes to
> Emacs users?

Namely, I am a Chinese speaker, of the Simpified variety on the
Mainland.  Emacs invariably chooses HK or JP glyphs by default, which I
do not understand. (I understand neither the behavior of Emacs nor the
glyphs.) I configured Simplified Chinese [SC] as fallback in fontconfig
and this works with firefox and terminal emulator.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-09 19:07       ` Yuchen Guo
@ 2023-10-10  2:30         ` Eli Zaretskii
  2023-10-10  5:26           ` Yuchen Guo
  2023-10-10  4:39         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-10  2:30 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Mon, 09 Oct 2023 19:07:07 +0000
> 
> > Regardless of this, we would still like to see a full human-readable
> > backtrace with your original setup, so that we could prevent those
> > crashes if that is feasible.
> 
> Emacs just crashed again after sending you the last email.
> Here is the output from gdb
> 
>      https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/gdb-1.txt

Thanks.  It sounds like your Emacs has most of its debug info removed,
so the backtrace supplies only a partial information.  Is it possible
for you to rebuild Emacs with -g3 compiler switch and then try to
reproduce the problem?

Alternatively, can you build the current emacs-29 branch of the Emacs
Git repository, and see if the problem reproduces there?  A similar
bug was fixed after Emacs 29.1 was released, so it is possible that
these crashes are already fixed in Git.

> > If the default configuration somehow didn't work for you, please
> > describe the problems, and we will see if the defaults need some
> > changes.
> 
> I would like to use
> 
> - NewComputerModernMono10 as default Monospace font,
> - Tex Gyre Schola as both Serif and Sans Serif font,
> - Fallback to STIX Two Math for missing mathematical symbols
> - Fallback to Noto Serif CJK SC for missing 'han and 'cjk-misc glyphs

Please explain why you want to use these and not the default fonts
Emacs uses on your platform.

> > What are the issues with font setup that Han Unification causes to
> > Emacs users?
> 
> Namely, I am a Chinese speaker, of the Simpified variety on the
> Mainland.  Emacs invariably chooses HK or JP glyphs by default, which I
> do not understand. (I understand neither the behavior of Emacs nor the
> glyphs.) I configured Simplified Chinese [SC] as fallback in fontconfig
> and this works with firefox and terminal emulator.

Can you show screenshots of the same text as Emacs displays by
default, and as it should display according to your preferences?

Thanks.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-09 19:07       ` Yuchen Guo
  2023-10-10  2:30         ` Eli Zaretskii
@ 2023-10-10  4:39         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-10  4:39 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: Eli Zaretskii, 66416


Yuchen Guo <yguo@posteo.net> writes:

> Emacs just crashed again after sending you the last email.
> Here is the output from gdb
>
>      https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/gdb-1.txt

Thanks, but debuginfo is absent from your backtrace.  Please compile
Emacs with CFLAGS set to `-Og -g3', and ack with a backtrace from that
build.

> Namely, I am a Chinese speaker, of the Simpified variety on the
> Mainland.  Emacs invariably chooses HK or JP glyphs by default, which I
> do not understand. (I understand neither the behavior of Emacs nor the
> glyphs.) I configured Simplified Chinese [SC] as fallback in fontconfig
> and this works with firefox and terminal emulator.

This boils down to the absence of support for stylistic sets within
Emacs.  I'd advise you to replace Noto Sans CJK with a CJK font family
that segregates stylistic variants of glyphs representing identical
characters into separate font files; such as PingFang SC, inter alia.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-10  2:30         ` Eli Zaretskii
@ 2023-10-10  5:26           ` Yuchen Guo
  2023-10-10 12:08             ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-10  5:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416

Eli Zaretskii <eliz@gnu.org> writes:

> Thanks.  ... Is it possible for you to rebuild Emacs with -g3 compiler
> switch and then try to reproduce the problem?
>
> Alternatively, can you build the current emacs-29 branch of the Emacs
> Git repository, and see if the problem reproduces there?

Will build from latest emacs-29 with -g3 and see if it still crashes.
 
> Please explain why you want to use these and not the default fonts
> Emacs uses on your platform.

I have configured gsettings/dconf to use aforementioned Monospace and
Proportional fonts, and that works fine in pure GTK Emacs in most cases.

But the important edge cases, such as the fallback to Simplified Chinese
font and AUCTeX prettify mathematical symbols with variable-pitch-mode
enabled, fails.

(The latter can be remedied by setting font-latex-math-face to something
else, but it still does not solve the fallback problem.)

This var-pitch fallback problem is also related to scaling.  I have
GDK_DPI_SCALE=2 set, and Monospaced font looks fine in HELLO, but
variable-pitch-mode causes several scripts to be displayed extremely
small.  You can see this here:

https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/HELLO-mono.png
https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/HELLO-proportional.png
https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/HELLO-too-small.png

Besides, in my not so humble opinion, I think Emacs users should have
the freedom of choosing the preferred font without crashing Emacs,
regardless of defaults.  Font is a personal matter and one shouldn't be
dragged by others by the nose, as a Chinese idiom would say.

> Can you show screenshots of the same text as Emacs displays by
> default, and as it should display according to your preferences?

Sure.  Here I made a GIF from the screenshots, hope you can spot the
difference.

https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/cjk-good-vs-bad.gif





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-10  5:26           ` Yuchen Guo
@ 2023-10-10 12:08             ` Eli Zaretskii
  2023-10-10 12:59               ` Yuchen Guo
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-10 12:08 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Tue, 10 Oct 2023 05:26:00 +0000
> 
> Besides, in my not so humble opinion, I think Emacs users should have
> the freedom of choosing the preferred font without crashing Emacs,
> regardless of defaults.  Font is a personal matter and one shouldn't be
> dragged by others by the nose, as a Chinese idiom would say.

You do have the freedom, and Emacs gives users more freedom in
customizing fonts than most other GUI apps.  You just need to know
very well what you are doing to exercise that freedom, so we are
trying hard to make the need for that as small and rare as possible.

> > Can you show screenshots of the same text as Emacs displays by
> > default, and as it should display according to your preferences?
> 
> Sure.  Here I made a GIF from the screenshots, hope you can spot the
> difference.
> 
> https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/cjk-good-vs-bad.gif

Thanks.  The question is: how can Emacs distinguish between these
fonts and decide that one of them is not suitable.  In general, Emacs
picks up the first font that matches the fontset's spec, so we need to
come up with two things: (a) the way for Emacs to distinguish between
these fonts, and (b) the way to encode the requirements for a "good"
font in our default fontset.  Then Emacs will be able to pick up the
correct font automatically.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-10 12:08             ` Eli Zaretskii
@ 2023-10-10 12:59               ` Yuchen Guo
  2023-10-10 13:40                 ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-10 12:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416

Eli Zaretskii <eliz@gnu.org> writes:

> You do have the freedom, and Emacs gives users more freedom in
> customizing fonts than most other GUI apps.

In my experience, Emacs is certainly one of, if not the most effective
at customizing fonts, made even more impressive considering the fact
that everything is controlled by elisp.

Kudos to you for making a truly wonderful GUI possible!

> You just need to know very well what you are doing to exercise that
> freedom, so we are trying hard to make the need for that as small and
> rare as possible.

Yes.  In a previous reply you mentioned that this configuration is
non-trivial, and indeed a perfect out-of-the-box experience is a noble
goal in itself.

Alas, some of us users would still try to customize the fonts with very
little understanding of the intricacies of Emacs internals.

> Thanks.  The question is: how can Emacs distinguish between these
> fonts and decide that one of them is not suitable.

I think this is not possible without the user explicitly specifying
which variant is needed.  In HTML this is done with language tags, such
as lang="zh-Hans", but this strategy only covers a minority of cases,
because

- the author of the HTML document has to specify this language tag
- the browser must understand this tag
- only applies to HTML documents

In most other cases, such as the user interface of an Android phone, the
default variant is chosen during language configuration.  If a non-CJK
language was chosen, such as en-US for American English (I do this), it
will behave in the same manner as Emacs.

> In general, Emacs picks up the first font that matches the fontset's
> spec, so we need to come up with two things: (a) the way for Emacs to
> distinguish between these fonts, and (b) the way to encode the
> requirements for a "good" font in our default fontset.  Then Emacs
> will be able to pick up the correct font automatically.

"Good" is, in this case, defined by user.  One font suitable for
Mainland China users is not suitable for Taiwan, Hong Kong or Japan
users, and vice versa.  In other words, it is impossible for Emacs to
determine what variant does a given user prefer.

But there's good news.  I've rebuilt Emacs from latest commit (9 hours
ago) in the emacs-29 branch, with debug symbols enabled.  Fresh out of
the oven!  This was all made very simple and declarative thanks to the
Nix package manager:

https://codeberg.org/m0p/dotfiles/commit/e1fb4ffc4b4ce3a914adbd4c4a49863b2a48afeb

with the following init.el

https://codeberg.org/m0p/dotfiles/raw/commit/eec25a4ae443de78ea3d8ea3d94541060d7861d7/imports/not-nix-config-files/emacs-init.el

We will see if Emacs crashes again.  So far with (4 hours, 43 minutes, 3
seconds) uptime.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-10 12:59               ` Yuchen Guo
@ 2023-10-10 13:40                 ` Eli Zaretskii
  2023-10-10 16:26                   ` Yuchen Guo
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-10 13:40 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Tue, 10 Oct 2023 12:59:58 +0000
> 
> > Thanks.  The question is: how can Emacs distinguish between these
> > fonts and decide that one of them is not suitable.
> 
> I think this is not possible without the user explicitly specifying
> which variant is needed.  In HTML this is done with language tags, such
> as lang="zh-Hans", but this strategy only covers a minority of cases,
> because
> 
> - the author of the HTML document has to specify this language tag
> - the browser must understand this tag
> - only applies to HTML documents
> 
> In most other cases, such as the user interface of an Android phone, the
> default variant is chosen during language configuration.  If a non-CJK
> language was chosen, such as en-US for American English (I do this), it
> will behave in the same manner as Emacs.

Emacs has something similar, it can access the language tags of the
font.  If the font specifies a language tag, we can configure the
default fontset in a way that in specific language-environments the
fonts with corresponding language tags are moved to the front of the
fontset.

Do the fonts that you want to use have such language tags?  If they
do, which language tags correspond to what language-environments in
Emacs?

> > In general, Emacs picks up the first font that matches the fontset's
> > spec, so we need to come up with two things: (a) the way for Emacs to
> > distinguish between these fonts, and (b) the way to encode the
> > requirements for a "good" font in our default fontset.  Then Emacs
> > will be able to pick up the correct font automatically.
> 
> "Good" is, in this case, defined by user.  One font suitable for
> Mainland China users is not suitable for Taiwan, Hong Kong or Japan
> users, and vice versa.

These all are different language-environments in Emacs.  Type

  C-x RET l Chinese TAB

and you will see the Chinese language-environments that Emacs
supports.  When Emacs starts, the initial language-environment is
determined from the system locale, and the default fontset is arranged
accordingly.

So if certain language tags should be required from Chinese fonts in
specific Chinese language-environments, we can express that in our
default fontset, so that the need for configuring fonts manually is
avoided in more cases.

> In other words, it is impossible for Emacs to determine what variant
> does a given user prefer.

See above: is it really impossible?

> But there's good news.  I've rebuilt Emacs from latest commit (9 hours
> ago) in the emacs-29 branch, with debug symbols enabled.  Fresh out of
> the oven!  This was all made very simple and declarative thanks to the
> Nix package manager:
> 
> https://codeberg.org/m0p/dotfiles/commit/e1fb4ffc4b4ce3a914adbd4c4a49863b2a48afeb
> 
> with the following init.el
> 
> https://codeberg.org/m0p/dotfiles/raw/commit/eec25a4ae443de78ea3d8ea3d94541060d7861d7/imports/not-nix-config-files/emacs-init.el
> 
> We will see if Emacs crashes again.  So far with (4 hours, 43 minutes, 3
> seconds) uptime.

Thanks.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-10 13:40                 ` Eli Zaretskii
@ 2023-10-10 16:26                   ` Yuchen Guo
  2023-10-11 11:31                     ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-10 16:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416

Eli Zaretskii <eliz@gnu.org> writes:

> Do the fonts that you want to use have such language tags?  If they
> do, which language tags correspond to what language-environments in
> Emacs?

How can I check this?  I tried `describe-font' on the font I wish to
use, the output is the following

name (opened by): -GOOG-Noto Serif CJK SC-medium-normal-normal-*-48-*-*-*-*-0-iso10646-1
       full name: Noto Serif CJK SC:pixelsize=48:foundry=GOOG:weight=medium:slant=normal:width=normal:scalable=true
       file name: /.../share/fonts/opentype/noto-cjk/NotoSerifCJK-VF.otf.ttc

`fc-match' from fontconfig says

        familylang: "en"(s)
        stylelang: "en"(s)
        fullnamelang: "en"(s)
        lang: aa|ay|bg|bi|bin|br|ch|da|de|en|es|eu|fj|fo|fur
        fy|gd|gl|gn|gv|haw|ho|ia|ig|id|ie|io|is|it|ja|ki|ko|kum|lb|mg|nb|nds
        nl|nn|no|nr|oc|om|os|pt|rm|ru|sel|sm|sma|smj|so|sq|ss|st|sv|sw|tl|to
        ts|uz|vo|wa|xh|yap|zh-cn|zh-hk|zh-mo|zh-sg|zh-tw|zu|an|fil|ht|jv|kj|kwm
        li|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za(s)
        namelang: "en"(s)

Does this mean that the font itself is broken?

> These all are different language-environments in Emacs.  Type
>
>   C-x RET l Chinese TAB
>
> and you will see the Chinese language-environments that Emacs
> supports.  When Emacs starts, the initial language-environment is
> determined from the system locale, and the default fontset is arranged
> accordingly.
>
> So if certain language tags should be required from Chinese fonts in
> specific Chinese language-environments, we can express that in our
> default fontset, so that the need for configuring fonts manually is
> avoided in more cases.
>
> ...
> See above: is it really impossible?

I'm now convinced that this is indeed possible.  Thanks for the
detailed explanation, and apologies for not reading `(emacs)Language Environments'
earlier.  But now I'm unsure whether this is a problem on the part of
the font, or something that could be fixed in Emacs.

The selection of Free-as-in-Freedom CJK fonts is already too
few, good ones even less, we could ill afford to lose more of them due
to trivial configuration problems.

In the meantime, I'm using the following snippet for fallback.  I've
removed all other configuration:
	
	(defun my-configure-font (frame)
	  "Configure font given initial non-daemon FRAME.
	Intended for `after-make-frame-functions'."
	  ;; 简体中文与标点。
	  (set-fontset-font t 'han (font-spec :family "Noto Serif CJK SC" :weight 'medium))
	  (set-fontset-font t 'cjk-misc (font-spec :family "Noto Serif CJK SC" :weight 'medium))
	  (remove-hook 'after-make-frame-functions #'my-configure-font))
	
	(add-hook 'after-make-frame-functions #'my-configure-font)

Does this make any sense?





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-10 16:26                   ` Yuchen Guo
@ 2023-10-11 11:31                     ` Eli Zaretskii
  2023-10-11 12:45                       ` Yuchen Guo
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-11 11:31 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Tue, 10 Oct 2023 16:26:55 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Do the fonts that you want to use have such language tags?  If they
> > do, which language tags correspond to what language-environments in
> > Emacs?
> 
> How can I check this?  I tried `describe-font' on the font I wish to
> use, the output is the following

Try font-info instead, and look at the last, 13th, element of the
vector it returns.  The doc string of font-info describes what it can
tell you.

> > So if certain language tags should be required from Chinese fonts in
> > specific Chinese language-environments, we can express that in our
> > default fontset, so that the need for configuring fonts manually is
> > avoided in more cases.
> >
> > ...
> > See above: is it really impossible?
> 
> I'm now convinced that this is indeed possible.  Thanks for the
> detailed explanation, and apologies for not reading `(emacs)Language Environments'
> earlier.  But now I'm unsure whether this is a problem on the part of
> the font, or something that could be fixed in Emacs.

See above.

If the fonts you want to use indeed have the appropriate
language-system tags, then you can request those tags to be present
via set-fontest-font, by using the font-spec function to specify the
FONT-SPEC argument.  See the doc string of font-spec for how to
specify language-system tags.

> The selection of Free-as-in-Freedom CJK fonts is already too
> few, good ones even less, we could ill afford to lose more of them due
> to trivial configuration problems.

The beauty of using font-spec is that you don't have to name the fonts
or their family names, only specify their properties and features, and
Emacs will find the right font(s) automatically (or at least it
should).

> In the meantime, I'm using the following snippet for fallback.  I've
> removed all other configuration:
> 	
> 	(defun my-configure-font (frame)
> 	  "Configure font given initial non-daemon FRAME.
> 	Intended for `after-make-frame-functions'."
> 	  ;; 简体中文与标点。
> 	  (set-fontset-font t 'han (font-spec :family "Noto Serif CJK SC" :weight 'medium))
> 	  (set-fontset-font t 'cjk-misc (font-spec :family "Noto Serif CJK SC" :weight 'medium))
> 	  (remove-hook 'after-make-frame-functions #'my-configure-font))
> 	
> 	(add-hook 'after-make-frame-functions #'my-configure-font)
> 
> Does this make any sense?

Yes, I think so.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-11 11:31                     ` Eli Zaretskii
@ 2023-10-11 12:45                       ` Yuchen Guo
  2023-10-11 13:12                         ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-11 12:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416

Eli Zaretskii <eliz@gnu.org> writes:

> Try font-info instead, and look at the last, 13th, element of the
> vector it returns.  The doc string of font-info describes what it can
> tell you.

I obtained the following output for the Simplified Chinese Serif font:

(opentype
 ((DFLT (nil aalt calt ccmp dlig fwid hist hwid liga pwid ruby vert
             vrt2))
  (cyrl (nil aalt calt ccmp dlig fwid hist hwid liga locl pwid ruby
             vert vrt2)
        (JAN\  aalt calt ccmp dlig fwid hist hwid liga locl pwid ruby
               vert vrt2)
        (KOR\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
               ruby vert vrt2)
        (ZHH\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
               ruby vert vrt2)
        (ZHS\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
               ruby vert vrt2)
        (ZHT\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
               ruby vert vrt2))...)

...500+ lines omitted...

It seems to me that the font declares support for all CJK scripts.

> font-spec

Thanks for the detailed suggestions, but I think I will not tweak that
any further at the moment, since I still do not have sufficient
knowledge for doing so.  Besides, I am already able to sit back and
enjoy variable pitch font in its full 4K-resolution, pure GTK on Wayland
glory.

By God, I was writing TeX in TUI Emacs for a whole year!  I didn't know
what was missing in my life.  Obligatory screenshot:

https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/4k.png

===================================================

Back to the original bug report:

Emacs has not crashed since the rebuild from latest commit in emacs-29
branch.  Previously Emacs server was crashing every few hours.

If there is no more crashes in the coming week, then I think this issue
can be closed.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland
  2023-10-11 12:45                       ` Yuchen Guo
@ 2023-10-11 13:12                         ` Eli Zaretskii
  0 siblings, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-11 13:12 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Wed, 11 Oct 2023 12:45:58 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Try font-info instead, and look at the last, 13th, element of the
> > vector it returns.  The doc string of font-info describes what it can
> > tell you.
> 
> I obtained the following output for the Simplified Chinese Serif font:
> 
> (opentype
>  ((DFLT (nil aalt calt ccmp dlig fwid hist hwid liga pwid ruby vert
>              vrt2))
>   (cyrl (nil aalt calt ccmp dlig fwid hist hwid liga locl pwid ruby
>              vert vrt2)
>         (JAN\  aalt calt ccmp dlig fwid hist hwid liga locl pwid ruby
>                vert vrt2)
>         (KOR\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
>                ruby vert vrt2)
>         (ZHH\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
>                ruby vert vrt2)
>         (ZHS\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
>                ruby vert vrt2)
>         (ZHT\  aalt calt ccmp dlig fwid hist hwid liga locl pwid
>                ruby vert vrt2))...)
> 
> ...500+ lines omitted...
> 
> It seems to me that the font declares support for all CJK scripts.

And you are saying that this font is not appropriate for your
language-environment, contrary to what the font declares?  If so, you
could try telling Emacs to ignore than font, using face-ignored-fonts.

> Back to the original bug report:
> 
> Emacs has not crashed since the rebuild from latest commit in emacs-29
> branch.  Previously Emacs server was crashing every few hours.
> 
> If there is no more crashes in the coming week, then I think this issue
> can be closed.

Thanks, so please come back and report in a week or so, or when it
does crash, whichever happens earlier.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
                   ` (2 preceding siblings ...)
  2023-10-09 18:44 ` bug#66416: Coredump Yuchen Guo
@ 2023-10-12  7:46 ` Yuchen Guo
  2023-10-12  8:12   ` Yuchen Guo
  2023-10-14 19:14 ` bug#66416: 29.1; pgtk build crashes due to ftcrfont Yuchen Guo
  4 siblings, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-12  7:46 UTC (permalink / raw)
  To: 66416

The build from latest commit in emacs-29 branch crashed after attempting
to view HELLO file.

GDB output:
https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/gdb-2.txt





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12  7:46 ` bug#66416: GDB output from new crash Yuchen Guo
@ 2023-10-12  8:12   ` Yuchen Guo
  2023-10-12 10:23     ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-12  8:12 UTC (permalink / raw)
  To: 66416

Full text
# output from `thread apply all bt full'
# https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=eedd9db6190a7f69403aefe8098a554ef2b51371
# init.el from
# https://codeberg.org/m0p/dotfiles/raw/commit/d88fdd1451f867b1f6295e94b3cc9ad79e21072d/imports/not-nix-config-files/emacs-init.el

Thread 5 (Thread 0x69d28ffff6c0 (LWP 4727)):
#0  0x000069d2a5b0677f in poll () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2af4c30ce in g_main_context_iterate.constprop () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#2  0x000069d2af4c340f in g_main_loop_run () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#3  0x000069d2af7309f6 in gdbus_shared_thread_func () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libgio-2.0.so.0
No symbol table info available.
#4  0x000069d2af4ef7cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#5  0x000069d2a5a91dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#6  0x000069d2a5b139b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.

Thread 4 (Thread 0x69d29d8846c0 (LWP 4724)):
#0  0x000069d2a5b0bd8d in syscall () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2af51cc30 in g_cond_wait () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#2  0x000069d2af48d05b in g_async_queue_pop_intern_unlocked () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#3  0x000069d2af4efe12 in g_thread_pool_spawn_thread () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#4  0x000069d2af4ef7cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#5  0x000069d2a5a91dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#6  0x000069d2a5b139b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.

Thread 3 (Thread 0x69d28f7fe6c0 (LWP 4728)):
#0  0x000069d2a5b0677f in poll () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2af4c30ce in g_main_context_iterate.constprop () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#2  0x000069d2af4c31ec in g_main_context_iteration () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#3  0x000069d29c0718ad in dconf_gdbus_worker_thread () from /nix/store/74z0q6qcc86xrf5k95g398ydrvz7sa3m-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
No symbol table info available.
#4  0x000069d2af4ef7cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#5  0x000069d2a5a91dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#6  0x000069d2a5b139b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.

Thread 2 (Thread 0x69d29d0836c0 (LWP 4725)):
#0  0x000069d2a5b0677f in poll () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2af4c30ce in g_main_context_iterate.constprop () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#2  0x000069d2af4c31ec in g_main_context_iteration () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#3  0x000069d2af4c3231 in glib_worker_main () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#4  0x000069d2af4ef7cd in g_thread_proxy () from /nix/store/1c6x8n47mq5rcivsp72b0dyqgjghi6yx-glib-2.76.4/lib/libglib-2.0.so.0
No symbol table info available.
#5  0x000069d2a5a91dd4 in start_thread () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#6  0x000069d2a5b139b0 in clone3 () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.

Thread 1 (Thread 0x69d2a03d7240 (LWP 4178)):
#0  0x000069d2a5a93a8c in __pthread_kill_implementation () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2a5a44c86 in raise () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#2  0x0000000000522793 in terminate_due_to_signal (sig=sig@entry=11, backtrace_limit=backtrace_limit@entry=40) at emacs.c:464
No locals.
#3  0x000000000053de25 in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1783
No locals.
#4  0x000000000053de52 in deliver_thread_signal (sig=sig@entry=11, handler=handler@entry=0x53de17 <handle_fatal_signal>) at sysdep.c:1775
        old_errno = 13
#5  0x000000000053deb6 in deliver_fatal_thread_signal (sig=sig@entry=11) at sysdep.c:1795
No locals.
#6  0x000000000053dfa5 in handle_sigsegv (sig=11, siginfo=<optimized out>, arg=<optimized out>) at sysdep.c:1888
        fatal = <optimized out>
#7  <signal handler called>
No symbol table info available.
#8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
        ftcrfont_info = 0x3fe60998
        row = 9
        col = 30
        cache = 0x12d
#9  0x0000000000616e8e in ftcrfont_draw (s=0x77801d4f6d50, from=0, to=<optimized out>, x=427, y=427, with_background=<optimized out>) at ftcrfont.c:604
        f = 0x42a23c18
        ftcrfont_info = 0x3fe60998
        cr = 0x3f4a1280
        glyphs = 0x77801d4f68a0
        len = 1
        i = 0
#10 0x000000000063d1f9 in pgtk_draw_composite_glyph_string_foreground (s=s@entry=0x77801d4f6d50) at pgtkterm.c:1536
        xoff = <optimized out>
        yoff = <optimized out>
        wadjust = 0
        gstring = 0x3fe60f2d
        glyph = <optimized out>
        y = 431
        width = <optimized out>
        i = 0
        j = <optimized out>
        x = 426
        font = 0x3fe60998
#11 0x00000000006401c3 in pgtk_draw_glyph_string (s=0x77801d4f6d50) at pgtkterm.c:2525
        relief_drawn_p = false
        cr = 0x3f4a1280
#12 0x00000000004b3264 in draw_glyphs (w=w@entry=0x426092e0, x=483, row=0x3f3ab600, area=area@entry=TEXT_AREA, start=<optimized out>, start@entry=0, end=<optimized out>, end@entry=39, hl=<optimized out>, overlaps=<optimized out>) at xdisp.c:30636
        head = 0x77801d4f8040
        tail = 0x77801d4f69d0
        s = 0x77801d4f6d50
        clip_head = 0x0
        clip_tail = 0x0
        i = <optimized out>
        j = <optimized out>
        x_reached = <optimized out>
        last_x = <optimized out>
        area_left = <optimized out>
        f = <optimized out>
        sa_avail = 15820
        sa_count = <optimized out>
#13 0x00000000004b34f0 in gui_write_glyphs (w=0x426092e0, updated_row=<optimized out>, start=<optimized out>, updated_area=TEXT_AREA, len=39) at xdisp.c:32699
        x = <optimized out>
        hpos = 0
        chpos = 0
#14 0x0000000000466ce1 in update_text_area (w=w@entry=0x426092e0, updated_row=updated_row@entry=0x3f3ab600, vpos=vpos@entry=10, partial_p=partial_p@entry=0x77801d4f8387) at dispnew.c:4001
        current_row = 0x3f3830f0
        desired_row = 0x3f3ab600
        rif = 0xb3e360 <pgtk_redisplay_interface>
        changed_p = false
#15 0x0000000000469f48 in update_window_line (w=w@entry=0x426092e0, vpos=vpos@entry=10, mouse_face_overwritten_p=mouse_face_overwritten_p@entry=0x77801d4f8407) at dispnew.c:4259
        current_row = 0x3f3830f0
        desired_row = 0x3f3ab600
        rif = 0xb3e360 <pgtk_redisplay_interface>
        changed_p = false
        partial_p = false
        was_stipple = <optimized out>
#16 0x000000000046d5ef in update_window (w=w@entry=0x426092e0, force_p=force_p@entry=true) at dispnew.c:3731
        vpos = 10
        i = <optimized out>
        end = 0x3f3ada00
        tab_line_row = <optimized out>
        mouse_face_overwritten_p = false
        n_updated = 0
        mode_line_row = 0x3f3ada00
        changed_p = true
        invisible_rows_marked = false
        row = 0x3f3ab600
        header_line_row = <optimized out>
        yb = <optimized out>
        desired_matrix = 0x4253a6a0
        paused_p = <optimized out>
        preempt_count = <optimized out>
        rif = <optimized out>
#17 0x000000000046d991 in update_window_tree (w=w@entry=0x426092e0, force_p=force_p@entry=true) at dispnew.c:3456
        paused_p = false
#18 0x000000000046da91 in update_frame (f=f@entry=0x42a23c18, force_p=true, force_p@entry=false, inhibit_hairy_id_p=inhibit_hairy_id_p@entry=false) at dispnew.c:3291
        paused_p = <optimized out>
        root_window = 0x426092e0
#19 0x00000000004abe90 in redisplay_internal () at xdisp.c:17122
        gcscrollbars = true
        f_redisplay_flag = false
        f = 0x42a23c18
        w = 0x426092e0
        sw = <optimized out>
        fr = <optimized out>
        pending = false
        must_finish = <optimized out>
        match_p = <optimized out>
        tlbufpos = <optimized out>
        tlendpos = <optimized out>
        number_of_visible_frames = <optimized out>
        sf = <optimized out>
        polling_stopped_here = true
        tail = <optimized out>
        frame = 0x42a23c1d
        MAX_HSCROLL_RETRIES = MAX_HSCROLL_RETRIES
        hscroll_retries = <optimized out>
        MAX_GARBAGED_FRAME_RETRIES = MAX_GARBAGED_FRAME_RETRIES
        garbaged_frame_retries = 0
        consider_all_windows_p = <optimized out>
        update_miniwindow_p = <optimized out>
        count = <optimized out>
        retry_frame = <optimized out>
#20 0x00000000004ac707 in redisplay () at xdisp.c:16225
No locals.
#21 0x0000000000531938 in read_char (commandflag=1, map=map@entry=0x428bf0f3, prev_event=0x0, used_mouse_menu=used_mouse_menu@entry=0x77801d4f9c0b, end_time=end_time@entry=0x0) at keyboard.c:2636
        echo_current = true
        c = <optimized out>
        local_getcjmp = {{__jmpbuf = {0, 131392131275168, 0, 36960, 12440512, 0, 2, 3822}, __mask_was_saved = 1072989109, __saved_mask = {__val = {5823051, 36960, 131392131275312, 2, 5940859, 1058952896, 1062107776, 1049704224, 5821465, 0, 1058952896, 1057136819, 5821812, 1057136659, 5482667, 4294967296}}}}
        save_jump = {{__jmpbuf = {0, 40272, 0, 0, 0, 131392131275504, 0, 1111710579}, __mask_was_saved = 1, __saved_mask = {__val = {10518585111937802752, 1, 1116467347, 0, 10518585111937802752, 1116467427, 4294967295, 48, 5483074, 0, 0, 1053901840, 10518585111937802752, 8194, 0, 0}}}}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = 0x0
        also_record = 0x0
        reread = false
        recorded = false
        polling_stopped_here = false
        orig_kboard = 0x3f225150
        jmpcount = <optimized out>
#22 0x00000000005330f1 in read_key_sequence (keybuf=keybuf@entry=0x77801d4f9d10, prompt=prompt@entry=0x0, dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) at keyboard.c:10084
        interrupted_kboard = 0x3f225150
        interrupted_frame = 0x42a23c18
        key = <optimized out>
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = <optimized out>
        count = <optimized out>
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = 0x428bf0f3
        first_unbound = 31
        mock_input = 0
        used_mouse_menu_history = {false <repeats 30 times>}
        fkey = {parent = 0x3f040773, map = 0x3f040773, start = 0, end = 0}
        keytran = {parent = 0x69d29fddb043, map = 0x69d29fddb043, start = 0, end = 0}
        indec = {parent = 0x3f0407c3, map = 0x3f0407c3, start = 0, end = 0}
        shift_translated = false
        delayed_switch_frame = 0x0
        original_uppercase = 0x9060
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0x3ff483b0
        fake_prefixed_keys = 0x0
        first_event = 0x0
        second_event = <optimized out>
#23 0x0000000000534557 in command_loop_1 () at keyboard.c:1384
        cmd = <optimized out>
        keybuf = {0x22, 0x1a2, 0xa0, 0x77801d4f9d80, 0x2, 0x30, 0x0, 0x59cb1d <do_one_unbind+287>, 0x34e0, 0x60, 0x0, 0x0, 0x0, 0x59df58 <unbind_to+105>, 0xb, 0xed90, 0x30, 0x3ff483b5, 0x0, 0x91f9856df0c3e200, 0xbd1480 <globals>, 0x429b3943, 0x60, 0x529bcb <cmd_error+363>, 0x0, 0x69d29f4a770d, 0xbd1480 <globals>, 0x91f9856df0c3e200, 0x60, 0x69d29f76f0db}
        i = <optimized out>
        prev_modiff = 24
        prev_buffer = 0x69d29f4a7708
#24 0x000000000059d1ac in internal_condition_case (bfun=bfun@entry=0x53431d <command_loop_1>, handlers=handlers@entry=0x90, hfun=hfun@entry=0x529a60 <cmd_error>) at eval.c:1474
        val = <optimized out>
        c = 0x3e3dcfe0
#25 0x0000000000524551 in command_loop_2 (handlers=handlers@entry=0x90) at keyboard.c:1133
        val = <optimized out>
#26 0x000000000059d11a in internal_catch (tag=tag@entry=0xfc90, func=func@entry=0x524537 <command_loop_2>, arg=arg@entry=0x90) at eval.c:1197
        val = <optimized out>
        c = 0x3e3f9630
#27 0x000000000052450e in command_loop () at keyboard.c:1111
No locals.
#28 0x000000000052960a in recursive_edit_1 () at keyboard.c:720
        count = <optimized out>
        val = <optimized out>
#29 0x0000000000529959 in Frecursive_edit () at keyboard.c:803
        count = <optimized out>
        buffer = <optimized out>
#30 0x0000000000523a4c in main (argc=2, argv=<optimized out>) at emacs.c:2521
        stack_bottom_variable = 0x69d2a24c9da0 <(anonymous namespace)::moneypunct_cache_ct>
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = <optimized out>
        dump_mode = <optimized out>
        skip_args = 1
        temacs = 0x0
        attempt_load_pdump = <optimized out>
        only_version = false
        rlim = {rlim_cur = 10022912, rlim_max = 18446744073709551615}
        lc_all = <optimized out>
        sockfd = -1
        module_assertions = <optimized out>
quit





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12  8:12   ` Yuchen Guo
@ 2023-10-12 10:23     ` Eli Zaretskii
  2023-10-12 11:22       ` Yuchen Guo
  2023-10-12 11:43       ` Yuchen Guo
  0 siblings, 2 replies; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-12 10:23 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Date: Thu, 12 Oct 2023 08:12:54 +0000
> 
> Thread 1 (Thread 0x69d2a03d7240 (LWP 4178)):
> #0  0x000069d2a5a93a8c in __pthread_kill_implementation () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
> No symbol table info available.
> #1  0x000069d2a5a44c86 in raise () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
> No symbol table info available.
> #2  0x0000000000522793 in terminate_due_to_signal (sig=sig@entry=11, backtrace_limit=backtrace_limit@entry=40) at emacs.c:464
> No locals.
> #3  0x000000000053de25 in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1783
> No locals.
> #4  0x000000000053de52 in deliver_thread_signal (sig=sig@entry=11, handler=handler@entry=0x53de17 <handle_fatal_signal>) at sysdep.c:1775
>         old_errno = 13
> #5  0x000000000053deb6 in deliver_fatal_thread_signal (sig=sig@entry=11) at sysdep.c:1795
> No locals.
> #6  0x000000000053dfa5 in handle_sigsegv (sig=11, siginfo=<optimized out>, arg=<optimized out>) at sysdep.c:1888
>         fatal = <optimized out>
> #7  <signal handler called>
> No symbol table info available.
> #8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
>         ftcrfont_info = 0x3fe60998
>         row = 9
>         col = 30
>         cache = 0x12d
> #9  0x0000000000616e8e in ftcrfont_draw (s=0x77801d4f6d50, from=0, to=<optimized out>, x=427, y=427, with_background=<optimized out>) at ftcrfont.c:604
>         f = 0x42a23c18
>         ftcrfont_info = 0x3fe60998
>         cr = 0x3f4a1280
>         glyphs = 0x77801d4f68a0
>         len = 1
>         i = 0

Assuming you still have this session caught in GDB, please type at the
GDB prompt:

  (gdb) fr 8
  (gdb) p cache
  (gdb) p ftcrfont_info->metrics[row]

and post the results here.

Thanks.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 10:23     ` Eli Zaretskii
@ 2023-10-12 11:22       ` Yuchen Guo
  2023-10-12 12:31         ` Eli Zaretskii
  2023-10-12 11:43       ` Yuchen Guo
  1 sibling, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-12 11:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416

Eli Zaretskii <eliz@gnu.org> writes:

> Assuming you still have this session caught in GDB, please type at the
> GDB prompt:
>
>   (gdb) fr 8
>   (gdb) p cache
>   (gdb) p ftcrfont_info->metrics[row]
>
> and post the results here.
>
> Thanks.

#8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
warning: Source file is more recent than executable.
94	  if (METRICS_STATUS (cache) == METRICS_INVALID)
$1 = (struct font_metrics *) 0x12d
$2 = (struct font_metrics *) 0x1
quit





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 10:23     ` Eli Zaretskii
  2023-10-12 11:22       ` Yuchen Guo
@ 2023-10-12 11:43       ` Yuchen Guo
  1 sibling, 0 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-12 11:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66416


> Assuming you still have this session caught in GDB, please type at the
> GDB prompt:

By the way, I'm using Emacs server service, started by systemd.

When Emacs crashes, systemd logs the crash and gives me a
zstd-compressed coredump, located under /var/lib/systemd/coredump/.  All
outputs are obtained by running gdb on this coredump.  Don't know if
this matters, just stating a fact.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 11:22       ` Yuchen Guo
@ 2023-10-12 12:31         ` Eli Zaretskii
  2023-10-12 13:58           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-12 12:31 UTC (permalink / raw)
  To: Yuchen Guo, Po Lu; +Cc: 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: 66416@debbugs.gnu.org
> Date: Thu, 12 Oct 2023 11:22:47 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Assuming you still have this session caught in GDB, please type at the
> > GDB prompt:
> >
> >   (gdb) fr 8
> >   (gdb) p cache
> >   (gdb) p ftcrfont_info->metrics[row]
> >
> > and post the results here.
> >
> > Thanks.
> 
> #8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
> warning: Source file is more recent than executable.
> 94	  if (METRICS_STATUS (cache) == METRICS_INVALID)
> $1 = (struct font_metrics *) 0x12d
> $2 = (struct font_metrics *) 0x1
> quit

Po Lu, any idea what happened here?  ftcrfont_info->metrics is clearly
bogus, but how did it happen and why?  The argument FONT seems to be
valid.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 12:31         ` Eli Zaretskii
@ 2023-10-12 13:58           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-12 14:28             ` Yuchen Guo
  2023-10-12 14:42             ` Yuchen Guo
  0 siblings, 2 replies; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-12 13:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Yuchen Guo, 66416

Eli Zaretskii <eliz@gnu.org> writes:

> Po Lu, any idea what happened here?  ftcrfont_info->metrics is clearly
> bogus, but how did it happen and why?  The argument FONT seems to be
> valid.

I can't be certain at this time of the day, but:

  (gdb) p *ftcrfont_info

should prove illuminating.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 13:58           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-12 14:28             ` Yuchen Guo
  2023-10-12 14:42             ` Yuchen Guo
  1 sibling, 0 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-12 14:28 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 66416

Po Lu <luangruo@yahoo.com> writes:

>   (gdb) p *ftcrfont_info
>
> should prove illuminating.
Output:

{font =
    {header = {size = 4611686018997895185},
     props = {0x7c50, 0x3e581280, 0x41493ef0, 0x0, 0x9870, 0x14102,
    0x19082, 0x19102, 0x6e, 0x0, 0x0, 0x2, 0x42277373, 0x0,
    0x40229f14, 0x40229ef4, 0x402299a4},
     min_width = 8,
     max_width = 29,
     pixel_size = 27,
     height = 39,
     space_width = 10,
     average_width = 15,
     ascent = 31,
     descent = 8,
     underline_thickness = 0,
     underline_position = 3,
     vertical_centering = false,
     baseline_offset = 0,
     relative_compose = 0,
     default_ascent = 0,
     encoding_charset = -1,
     repertory_charset = -1,
     driver = 0xc0ece0 <ftcrhbfont_driver>
    },
    ft_size = 0x0,
    index = 1072040480,
    matrix = {xx = 0, xy = 1109821571, yx = 5, yy = 0},
    hb_font = 0x0,
    cr_scaled_font = 0x4211a9e0,
    bitmap_position_unit = 0,
    metrics = 0x41412720,
    metrics_nrows = 10
    }





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 13:58           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-12 14:28             ` Yuchen Guo
@ 2023-10-12 14:42             ` Yuchen Guo
  2023-10-14 11:00               ` Eli Zaretskii
  1 sibling, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-12 14:42 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 66416

Here is the same information, with .gdbinit loaded, output from

     (gdb) bt full
     (gdb) fr 8
     (gdb) p cache
     (gdb) p ftcrfont_info->metrics[row]
     (gdb) p *ftcrfont_info

#0  0x000069d2a5a93a8c in __pthread_kill_implementation () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2a5a44c86 in raise () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#2  0x0000000000522793 in terminate_due_to_signal (sig=sig@entry=11, backtrace_limit=backtrace_limit@entry=40) at emacs.c:464
No locals.
#3  0x000000000053de25 in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1783
No locals.
#4  0x000000000053de52 in deliver_thread_signal (sig=sig@entry=11, handler=handler@entry=0x53de17 <handle_fatal_signal>) at sysdep.c:1775
        old_errno = 13
#5  0x000000000053deb6 in deliver_fatal_thread_signal (sig=sig@entry=11) at sysdep.c:1795
No locals.
#6  0x000000000053dfa5 in handle_sigsegv (sig=11, siginfo=<optimized out>, arg=<optimized out>) at sysdep.c:1888
        fatal = <optimized out>
#7  <signal handler called>
No symbol table info available.
#8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
        ftcrfont_info = 0x3fe60998
        row = 9
        col = 30
        cache = 0x12d
#9  0x0000000000616e8e in ftcrfont_draw (s=0x77801d4f6d50, from=0, to=<optimized out>, x=427, y=427, with_background=<optimized out>) at ftcrfont.c:604
        f = 0x42a23c18
        ftcrfont_info = 0x3fe60998
        cr = 0x3f4a1280
        glyphs = 0x77801d4f68a0
        len = 1
        i = 0
#10 0x000000000063d1f9 in pgtk_draw_composite_glyph_string_foreground (s=s@entry=0x77801d4f6d50) at pgtkterm.c:1536
        xoff = <optimized out>
        yoff = <optimized out>
        wadjust = 0
        gstring = XIL(0x3fe60f2d)
        glyph = <optimized out>
        y = 431
        width = <optimized out>
        i = 0
        j = <optimized out>
        x = 426
        font = 0x3fe60998
#11 0x00000000006401c3 in pgtk_draw_glyph_string (s=0x77801d4f6d50) at pgtkterm.c:2525
        relief_drawn_p = false
        cr = 0x3f4a1280
#12 0x00000000004b3264 in draw_glyphs (w=w@entry=0x426092e0, x=483, row=0x3f3ab600, area=area@entry=TEXT_AREA, start=<optimized out>, start@entry=0, end=<optimized out>, end@entry=39, hl=<optimized out>, overlaps=<optimized out>) at xdisp.c:30636
        head = 0x77801d4f8040
        tail = 0x77801d4f69d0
        s = 0x77801d4f6d50
        clip_head = 0x0
        clip_tail = 0x0
        i = <optimized out>
        j = <optimized out>
        x_reached = <optimized out>
        last_x = <optimized out>
        area_left = <optimized out>
        f = <optimized out>
        sa_avail = 15820
        sa_count = <optimized out>
#13 0x00000000004b34f0 in gui_write_glyphs (w=0x426092e0, updated_row=<optimized out>, start=<optimized out>, updated_area=TEXT_AREA, len=39) at xdisp.c:32699
        x = <optimized out>
        hpos = 0
        chpos = 0
#14 0x0000000000466ce1 in update_text_area (w=w@entry=0x426092e0, updated_row=updated_row@entry=0x3f3ab600, vpos=vpos@entry=10, partial_p=partial_p@entry=0x77801d4f8387) at dispnew.c:4001
        current_row = 0x3f3830f0
        desired_row = 0x3f3ab600
        rif = 0xb3e360 <pgtk_redisplay_interface>
        changed_p = false
#15 0x0000000000469f48 in update_window_line (w=w@entry=0x426092e0, vpos=vpos@entry=10, mouse_face_overwritten_p=mouse_face_overwritten_p@entry=0x77801d4f8407) at dispnew.c:4259
        current_row = 0x3f3830f0
        desired_row = 0x3f3ab600
        rif = 0xb3e360 <pgtk_redisplay_interface>
        changed_p = false
        partial_p = false
        was_stipple = <optimized out>
#16 0x000000000046d5ef in update_window (w=w@entry=0x426092e0, force_p=force_p@entry=true) at dispnew.c:3731
        vpos = 10
        i = <optimized out>
        end = 0x3f3ada00
        tab_line_row = <optimized out>
        mouse_face_overwritten_p = false
        n_updated = 0
        mode_line_row = 0x3f3ada00
        changed_p = true
        invisible_rows_marked = false
        row = 0x3f3ab600
        header_line_row = <optimized out>
        yb = <optimized out>
        desired_matrix = 0x4253a6a0
        paused_p = <optimized out>
        preempt_count = <optimized out>
        rif = <optimized out>
#17 0x000000000046d991 in update_window_tree (w=w@entry=0x426092e0, force_p=force_p@entry=true) at dispnew.c:3456
        paused_p = false
#18 0x000000000046da91 in update_frame (f=f@entry=0x42a23c18, force_p=true, force_p@entry=false, inhibit_hairy_id_p=inhibit_hairy_id_p@entry=false) at dispnew.c:3291
        paused_p = <optimized out>
        root_window = 0x426092e0
#19 0x00000000004abe90 in redisplay_internal () at xdisp.c:17122
        gcscrollbars = true
        f_redisplay_flag = false
        f = 0x42a23c18
        w = 0x426092e0
        sw = <optimized out>
        fr = <optimized out>
        pending = false
        must_finish = <optimized out>
        match_p = <optimized out>
        tlbufpos = <optimized out>
        tlendpos = <optimized out>
        number_of_visible_frames = <optimized out>
        sf = <optimized out>
        polling_stopped_here = true
        tail = <optimized out>
        frame = XIL(0x42a23c1d)
        MAX_HSCROLL_RETRIES = MAX_HSCROLL_RETRIES
        hscroll_retries = <optimized out>
        MAX_GARBAGED_FRAME_RETRIES = MAX_GARBAGED_FRAME_RETRIES
        garbaged_frame_retries = 0
        consider_all_windows_p = <optimized out>
        update_miniwindow_p = <optimized out>
        count = <optimized out>
        retry_frame = <optimized out>
#20 0x00000000004ac707 in redisplay () at xdisp.c:16225
No locals.
#21 0x0000000000531938 in read_char (commandflag=1, map=map@entry=XIL(0x428bf0f3), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x77801d4f9c0b, end_time=end_time@entry=0x0) at keyboard.c:2636
        echo_current = true
        c = <optimized out>
        local_getcjmp = {{
            __jmpbuf = {0, 131392131275168, 0, 36960, 12440512, 0, 2, 3822},
            __mask_was_saved = 1072989109,
            __saved_mask = {
              __val = {5823051, 36960, 131392131275312, 2, 5940859, 1058952896, 1062107776, 1049704224, 5821465, 0, 1058952896, 1057136819, 5821812, 1057136659, 5482667, 4294967296}
            }
          }}
        save_jump = {{
            __jmpbuf = {0, 40272, 0, 0, 0, 131392131275504, 0, 1111710579},
            __mask_was_saved = 1,
            __saved_mask = {
              __val = {10518585111937802752, 1, 1116467347, 0, 10518585111937802752, 1116467427, 4294967295, 48, 5483074, 0, 0, 1053901840, 10518585111937802752, 8194, 0, 0}
            }
          }}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = XIL(0)
        also_record = XIL(0)
        reread = false
        recorded = false
        polling_stopped_here = false
        orig_kboard = 0x3f225150
        jmpcount = <optimized out>
#22 0x00000000005330f1 in read_key_sequence (keybuf=keybuf@entry=0x77801d4f9d10, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) at keyboard.c:10084
        interrupted_kboard = 0x3f225150
        interrupted_frame = 0x42a23c18
        key = <optimized out>
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = <optimized out>
        count = <optimized out>
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = XIL(0x428bf0f3)
        first_unbound = 31
        mock_input = 0
        used_mouse_menu_history = {false <repeats 30 times>}
        fkey = {
          parent = XIL(0x3f040773),
          map = XIL(0x3f040773),
          start = 0,
          end = 0
        }
        keytran = {
          parent = XIL(0x69d29fddb043),
          map = XIL(0x69d29fddb043),
          start = 0,
          end = 0
        }
        indec = {
          parent = XIL(0x3f0407c3),
          map = XIL(0x3f0407c3),
          start = 0,
          end = 0
        }
        shift_translated = false
        delayed_switch_frame = XIL(0)
        original_uppercase = XIL(0x9060)
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0x3ff483b0
        fake_prefixed_keys = XIL(0)
        first_event = XIL(0)
        second_event = <optimized out>
#23 0x0000000000534557 in command_loop_1 () at keyboard.c:1384
        cmd = <optimized out>
        keybuf = {make_fixnum(8), make_fixnum(104), XIL(0xa0), XIL(0x77801d4f9d80), make_fixnum(0), XIL(0x30), XIL(0), XIL(0x59cb1d), XIL(0x34e0), XIL(0x60), XIL(0), XIL(0), XIL(0), XIL(0x59df58), XIL(0xb), XIL(0xed90), XIL(0x30), XIL(0x3ff483b5), XIL(0), XIL(0x91f9856df0c3e200), XIL(0xbd1480), XIL(0x429b3943), XIL(0x60), XIL(0x529bcb), XIL(0), XIL(0x69d29f4a770d), XIL(0xbd1480), XIL(0x91f9856df0c3e200), XIL(0x60), XIL(0x69d29f76f0db)}
        i = <optimized out>
        prev_modiff = 24
        prev_buffer = 0x69d29f4a7708
#24 0x000000000059d1ac in internal_condition_case (bfun=bfun@entry=0x53431d <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x529a60 <cmd_error>) at eval.c:1474
        val = <optimized out>
        c = 0x3e3dcfe0
#25 0x0000000000524551 in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1133
        val = <optimized out>
#26 0x000000000059d11a in internal_catch (tag=tag@entry=XIL(0xfc90), func=func@entry=0x524537 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1197
        val = <optimized out>
        c = 0x3e3f9630
#27 0x000000000052450e in command_loop () at keyboard.c:1111
No locals.
#28 0x000000000052960a in recursive_edit_1 () at keyboard.c:720
        count = <optimized out>
        val = <optimized out>
#29 0x0000000000529959 in Frecursive_edit () at keyboard.c:803
        count = <optimized out>
        buffer = <optimized out>
#30 0x0000000000523a4c in main (argc=2, argv=<optimized out>) at emacs.c:2521
        stack_bottom_variable = 0x69d2a24c9da0 <(anonymous namespace)::moneypunct_cache_ct>
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = <optimized out>
        dump_mode = <optimized out>
        skip_args = 1
        temacs = 0x0
        attempt_load_pdump = <optimized out>
        only_version = false
        rlim = {
          rlim_cur = 10022912,
          rlim_max = 18446744073709551615
        }
        lc_all = <optimized out>
        sockfd = -1
        module_assertions = <optimized out>
You can't do that without a process to debug.
#8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
warning: Source file is more recent than executable.
94	  if (METRICS_STATUS (cache) == METRICS_INVALID)
$1 = (struct font_metrics *) 0x12d
$2 = (struct font_metrics *) 0x1
$3 = {
  font = {
    header = {
      size = 4611686018997895185
    },
    props = {XIL(0x7c50), XIL(0x3e581280), XIL(0x41493ef0), XIL(0), XIL(0x9870), make_fixnum(20544), make_fixnum(25632), make_fixnum(25664), make_fixnum(27), XIL(0), XIL(0), make_fixnum(0), XIL(0x42277373), XIL(0), XIL(0x40229f14), XIL(0x40229ef4), XIL(0x402299a4)},
    min_width = 8,
    max_width = 29,
    pixel_size = 27,
    height = 39,
    space_width = 10,
    average_width = 15,
    ascent = 31,
    descent = 8,
    underline_thickness = 0,
    underline_position = 3,
    vertical_centering = false,
    baseline_offset = 0,
    relative_compose = 0,
    default_ascent = 0,
    encoding_charset = -1,
    repertory_charset = -1,
    driver = 0xc0ece0 <ftcrhbfont_driver>
  },
  ft_size = 0x0,
  index = 1072040480,
  matrix = {
    xx = 0,
    xy = 1109821571,
    yx = 5,
    yy = 0
  },
  hb_font = 0x0,
  cr_scaled_font = 0x4211a9e0,
  bitmap_position_unit = 0,
  metrics = 0x41412720,
  metrics_nrows = 10
}
quit





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-12 14:42             ` Yuchen Guo
@ 2023-10-14 11:00               ` Eli Zaretskii
  2023-10-14 11:26                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-14 11:00 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: luangruo, 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  66416@debbugs.gnu.org
> Date: Thu, 12 Oct 2023 14:42:56 +0000
> 
> Here is the same information, with .gdbinit loaded, output from
> 
>      (gdb) bt full
>      (gdb) fr 8
>      (gdb) p cache
>      (gdb) p ftcrfont_info->metrics[row]
>      (gdb) p *ftcrfont_info

Thanks.  Po Lu, any ideas?





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 11:00               ` Eli Zaretskii
@ 2023-10-14 11:26                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-14 12:38                   ` Eli Zaretskii
  2023-10-14 12:40                   ` Yuchen Guo
  0 siblings, 2 replies; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-14 11:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Yuchen Guo, 66416

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Yuchen Guo <yguo@posteo.net>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  66416@debbugs.gnu.org
>> Date: Thu, 12 Oct 2023 14:42:56 +0000
>> 
>> Here is the same information, with .gdbinit loaded, output from
>> 
>>      (gdb) bt full
>>      (gdb) fr 8
>>      (gdb) p cache
>>      (gdb) p ftcrfont_info->metrics[row]
>>      (gdb) p *ftcrfont_info
>
> Thanks.  Po Lu, any ideas?

None, sorry.  Do you know which font that is?  If so, perhaps I can
reproduce the crash myself.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 11:26                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-14 12:38                   ` Eli Zaretskii
  2023-10-14 12:40                   ` Yuchen Guo
  1 sibling, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-14 12:38 UTC (permalink / raw)
  To: Po Lu; +Cc: yguo, 66416

> From: Po Lu <luangruo@yahoo.com>
> Cc: Yuchen Guo <yguo@posteo.net>,  66416@debbugs.gnu.org
> Date: Sat, 14 Oct 2023 19:26:22 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Yuchen Guo <yguo@posteo.net>
> >> Cc: Eli Zaretskii <eliz@gnu.org>,  66416@debbugs.gnu.org
> >> Date: Thu, 12 Oct 2023 14:42:56 +0000
> >> 
> >> Here is the same information, with .gdbinit loaded, output from
> >> 
> >>      (gdb) bt full
> >>      (gdb) fr 8
> >>      (gdb) p cache
> >>      (gdb) p ftcrfont_info->metrics[row]
> >>      (gdb) p *ftcrfont_info
> >
> > Thanks.  Po Lu, any ideas?
> 
> None, sorry.  Do you know which font that is?  If so, perhaps I can
> reproduce the crash myself.

I don't know, but the configuration was posted at the beginning of
this discussion:

  https://codeberg.org/m0p/dotfiles/raw/commit/62d1a6008c0e391a33239a809aee92e4c03f14b5/imports/not-nix-config-files/emacs-init.el






^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 11:26                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-14 12:38                   ` Eli Zaretskii
@ 2023-10-14 12:40                   ` Yuchen Guo
  2023-10-14 12:44                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 42+ messages in thread
From: Yuchen Guo @ 2023-10-14 12:40 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 66416

Po Lu <luangruo@yahoo.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Thanks.  Po Lu, any ideas?
>
> None, sorry.  Do you know which font that is?  If so, perhaps I can
> reproduce the crash myself.

How can I deduce the font name from the coredump?  And curiously this
crash only happens after using Emacs for sometime.  Viewing HELLO does
not crash Emacs out of the box.

Here is a full list of fonts on my machine, as produced by fc-list:

https://codeberg.org/m0p/ublock-origin-mirror/raw/branch/main/fc-list.txt

Alternatively, you can view the list of font packages installed, as
described by Nix:

https://codeberg.org/m0p/dotfiles/src/commit/460d5e9bb068368c6d38b546852f70d67730c65e/imports/desktop.nix

Line 217-247 and 403-408.

Worth noting is that I installed quite a few fonts from CTAN
(Comprehensive TeX Archive Network) into my system font path.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 12:40                   ` Yuchen Guo
@ 2023-10-14 12:44                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-14 14:23                       ` Yuchen Guo
  0 siblings, 1 reply; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-14 12:44 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: Eli Zaretskii, 66416

Yuchen Guo <yguo@posteo.net> writes:

> Po Lu <luangruo@yahoo.com> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> Thanks.  Po Lu, any ideas?
>>
>> None, sorry.  Do you know which font that is?  If so, perhaps I can
>> reproduce the crash myself.
>
> How can I deduce the font name from the coredump?  And curiously this
> crash only happens after using Emacs for sometime.

Is it possible to build Emacs with -fsanitize=address?  This is further
expounded upon in the GCC manual, and IME generally proves fruitful for
such spasmodic bugs, since you can run Emacs with address sanitization
enabled for extended periods of time as your "daily driver" (vis-a-vis
tools such as Valgrind, which incur a prohibitive performance penalty).





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 12:44                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-14 14:23                       ` Yuchen Guo
  2023-10-14 15:40                         ` Eli Zaretskii
  2023-10-15  1:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-14 14:23 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 66416

Po Lu <luangruo@yahoo.com> writes:

> Is it possible to build Emacs with -fsanitize=address?

Yes, I've added this argument to CFLAGS and am rebuilding now.

Of note, I rebuilt pgtk Emacs without native compilation in order to
save time. Emacs has not yet crashed since that rebuild.  Don't know if
this might be related.

> This is further expounded upon in the GCC manual, and IME generally
> proves fruitful for such spasmodic bugs, since you can run Emacs with
> address sanitization enabled for extended periods of time as your
> "daily driver" (vis-a-vis tools such as Valgrind, which incur a
> prohibitive performance penalty).

I'm currently starting Emacs server with systemd and hoping it would
crash sooner, but not when I'm writing assignments. ;-)

Update: the rebuild failed with the following output:

  ELC      textmodes/less-css-mode.elc
  ELC      textmodes/makeinfo.elc
  ELC      textmodes/mhtml-mode.elc
  ELC      textmodes/nroff-mode.elc
  ELC      textmodes/page-ext.elc
  ELC      textmodes/picture.elc

=================================================================
==14797==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
    #1 0x74ddda in lmalloc /build/source/src/alloc.c:1365

Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
    #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
    #1 0x74de07 in lmalloc /build/source/src/alloc.c:1365

SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
make[3]: *** [Makefile:332: progmodes/typescript-ts-mode.elc] Error 1
make[3]: *** Waiting for unfinished jobs....

=================================================================
==14881==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
    #1 0x74ddda in lmalloc /build/source/src/alloc.c:1365

Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
    #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
    #1 0x74de07 in lmalloc /build/source/src/alloc.c:1365

SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
make[3]: *** [Makefile:332: textmodes/mhtml-mode.elc] Error 1
make[3]: Leaving directory '/build/source/lisp'
make[2]: *** [Makefile:366: compile-main] Error 2





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 14:23                       ` Yuchen Guo
@ 2023-10-14 15:40                         ` Eli Zaretskii
  2023-10-15  1:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2023-10-14 15:40 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: luangruo, 66416

> From: Yuchen Guo <yguo@posteo.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  66416@debbugs.gnu.org
> Date: Sat, 14 Oct 2023 14:23:44 +0000
> 
> Po Lu <luangruo@yahoo.com> writes:
> 
> > Is it possible to build Emacs with -fsanitize=address?
> 
> Yes, I've added this argument to CFLAGS and am rebuilding now.
> 
> Of note, I rebuilt pgtk Emacs without native compilation in order to
> save time. Emacs has not yet crashed since that rebuild.  Don't know if
> this might be related.
> 
> > This is further expounded upon in the GCC manual, and IME generally
> > proves fruitful for such spasmodic bugs, since you can run Emacs with
> > address sanitization enabled for extended periods of time as your
> > "daily driver" (vis-a-vis tools such as Valgrind, which incur a
> > prohibitive performance penalty).
> 
> I'm currently starting Emacs server with systemd and hoping it would
> crash sooner, but not when I'm writing assignments. ;-)
> 
> Update: the rebuild failed with the following output:
> 
>   ELC      textmodes/less-css-mode.elc
>   ELC      textmodes/makeinfo.elc
>   ELC      textmodes/mhtml-mode.elc
>   ELC      textmodes/nroff-mode.elc
>   ELC      textmodes/page-ext.elc
>   ELC      textmodes/picture.elc
> 
> =================================================================
> ==14797==ERROR: LeakSanitizer: detected memory leaks
> 
> Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
>     #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
>     #1 0x74ddda in lmalloc /build/source/src/alloc.c:1365
> 
> Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
>     #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
>     #1 0x74de07 in lmalloc /build/source/src/alloc.c:1365
> 
> SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
> make[3]: *** [Makefile:332: progmodes/typescript-ts-mode.elc] Error 1
> make[3]: *** Waiting for unfinished jobs....
> 
> =================================================================
> ==14881==ERROR: LeakSanitizer: detected memory leaks
> 
> Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
>     #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
>     #1 0x74ddda in lmalloc /build/source/src/alloc.c:1365
> 
> Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
>     #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
>     #1 0x74de07 in lmalloc /build/source/src/alloc.c:1365
> 
> SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
> make[3]: *** [Makefile:332: textmodes/mhtml-mode.elc] Error 1
> make[3]: Leaving directory '/build/source/lisp'
> make[2]: *** [Makefile:366: compile-main] Error 2

I think it is best to suppress memory-leak testing at this stage,
since the problems we are investigating cannot be caused by leaks (if
these leaks are real leaks at all).





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
  2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
                   ` (3 preceding siblings ...)
  2023-10-12  7:46 ` bug#66416: GDB output from new crash Yuchen Guo
@ 2023-10-14 19:14 ` Yuchen Guo
  2024-04-16  0:27   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
       [not found]   ` <87mspui23l.fsf@>
  4 siblings, 2 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-14 19:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: luangruo, 66416

I took the liberty of using a more descriptive email subject.

The build without Native Compilation also crashed, with mostly
identical causes.  This confirms the previous crashes are not one-off
events caused by M-x butterfly.

Here are the usual outputs from

      (gdb) bt full
      (gdb) fr 8
      (gdb) p cache
      (gdb) p ftcrfont_info->metrics[row]
      (gdb) p *ftcrfont_info

#0  0x000069d2a5a93a8c in __pthread_kill_implementation () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x000069d2a5a44c86 in raise () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#2  0x0000000000522793 in terminate_due_to_signal (sig=sig@entry=11, backtrace_limit=backtrace_limit@entry=40) at emacs.c:464
No locals.
#3  0x000000000053de25 in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1783
No locals.
#4  0x000000000053de52 in deliver_thread_signal (sig=sig@entry=11, handler=handler@entry=0x53de17 <handle_fatal_signal>) at sysdep.c:1775
        old_errno = 13
#5  0x000000000053deb6 in deliver_fatal_thread_signal (sig=sig@entry=11) at sysdep.c:1795
No locals.
#6  0x000000000053dfa5 in handle_sigsegv (sig=11, siginfo=<optimized out>, arg=<optimized out>) at sysdep.c:1888
        fatal = <optimized out>
#7  <signal handler called>
No symbol table info available.
#8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
        ftcrfont_info = 0x3fe60998
        row = 9
        col = 30
        cache = 0x12d
#9  0x0000000000616e8e in ftcrfont_draw (s=0x77801d4f6d50, from=0, to=<optimized out>, x=427, y=427, with_background=<optimized out>) at ftcrfont.c:604
        f = 0x42a23c18
        ftcrfont_info = 0x3fe60998
        cr = 0x3f4a1280
        glyphs = 0x77801d4f68a0
        len = 1
        i = 0
#10 0x000000000063d1f9 in pgtk_draw_composite_glyph_string_foreground (s=s@entry=0x77801d4f6d50) at pgtkterm.c:1536
        xoff = <optimized out>
        yoff = <optimized out>
        wadjust = 0
        gstring = XIL(0x3fe60f2d)
        glyph = <optimized out>
        y = 431
        width = <optimized out>
        i = 0
        j = <optimized out>
        x = 426
        font = 0x3fe60998
#11 0x00000000006401c3 in pgtk_draw_glyph_string (s=0x77801d4f6d50) at pgtkterm.c:2525
        relief_drawn_p = false
        cr = 0x3f4a1280
#12 0x00000000004b3264 in draw_glyphs (w=w@entry=0x426092e0, x=483, row=0x3f3ab600, area=area@entry=TEXT_AREA, start=<optimized out>, start@entry=0, end=<optimized out>, end@entry=39, hl=<optimized out>, overlaps=<optimized out>) at xdisp.c:30636
        head = 0x77801d4f8040
        tail = 0x77801d4f69d0
        s = 0x77801d4f6d50
        clip_head = 0x0
        clip_tail = 0x0
        i = <optimized out>
        j = <optimized out>
        x_reached = <optimized out>
        last_x = <optimized out>
        area_left = <optimized out>
        f = <optimized out>
        sa_avail = 15820
        sa_count = <optimized out>
#13 0x00000000004b34f0 in gui_write_glyphs (w=0x426092e0, updated_row=<optimized out>, start=<optimized out>, updated_area=TEXT_AREA, len=39) at xdisp.c:32699
        x = <optimized out>
        hpos = 0
        chpos = 0
#14 0x0000000000466ce1 in update_text_area (w=w@entry=0x426092e0, updated_row=updated_row@entry=0x3f3ab600, vpos=vpos@entry=10, partial_p=partial_p@entry=0x77801d4f8387) at dispnew.c:4001
        current_row = 0x3f3830f0
        desired_row = 0x3f3ab600
        rif = 0xb3e360 <pgtk_redisplay_interface>
        changed_p = false
#15 0x0000000000469f48 in update_window_line (w=w@entry=0x426092e0, vpos=vpos@entry=10, mouse_face_overwritten_p=mouse_face_overwritten_p@entry=0x77801d4f8407) at dispnew.c:4259
        current_row = 0x3f3830f0
        desired_row = 0x3f3ab600
        rif = 0xb3e360 <pgtk_redisplay_interface>
        changed_p = false
        partial_p = false
        was_stipple = <optimized out>
#16 0x000000000046d5ef in update_window (w=w@entry=0x426092e0, force_p=force_p@entry=true) at dispnew.c:3731
        vpos = 10
        i = <optimized out>
        end = 0x3f3ada00
        tab_line_row = <optimized out>
        mouse_face_overwritten_p = false
        n_updated = 0
        mode_line_row = 0x3f3ada00
        changed_p = true
        invisible_rows_marked = false
        row = 0x3f3ab600
        header_line_row = <optimized out>
        yb = <optimized out>
        desired_matrix = 0x4253a6a0
        paused_p = <optimized out>
        preempt_count = <optimized out>
        rif = <optimized out>
#17 0x000000000046d991 in update_window_tree (w=w@entry=0x426092e0, force_p=force_p@entry=true) at dispnew.c:3456
        paused_p = false
#18 0x000000000046da91 in update_frame (f=f@entry=0x42a23c18, force_p=true, force_p@entry=false, inhibit_hairy_id_p=inhibit_hairy_id_p@entry=false) at dispnew.c:3291
        paused_p = <optimized out>
        root_window = 0x426092e0
#19 0x00000000004abe90 in redisplay_internal () at xdisp.c:17122
        gcscrollbars = true
        f_redisplay_flag = false
        f = 0x42a23c18
        w = 0x426092e0
        sw = <optimized out>
        fr = <optimized out>
        pending = false
        must_finish = <optimized out>
        match_p = <optimized out>
        tlbufpos = <optimized out>
        tlendpos = <optimized out>
        number_of_visible_frames = <optimized out>
        sf = <optimized out>
        polling_stopped_here = true
        tail = <optimized out>
        frame = XIL(0x42a23c1d)
        MAX_HSCROLL_RETRIES = MAX_HSCROLL_RETRIES
        hscroll_retries = <optimized out>
        MAX_GARBAGED_FRAME_RETRIES = MAX_GARBAGED_FRAME_RETRIES
        garbaged_frame_retries = 0
        consider_all_windows_p = <optimized out>
        update_miniwindow_p = <optimized out>
        count = <optimized out>
        retry_frame = <optimized out>
#20 0x00000000004ac707 in redisplay () at xdisp.c:16225
No locals.
#21 0x0000000000531938 in read_char (commandflag=1, map=map@entry=XIL(0x428bf0f3), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x77801d4f9c0b, end_time=end_time@entry=0x0) at keyboard.c:2636
        echo_current = true
        c = <optimized out>
        local_getcjmp = {{
            __jmpbuf = {0, 131392131275168, 0, 36960, 12440512, 0, 2, 3822},
            __mask_was_saved = 1072989109,
            __saved_mask = {
              __val = {5823051, 36960, 131392131275312, 2, 5940859, 1058952896, 1062107776, 1049704224, 5821465, 0, 1058952896, 1057136819, 5821812, 1057136659, 5482667, 4294967296}
            }
          }}
        save_jump = {{
            __jmpbuf = {0, 40272, 0, 0, 0, 131392131275504, 0, 1111710579},
            __mask_was_saved = 1,
            __saved_mask = {
              __val = {10518585111937802752, 1, 1116467347, 0, 10518585111937802752, 1116467427, 4294967295, 48, 5483074, 0, 0, 1053901840, 10518585111937802752, 8194, 0, 0}
            }
          }}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = XIL(0)
        also_record = XIL(0)
        reread = false
        recorded = false
        polling_stopped_here = false
        orig_kboard = 0x3f225150
        jmpcount = <optimized out>
#22 0x00000000005330f1 in read_key_sequence (keybuf=keybuf@entry=0x77801d4f9d10, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) at keyboard.c:10084
        interrupted_kboard = 0x3f225150
        interrupted_frame = 0x42a23c18
        key = <optimized out>
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = <optimized out>
        count = <optimized out>
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = XIL(0x428bf0f3)
        first_unbound = 31
        mock_input = 0
        used_mouse_menu_history = {false <repeats 30 times>}
        fkey = {
          parent = XIL(0x3f040773),
          map = XIL(0x3f040773),
          start = 0,
          end = 0
        }
        keytran = {
          parent = XIL(0x69d29fddb043),
          map = XIL(0x69d29fddb043),
          start = 0,
          end = 0
        }
        indec = {
          parent = XIL(0x3f0407c3),
          map = XIL(0x3f0407c3),
          start = 0,
          end = 0
        }
        shift_translated = false
        delayed_switch_frame = XIL(0)
        original_uppercase = XIL(0x9060)
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0x3ff483b0
        fake_prefixed_keys = XIL(0)
        first_event = XIL(0)
        second_event = <optimized out>
#23 0x0000000000534557 in command_loop_1 () at keyboard.c:1384
        cmd = <optimized out>
        keybuf = {make_fixnum(8), make_fixnum(104), XIL(0xa0), XIL(0x77801d4f9d80), make_fixnum(0), XIL(0x30), XIL(0), XIL(0x59cb1d), XIL(0x34e0), XIL(0x60), XIL(0), XIL(0), XIL(0), XIL(0x59df58), XIL(0xb), XIL(0xed90), XIL(0x30), XIL(0x3ff483b5), XIL(0), XIL(0x91f9856df0c3e200), XIL(0xbd1480), XIL(0x429b3943), XIL(0x60), XIL(0x529bcb), XIL(0), XIL(0x69d29f4a770d), XIL(0xbd1480), XIL(0x91f9856df0c3e200), XIL(0x60), XIL(0x69d29f76f0db)}
        i = <optimized out>
        prev_modiff = 24
        prev_buffer = 0x69d29f4a7708
#24 0x000000000059d1ac in internal_condition_case (bfun=bfun@entry=0x53431d <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x529a60 <cmd_error>) at eval.c:1474
        val = <optimized out>
        c = 0x3e3dcfe0
#25 0x0000000000524551 in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1133
        val = <optimized out>
#26 0x000000000059d11a in internal_catch (tag=tag@entry=XIL(0xfc90), func=func@entry=0x524537 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1197
        val = <optimized out>
        c = 0x3e3f9630
#27 0x000000000052450e in command_loop () at keyboard.c:1111
No locals.
#28 0x000000000052960a in recursive_edit_1 () at keyboard.c:720
        count = <optimized out>
        val = <optimized out>
#29 0x0000000000529959 in Frecursive_edit () at keyboard.c:803
        count = <optimized out>
        buffer = <optimized out>
#30 0x0000000000523a4c in main (argc=2, argv=<optimized out>) at emacs.c:2521
        stack_bottom_variable = 0x69d2a24c9da0 <(anonymous namespace)::moneypunct_cache_ct>
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = <optimized out>
        dump_mode = <optimized out>
        skip_args = 1
        temacs = 0x0
        attempt_load_pdump = <optimized out>
        only_version = false
        rlim = {
          rlim_cur = 10022912,
          rlim_max = 18446744073709551615
        }
        lc_all = <optimized out>
        sockfd = -1
        module_assertions = <optimized out>
You can't do that without a process to debug.
#8  ftcrfont_glyph_extents (font=0x3fe60998, glyph=1182, metrics=metrics@entry=0x0) at ftcrfont.c:94
warning: Source file is more recent than executable.
94	  if (METRICS_STATUS (cache) == METRICS_INVALID)
$1 = (struct font_metrics *) 0x12d
$2 = (struct font_metrics *) 0x1
$3 = {
  font = {
    header = {
      size = 4611686018997895185
    },
    props = {XIL(0x7c50), XIL(0x3e581280), XIL(0x41493ef0), XIL(0), XIL(0x9870), make_fixnum(20544), make_fixnum(25632), make_fixnum(25664), make_fixnum(27), XIL(0), XIL(0), make_fixnum(0), XIL(0x42277373), XIL(0), XIL(0x40229f14), XIL(0x40229ef4), XIL(0x402299a4)},
    min_width = 8,
    max_width = 29,
    pixel_size = 27,
    height = 39,
    space_width = 10,
    average_width = 15,
    ascent = 31,
    descent = 8,
    underline_thickness = 0,
    underline_position = 3,
    vertical_centering = false,
    baseline_offset = 0,
    relative_compose = 0,
    default_ascent = 0,
    encoding_charset = -1,
    repertory_charset = -1,
    driver = 0xc0ece0 <ftcrhbfont_driver>
  },
  ft_size = 0x0,
  index = 1072040480,
  matrix = {
    xx = 0,
    xy = 1109821571,
    yx = 5,
    yy = 0
  },
  hb_font = 0x0,
  cr_scaled_font = 0x4211a9e0,
  bitmap_position_unit = 0,
  metrics = 0x41412720,
  metrics_nrows = 10
}
quit
#0  0x00006e1dcf955a8c in __pthread_kill_implementation () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#1  0x00006e1dcf906c86 in raise () from /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6
No symbol table info available.
#2  0x0000000000520389 in terminate_due_to_signal (sig=sig@entry=11, backtrace_limit=backtrace_limit@entry=40) at emacs.c:464
No locals.
#3  0x000000000053b9c3 in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1783
No locals.
#4  0x000000000053b9f0 in deliver_thread_signal (sig=sig@entry=11, handler=handler@entry=0x53b9b5 <handle_fatal_signal>) at sysdep.c:1775
        old_errno = 11
#5  0x000000000053ba54 in deliver_fatal_thread_signal (sig=sig@entry=11) at sysdep.c:1795
No locals.
#6  0x000000000053bb43 in handle_sigsegv (sig=11, siginfo=<optimized out>, arg=<optimized out>) at sysdep.c:1888
        fatal = <optimized out>
#7  <signal handler called>
No symbol table info available.
#8  ftcrfont_glyph_extents (font=0x20a9e158, glyph=1177, metrics=metrics@entry=0x0) at ftcrfont.c:94
        ftcrfont_info = 0x20a9e158
        row = 9
        col = 25
        cache = 0x1000100000000fa
#9  0x000000000060a433 in ftcrfont_draw (s=0x78f5309c62d0, from=0, to=<optimized out>, x=163, y=810, with_background=<optimized out>) at ftcrfont.c:604
        f = 0x2f2eec08
        ftcrfont_info = 0x20a9e158
        cr = 0x2f9c4350
        glyphs = 0x78f5309c5740
        len = 1
        i = 0
#10 0x000000000063079e in pgtk_draw_composite_glyph_string_foreground (s=s@entry=0x78f5309c62d0) at pgtkterm.c:1536
        xoff = <optimized out>
        yoff = <optimized out>
        wadjust = 0
        gstring = XIL(0x2fa14bb5)
        glyph = <optimized out>
        y = 810
        width = <optimized out>
        i = 0
        j = <optimized out>
        x = 148
        font = 0x20a9e158
#11 0x0000000000633768 in pgtk_draw_glyph_string (s=0x78f5309c62d0) at pgtkterm.c:2525
        relief_drawn_p = false
        cr = 0x2f9c4350
#12 0x00000000004b0e64 in draw_glyphs (w=w@entry=0x2f2eee50, x=677, row=0x2f1a1400, area=area@entry=TEXT_AREA, start=<optimized out>, start@entry=0, end=<optimized out>, end@entry=20, hl=<optimized out>, overlaps=<optimized out>) at xdisp.c:30636
        head = 0x78f5309c6590
        tail = 0x78f5309c5870
        s = 0x78f5309c62d0
        clip_head = 0x0
        clip_tail = 0x0
        i = <optimized out>
        j = <optimized out>
        x_reached = <optimized out>
        last_x = <optimized out>
        area_left = <optimized out>
        f = <optimized out>
        sa_avail = 16148
        sa_count = <optimized out>
#13 0x00000000004b10f0 in gui_write_glyphs (w=0x2f2eee50, updated_row=<optimized out>, start=<optimized out>, updated_area=TEXT_AREA, len=20) at xdisp.c:32699
        x = <optimized out>
        hpos = 0
        chpos = 0
#14 0x00000000004648e1 in update_text_area (w=w@entry=0x2f2eee50, updated_row=updated_row@entry=0x2f1a1400, vpos=vpos@entry=20, partial_p=partial_p@entry=0x78f5309c68d7) at dispnew.c:4001
        current_row = 0x351f5410
        desired_row = 0x2f1a1400
        rif = 0xb2d320 <pgtk_redisplay_interface>
        changed_p = false
#15 0x0000000000467b48 in update_window_line (w=w@entry=0x2f2eee50, vpos=vpos@entry=20, mouse_face_overwritten_p=mouse_face_overwritten_p@entry=0x78f5309c6957) at dispnew.c:4259
        current_row = 0x351f5410
        desired_row = 0x2f1a1400
        rif = 0xb2d320 <pgtk_redisplay_interface>
        changed_p = false
        partial_p = false
        was_stipple = <optimized out>
#16 0x000000000046b1ef in update_window (w=w@entry=0x2f2eee50, force_p=force_p@entry=true) at dispnew.c:3731
        vpos = 20
        i = <optimized out>
        end = 0x2f1a2e00
        tab_line_row = <optimized out>
        mouse_face_overwritten_p = false
        n_updated = 0
        mode_line_row = 0x2f1a2e00
        changed_p = true
        invisible_rows_marked = false
        row = 0x2f1a1400
        header_line_row = <optimized out>
        yb = <optimized out>
        desired_matrix = 0x2f28b710
        paused_p = <optimized out>
        preempt_count = <optimized out>
        rif = <optimized out>
#17 0x000000000046b591 in update_window_tree (w=w@entry=0x2f2eee50, force_p=force_p@entry=true) at dispnew.c:3456
        paused_p = false
#18 0x000000000046b691 in update_frame (f=f@entry=0x2f2eec08, force_p=true, force_p@entry=false, inhibit_hairy_id_p=inhibit_hairy_id_p@entry=false) at dispnew.c:3291
        paused_p = <optimized out>
        root_window = 0x2f2eee50
#19 0x00000000004a9e8c in redisplay_internal () at xdisp.c:17225
        mini_window = <optimized out>
        mini_frame = <optimized out>
        w = 0x2f2eee50
        sw = <optimized out>
        fr = <optimized out>
        pending = false
        must_finish = <optimized out>
        match_p = <optimized out>
        tlbufpos = <error reading variable tlbufpos (DWARF-2 expression error: DW_OP_GNU_uninit must always be the very last op.)>
        tlendpos = <optimized out>
        number_of_visible_frames = 2
        sf = <optimized out>
        polling_stopped_here = true
        tail = <optimized out>
        frame = <optimized out>
        MAX_HSCROLL_RETRIES = MAX_HSCROLL_RETRIES
        hscroll_retries = <optimized out>
        MAX_GARBAGED_FRAME_RETRIES = MAX_GARBAGED_FRAME_RETRIES
        garbaged_frame_retries = <optimized out>
        consider_all_windows_p = <optimized out>
        update_miniwindow_p = <optimized out>
        count = <optimized out>
        retry_frame = <optimized out>
#20 0x00000000004aa307 in redisplay () at xdisp.c:16225
No locals.
#21 0x000000000052f4d6 in read_char (commandflag=1, map=map@entry=XIL(0x25eaf2d3), prev_event=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x78f5309c815b, end_time=end_time@entry=0x0) at keyboard.c:2636
        echo_current = true
        c = <optimized out>
        local_getcjmp = {{
            __jmpbuf = {2, 976, 563247573, 36960, 12323008, 0, 2, 6170},
            __mask_was_saved = 563247573,
            __saved_mask = {
              __val = {5811199, 36960, 132994477883264, 2, 0, 0, 5872571, 490317408, 96, 0, 545277696, 537969459, 5809960, 537969475, 5473353, 4294967296}
            }
          }}
        save_jump = {{
            __jmpbuf = {0, 40272, 0, 0, 0, 132994477883456, 0, 691299971},
            __mask_was_saved = 1,
            __saved_mask = {
              __val = {7914867513802438656, 1541, 636154787, 0, 7914867513802438656, 636154627, 4294967295, 48, 5473760, 0, 0, 484746464, 7914867513802438656, 6166, 0, 0}
            }
          }}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = XIL(0)
        also_record = XIL(0)
        reread = false
        recorded = false
        polling_stopped_here = false
        orig_kboard = 0x1d0744c0
        jmpcount = <optimized out>
#22 0x0000000000530c8f in read_key_sequence (keybuf=keybuf@entry=0x78f5309c8260, prompt=prompt@entry=XIL(0), dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false) at keyboard.c:10084
        interrupted_kboard = 0x1d0744c0
        interrupted_frame = 0x2f2eec08
        key = <optimized out>
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = <optimized out>
        count = <optimized out>
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = XIL(0x25eaf2d3)
        first_unbound = 31
        mock_input = 0
        used_mouse_menu_history = {false <repeats 30 times>}
        fkey = {
          parent = XIL(0x1ceebe33),
          map = XIL(0x1ceebe33),
          start = 0,
          end = 0
        }
        keytran = {
          parent = XIL(0x6e1dca15dd7b),
          map = XIL(0x6e1dca15dd7b),
          start = 0,
          end = 0
        }
        indec = {
          parent = XIL(0x1ceebed3),
          map = XIL(0x1ceebed3),
          start = 0,
          end = 0
        }
        shift_translated = false
        delayed_switch_frame = XIL(0)
        original_uppercase = XIL(0)
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0x219279d0
        fake_prefixed_keys = XIL(0)
        first_event = XIL(0)
        second_event = <optimized out>
#23 0x00000000005320f5 in command_loop_1 () at keyboard.c:1384
        cmd = <optimized out>
        keybuf = {make_fixnum(22), make_fixnum(104), XIL(0x3), XIL(0x78f5309c82d0), make_fixnum(0), XIL(0x30), XIL(0), XIL(0x599bbb), XIL(0x63f0), XIL(0x60), XIL(0), XIL(0), XIL(0), make_fixnum(1469437), XIL(0xb), XIL(0xed90), XIL(0x30), XIL(0x204c923d), XIL(0), XIL(0x6dd74211ac793800), XIL(0xbb49a0), XIL(0x26034ee3), XIL(0x60), XIL(0x527769), XIL(0), XIL(0x6e1dc99eb70d), XIL(0xbb49a0), XIL(0x6dd74211ac793800), XIL(0x60), XIL(0x6e1dca167b2b)}
        i = <optimized out>
        prev_modiff = 669
        prev_buffer = 0x219279d0
#24 0x000000000059a24a in internal_condition_case (bfun=bfun@entry=0x531ebb <command_loop_1>, handlers=handlers@entry=XIL(0x90), hfun=hfun@entry=0x5275fe <cmd_error>) at eval.c:1474
        val = <optimized out>
        c = 0x1c6b4d00
#25 0x00000000005220ef in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at keyboard.c:1133
        val = <optimized out>
#26 0x000000000059a1b8 in internal_catch (tag=tag@entry=XIL(0xfc90), func=func@entry=0x5220d5 <command_loop_2>, arg=arg@entry=XIL(0x90)) at eval.c:1197
        val = <optimized out>
        c = 0x1c6743c0
#27 0x00000000005220ac in command_loop () at keyboard.c:1111
No locals.
#28 0x00000000005271a8 in recursive_edit_1 () at keyboard.c:720
        count = <optimized out>
        val = <optimized out>
#29 0x00000000005274f7 in Frecursive_edit () at keyboard.c:803
        count = <optimized out>
        buffer = <optimized out>
#30 0x0000000000521642 in main (argc=2, argv=0x78f5309c8618) at emacs.c:2521
        stack_bottom_variable = 0x6e1dcbef0da0 <(anonymous namespace)::moneypunct_cache_ct>
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = <optimized out>
        dump_mode = <optimized out>
        skip_args = 1
        temacs = 0x0
        attempt_load_pdump = <optimized out>
        only_version = false
        rlim = {
          rlim_cur = 10022912,
          rlim_max = 18446744073709551615
        }
        lc_all = <optimized out>
        sockfd = -1
        module_assertions = <optimized out>
You can't do that without a process to debug.
#8  ftcrfont_glyph_extents (font=0x20a9e158, glyph=1177, metrics=metrics@entry=0x0) at ftcrfont.c:94
warning: Source file is more recent than executable.
94	  if (METRICS_STATUS (cache) == METRICS_INVALID)
$1 = (struct font_metrics *) 0x1000100000000fa
$2 = (struct font_metrics *) 0x100010000000000
$3 = {
  font = {
    header = {
      size = 4611686018997895185
    },
    props = {XIL(0x7c50), XIL(0x1c4b3380), XIL(0x1cccc130), XIL(0), XIL(0x9870), make_fixnum(20544), make_fixnum(25632), make_fixnum(25664), make_fixnum(27), XIL(0), XIL(0), make_fixnum(0), XIL(0x2938b6a3), XIL(0), XIL(0x2f874854), XIL(0x2f874874), XIL(0x2f0a7034)},
    min_width = 8,
    max_width = 29,
    pixel_size = 27,
    height = 39,
    space_width = 10,
    average_width = 15,
    ascent = 31,
    descent = 8,
    underline_thickness = 0,
    underline_position = 3,
    vertical_centering = false,
    baseline_offset = 0,
    relative_compose = 0,
    default_ascent = 0,
    encoding_charset = -1,
    repertory_charset = -1,
    driver = 0xbded80 <ftcrhbfont_driver>
  },
  ft_size = 0x0,
  index = 1,
  matrix = {
    xx = 0,
    xy = 1,
    yx = 1,
    yy = 0
  },
  hb_font = 0x0,
  cr_scaled_font = 0x2f0c5b30,
  bitmap_position_unit = 0,
  metrics = 0x206b8c60,
  metrics_nrows = 10
}
quit





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-14 14:23                       ` Yuchen Guo
  2023-10-14 15:40                         ` Eli Zaretskii
@ 2023-10-15  1:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-15  5:54                           ` Yuchen Guo
  1 sibling, 1 reply; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-15  1:11 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: Eli Zaretskii, 66416

Yuchen Guo <yguo@posteo.net> writes:

> I'm currently starting Emacs server with systemd and hoping it would
> crash sooner, but not when I'm writing assignments. ;-)
>
> Update: the rebuild failed with the following output:
>
>   ELC      textmodes/less-css-mode.elc
>   ELC      textmodes/makeinfo.elc
>   ELC      textmodes/mhtml-mode.elc
>   ELC      textmodes/nroff-mode.elc
>   ELC      textmodes/page-ext.elc
>   ELC      textmodes/picture.elc
>
> =================================================================
> ==14797==ERROR: LeakSanitizer: detected memory leaks
>
> Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
>     #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
>     #1 0x74ddda in lmalloc /build/source/src/alloc.c:1365
>
> Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
>     #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
>     #1 0x74de07 in lmalloc /build/source/src/alloc.c:1365
>
> SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
> make[3]: *** [Makefile:332: progmodes/typescript-ts-mode.elc] Error 1
> make[3]: *** Waiting for unfinished jobs....
>
> =================================================================
> ==14881==ERROR: LeakSanitizer: detected memory leaks
>
> Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
>     #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
>     #1 0x74ddda in lmalloc /build/source/src/alloc.c:1365
>
> Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
>     #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
>     #1 0x74de07 in lmalloc /build/source/src/alloc.c:1365
>
> SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
> make[3]: *** [Makefile:332: textmodes/mhtml-mode.elc] Error 1
> make[3]: Leaving directory '/build/source/lisp'
> make[2]: *** [Makefile:366: compile-main] Error 2

What if you insert -fsanitize-recover=all in CFLAGS?





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: GDB output from new crash
  2023-10-15  1:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-15  5:54                           ` Yuchen Guo
  0 siblings, 0 replies; 42+ messages in thread
From: Yuchen Guo @ 2023-10-15  5:54 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 66416

Po Lu <luangruo@yahoo.com> writes:

> What if you insert -fsanitize-recover=all in CFLAGS?

No luck, unfortunately.  The following text is the output with fsanitize-recover=all.

  ELC      textmodes/makeinfo.elc
  ELC      textmodes/mhtml-mode.elc
  ELC      textmodes/nroff-mode.elc
  ELC      textmodes/page-ext.elc

=================================================================
==14796==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
    #1 0x789f82 in lmalloc /build/source/src/alloc.c:1365

Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
    #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
    #1 0x789faf in lmalloc /build/source/src/alloc.c:1365

SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
make[3]: *** [Makefile:332: progmodes/typescript-ts-mode.elc] Error 1
make[3]: *** Waiting for unfinished jobs....

=================================================================
==14882==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 1528 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff79d7de7 in __interceptor_calloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbbde7)
    #1 0x789f82 in lmalloc /build/source/src/alloc.c:1365

Indirect leak of 1392 byte(s) in 8 object(s) allocated from:
    #0 0x7ffff79d83ff in __interceptor_malloc (/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libasan.so.8+0xbc3ff)
    #1 0x789faf in lmalloc /build/source/src/alloc.c:1365

SUMMARY: AddressSanitizer: 2920 byte(s) leaked in 10 allocation(s).
make[3]: *** [Makefile:332: textmodes/mhtml-mode.elc] Error 1
make[3]: Leaving directory '/build/source/lisp'
make[2]: *** [Makefile:366: compile-main] Error 2
make[2]: Leaving directory '/build/source/lisp'
make[1]: *** [Makefile:533: lisp] Error 2





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
  2023-10-14 19:14 ` bug#66416: 29.1; pgtk build crashes due to ftcrfont Yuchen Guo
@ 2024-04-16  0:27   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
       [not found]   ` <87mspui23l.fsf@>
  1 sibling, 0 replies; 42+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-16  0:27 UTC (permalink / raw)
  To: Yuchen Guo; +Cc: luangruo, Eli Zaretskii, 66416

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]


I'm not 100% sure if the crash I got is related but today I got a very similar backtrace
but with the X11/Gtk build.

The bug happened during regular code browsing. I don't
have a backtrace from a running version of Emacs but only a coredump.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs.xconnection_closed.gdb.log --]
[-- Type: text/x-log, Size: 21372 bytes --]

Warning: /home/bidar/../lwlib: No such file or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
DISPLAY = :0
TERM = xterm-256color
Breakpoint 1 at 0x55fb2cc11ebd: file ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c, line 441.
Breakpoint 2 at 0x55fb2cd23c00: file ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c, line 26990.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f510aa94a73 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f510aa41176 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x000055fb2cc11f70 in terminate_due_to_signal (sig=6, backtrace_limit=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:479
#4  0x000055fb2cc1261c in emacs_abort () at ../../emacs-30.0.50.5934.0fab2649e28/src/sysdep.c:2391
#5  0x000055fb2cc0e742 in redisplay_internal () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:16869
#6  0x000055fb2cc5f26a in redisplay_preserve_echo_area (from_where=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:17740
#7  0x000055fb2ce5c5eb in Fdelete_process (process=XIL(0x55fc70bb3075)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:1146
#8  0x000055fb2ce69cd5 in kill_buffer_processes (buffer=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:8288
#9  0x000055fb2cd588fa in shut_down_emacs (sig=sig@entry=6, stuff=stuff@entry=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:3104
#10 0x000055fb2cc11f3c in terminate_due_to_signal (sig=6, backtrace_limit=40) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:462
#11 0x000055fb2cc1261c in emacs_abort () at ../../emacs-30.0.50.5934.0fab2649e28/src/sysdep.c:2391
#12 0x000055fb2cc0e742 in redisplay_internal () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:16869
#13 0x000055fb2cc5f26a in redisplay_preserve_echo_area (from_where=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:17740
#14 0x000055fb2ce5c5eb in Fdelete_process (process=XIL(0x55fcae60bef5)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:1146
#15 0x000055fb2ce69cd5 in kill_buffer_processes (buffer=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:8288
#16 0x000055fb2cd588fa in shut_down_emacs (sig=0, stuff=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:3104
#17 0x000055fb2cd23937 in x_connection_closed (dpy=<optimized out>, error_message=<optimized out>, ioerror=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:26819
#18 0x000055fb2cd23c8a in x_error_quitter (display=0x55fb3ad0aa90, event=0x7ffdeb3a9570) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:27013
#19 0x000055fb2cd2415b in x_error_handler (display=0x55fb3ad0aa90, event=0x7ffdeb3a9570) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:26978
#20 0x00007f511519e3ab in _XError () at /lib64/libX11.so.6
#21 0x00007f511519e4a7 in  () at /lib64/libX11.so.6
#22 0x00007f511519e55d in  () at /lib64/libX11.so.6
#23 0x00007f511519e5e2 in _XEventsQueued () at /lib64/libX11.so.6
#24 0x00007f511519e985 in _XGetRequest () at /lib64/libX11.so.6
#25 0x00007f511511bff8 in XRenderCompositeText16 () at /lib64/libXrender.so.1
#26 0x00007f5115744c68 in  () at /lib64/libcairo.so.2
#27 0x00007f5115703a8d in  () at /lib64/libcairo.so.2
#28 0x00007f51156c9d87 in  () at /lib64/libcairo.so.2
#29 0x00007f51156ca330 in  () at /lib64/libcairo.so.2
#30 0x00007f5115676a31 in  () at /lib64/libcairo.so.2
#31 0x00007f511570d430 in  () at /lib64/libcairo.so.2
#32 0x00007f51156c9021 in  () at /lib64/libcairo.so.2
#33 0x00007f51156854cf in  () at /lib64/libcairo.so.2
#34 0x00007f51156d11c2 in cairo_show_glyphs () at /lib64/libcairo.so.2
#35 0x000055fb2ceb3cce in ftcrfont_draw (s=0x7ffdeb3ae680, from=<optimized out>, to=<optimized out>, x=<optimized out>, y=<optimized out>, with_background=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/ftcrfont.c:622
#36 0x000055fb2cd07e4d in x_draw_glyph_string_foreground (s=s@entry=0x7ffdeb3ae680) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:8642
#37 0x000055fb2cd0c3ea in x_draw_glyph_string (s=0x7ffdeb3ae680) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:10912
#38 0x000055fb2cc77064 in draw_glyphs (w=<optimized out>, x=1899, row=<optimized out>, area=<optimized out>, start=<optimized out>, end=<optimized out>, hl=<optimized out>, overlaps=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:31204
#39 0x000055fb2cc81f23 in gui_write_glyphs (w=0x55fcb07d2f28, updated_row=<optimized out>, start=<optimized out>, updated_area=TEXT_AREA, len=105) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:33346
#40 0x000055fb2cc1dad1 in update_text_area (partial_p=<synthetic pointer>, vpos=955, updated_row=0x55fc6b5c6290, w=0x55fcb07d2f28) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:4033
#41 update_window_line (w=w@entry=0x55fcb07d2f28, vpos=955, mouse_face_overwritten_p=mouse_face_overwritten_p@entry=0x7ffdeb3aee47) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:4291
#42 0x000055fb2cc249ff in update_window (w=w@entry=0x55fcb07d2f28, force_p=force_p@entry=true) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:3718
#43 0x000055fb2cc25f2b in update_window_tree (w=w@entry=0x55fcb07d2f28, force_p=force_p@entry=true) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:3488
#44 0x000055fb2cc26c9d in update_frame (f=0x55fcb07d2cb0, force_p=true, inhibit_hairy_id_p=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:3323
#45 0x000055fb2cc5dcc4 in redisplay_internal () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:17461
#46 0x000055fb2cd61b0f in redisplay () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:16562
#47 read_char (commandflag=1, map=XIL(0x55fb30a6ce13), prev_event=XIL(0), used_mouse_menu=0x7ffdeb3b09eb, end_time=0x0) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:2677
#48 0x000055fb2cd739ef in read_key_sequence (keybuf=0x7ffdeb3b0b80, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false, disable_text_conversion_p=false) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:10722
#49 0x000055fb2cd5ad97 in command_loop_1 () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1428
#50 0x000055fb2cdf7d07 in internal_condition_case (bfun=0x55fb2cd5abc0 <command_loop_1>, handlers=<optimized out>, hfun=0x55fb2cd59ca0 <cmd_error>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1537
#51 0x000055fb2cd5a0de in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1167
#52 0x000055fb2cdf7c11 in internal_catch (tag=<optimized out>, func=0x55fb2cd5a0b0 <command_loop_2>, arg=XIL(0x90)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1217
#53 0x000055fb2cd58bef in command_loop () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1137
#54 0x000055fb2cd59786 in recursive_edit_1 () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:753
#55 0x000055fb2cd59b9c in Frecursive_edit () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:836
#56 0x000055fb2cdfb24d in funcall_subr (subr=0x55fb2d44d7c0 <Srecursive_edit>, numargs=numargs@entry=0, args=args@entry=0x7ffdeb3b0fa0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3088
#57 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffdeb3b0fa0) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#58 0x000055fb2cdf8a16 in Ffuncall (nargs=1, args=0x7ffdeb3b0f98) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#59 0x00007f51023f58f6 in F6465627567_debug_0 () at /usr/lib64/emacs/30.0.50/native-lisp/30.0.50-fe1371f1/debug-bee52b4d-b0c8a741.eln
#60 0x000055fb2cdfb0fc in funcall_subr (subr=0x55fb349e9ad8, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1108) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3113
#61 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1108) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#62 0x000055fb2cdf8a16 in Ffuncall (nargs=nargs@entry=3, args=0x7ffdeb3b1100) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#63 0x000055fb2cdf8e80 in Fapply (nargs=nargs@entry=2, args=args@entry=0x7ffdeb3b11b0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2693
#64 0x000055fb2cdf9408 in apply1 (arg=XIL(0x55fb5213abe3), fn=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2907
#65 call_debugger (arg=XIL(0x55fb5213abe3)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:310
#66 0x000055fb2cdf9cd5 in maybe_call_debugger (error=XIL(0x55fb5213ac13), conditions=XIL(0x7f5106d91a03)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2051
#67 signal_or_quit (error_symbol=<optimized out>, data=<optimized out>, continuable=continuable@entry=false) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1876
#68 0x000055fb2cc15245 in Fsignal (error_symbol=<optimized out>, error_symbol@entry=XIL(0x12db0), data=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1746
#69 0x000055fb2cc15463 in xsignal (data=<optimized out>, error_symbol=XIL(0x12db0)) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:4808
#70 xsignal2 (error_symbol=XIL(0x12db0), arg1=<optimized out>, arg2=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1912
#71 0x000055fb2cc1435b in wrong_type_argument (predicate=<optimized out>, value=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/data.c:142
#72 0x000055fb2cc16e84 in check_obarray_slow (obarray=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:4914
#73 0x000055fb2ce36467 in check_obarray (obarray=XIL(0x55fc40b4ea8d)) at ../../emacs-30.0.50.5934.0fab2649e28/src/lisp.h:2465
#74 Fintern (string=XIL(0x55fb52250fe4), obarray=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:5034
#75 0x000055fb2cdfb15d in funcall_subr (subr=0x55fb2d45dea0 <Sintern>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1448) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3092
#76 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1448) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#77 0x000055fb2cdf8a16 in Ffuncall (nargs=3, args=0x7ffdeb3b1440) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#78 0x00007f51050ac210 in F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0 () at /home/bidar/.local/etc/emacs/eln-cache/30.0.50-fe1371f1/smartrep-70f56f9b-e639e68e.eln
#79 0x000055fb2cdfdece in funcall_lambda (fun=<optimized out>, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x7ffdeb3b15c8) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3279
#80 0x000055fb2cdf86e9 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b15c8) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2984
#81 0x000055fb2cdf8a16 in Ffuncall (nargs=2, args=0x7ffdeb3b15c0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#82 0x000055fb2ce0a33b in mapcar1 (leni=4, vals=vals@entry=0x0, fn=fn@entry=XIL(0x55fb3a4d46bd), seq=seq@entry=XIL(0x55fb340224a3)) at ../../emacs-30.0.50.5934.0fab2649e28/src/fns.c:3343
#83 0x000055fb2ce0a8f0 in Fmapc (function=XIL(0x55fb3a4d46bd), sequence=XIL(0x55fb340224a3)) at ../../emacs-30.0.50.5934.0fab2649e28/src/fns.c:3480
#84 0x000055fb2cdfb15d in funcall_subr (subr=0x55fb2d45ac60 <Smapc>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1788) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3092
#85 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1788) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#86 0x000055fb2cdf8a16 in Ffuncall (nargs=3, args=0x7ffdeb3b1780) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#87 0x00007f51050ac4cf in F736d6172747265702d646566696e652d6b6579_smartrep_define_key_0 () at /home/bidar/.local/etc/emacs/eln-cache/30.0.50-fe1371f1/smartrep-70f56f9b-e639e68e.eln
#88 0x000055fb2cdfdece in funcall_lambda (fun=<optimized out>, fun@entry=XIL(0x55fc510c2475), nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x7ffdeb3b1860) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3279
#89 0x000055fb2cdfe029 in apply_lambda (fun=<optimized out>, args=<optimized out>, count=count@entry=...) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3144
#90 0x000055fb2cdfb74b in eval_sub (form=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2615
#91 0x000055fb2cdfc120 in Fprogn (body=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:432
#92 0x000055fb2cdfbd76 in eval_sub (form=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2476
#93 0x000055fb2cdfde40 in Fprogn (body=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:432
#94 funcall_lambda (fun=<optimized out>, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0x7f51052000f0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3273
#95 0x000055fb2cdf86e9 in funcall_general (fun=<optimized out>, numargs=0, args=0x7f51052000f0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2984
#96 0x000055fb2ce4ef71 in exec_byte_code (fun=<optimized out>, args_template=<optimized out>, nargs=<optimized out>, args=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/bytecode.c:816
#97 0x000055fb2cdfde9a in funcall_lambda (fun=XIL(0x55fb43bdc4fd), nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x7ffdeb3b1d48) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3190
#98 0x000055fb2cdf86e9 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b1d48) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2984
#99 0x000055fb2cdf8a16 in Ffuncall (nargs=2, args=0x7ffdeb3b1d40) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#100 0x000055fb2cdf8b39 in funcall_nil (nargs=<optimized out>, args=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2704
#101 0x000055fb2cdfa971 in run_hook_with_args (nargs=2, args=0x7ffdeb3b1d40, funcall=funcall@entry=0x55fb2cdf8b30 <funcall_nil>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2881
#102 0x000055fb2cdfabd0 in Frun_hook_with_args (nargs=<optimized out>, args=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2746
#103 0x00007f510630166b in F646f2d61667465722d6c6f61642d6576616c756174696f6e_do_after_load_evaluation_0 () at /usr/bin/../lib64/emacs/30.0.50/native-lisp/30.0.50-fe1371f1/preloaded/subr-13adf6a6-e478be81.eln
#104 0x000055fb2cdfb146 in funcall_subr (subr=0x7f51065a4918, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b1fd8) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3090
#105 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b1fd8) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#106 0x000055fb2cdf8a16 in Ffuncall (nargs=2, args=0x7ffdeb3b1fd0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#107 0x000055fb2ce34c24 in Fload (file=<optimized out>, noerror=<optimized out>, nomessage=<optimized out>, nosuffix=<optimized out>, must_suffix=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:1807
#108 0x000055fb2cdf7488 in save_match_data_load (must_suffix=XIL(0x30), nosuffix=XIL(0), nomessage=XIL(0x30), noerror=XIL(0x30), file=XIL(0x55fb340e9944)) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:1841
#109 load_with_autoload_queue (file=XIL(0x55fb340e9944), noerror=XIL(0x30), nomessage=XIL(0x30), nosuffix=XIL(0), must_suffix=XIL(0x30)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2309
#110 0x000055fb2ce114ca in Frequire (feature=XIL(0x6c7eb20), filename=<optimized out>, noerror=XIL(0x30)) at ../../emacs-30.0.50.5934.0fab2649e28/src/fns.c:3762
#111 0x000055fb2cdfb171 in funcall_subr (subr=0x55fb2d45aa20 <Srequire>, numargs=<optimized out>, args=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3094
#112 0x000055fb2ce4f078 in exec_byte_code (fun=<optimized out>, args_template=<optimized out>, args_template@entry=0, nargs=<optimized out>, nargs@entry=0, args=<optimized out>, args@entry=0x0) at ../../emacs-30.0.50.5934.0fab2649e28/src/lisp.h:2242
#113 0x000055fb2ce51eab in Fbyte_code (bytestr=<optimized out>, vector=XIL(0x55fc40b4e6f5), maxdepth=make_fixnum(18)) at ../../emacs-30.0.50.5934.0fab2649e28/src/bytecode.c:329
#114 0x000055fb2cdfbec9 in eval_sub (form=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2531
#115 0x000055fb2ce34465 in readevalloop (readcharfun=readcharfun@entry=XIL(0x88b0), infile0=infile0@entry=0x7ffdeb3b2490, sourcename=sourcename@entry=XIL(0x55fb520bad84), printflag=printflag@entry=false, unibyte=unibyte@entry=XIL(0), readfun=readfun@entry=XIL(0), start=XIL(0), end=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:2601
#116 0x000055fb2ce35153 in Fload (file=<optimized out>, noerror=<optimized out>, nomessage=<optimized out>, nosuffix=<optimized out>, must_suffix=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:1792
#117 0x000055fb2cdf7488 in save_match_data_load (must_suffix=XIL(0x30), nosuffix=XIL(0), nomessage=XIL(0x30), noerror=XIL(0), file=XIL(0x55fb2e05c264)) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:1841
#118 load_with_autoload_queue (file=XIL(0x55fb2e05c264), noerror=noerror@entry=XIL(0), nomessage=nomessage@entry=XIL(0x30), nosuffix=nosuffix@entry=XIL(0), must_suffix=must_suffix@entry=XIL(0x30)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2309
#119 0x000055fb2cdf8477 in Fautoload_do_load (fundef=XIL(0x7f5105002323), funname=funname@entry=XIL(0xbece20), macro_only=macro_only@entry=XIL(0)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2355
#120 0x000055fb2cdfb7d7 in eval_sub (form=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2584
#121 0x000055fb2cdfde40 in Fprogn (body=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:432
#122 funcall_lambda (fun=<optimized out>, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0x7ffdeb3b2910) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3273
#123 0x000055fb2cdf86e9 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b2910) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2984
#124 0x000055fb2cdf8a16 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7ffdeb3b2908) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#125 0x000055fb2cdf8b1e in Ffuncall_interactively (nargs=2, args=0x7ffdeb3b2908) at ../../emacs-30.0.50.5987.9a79db506e3/src/callint.c:250
#126 0x000055fb2cdfb0fc in funcall_subr (subr=0x55fb2d4568e0 <Sfuncall_interactively>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b2908) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3113
#127 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b2908) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#128 0x000055fb2cdf8a16 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7ffdeb3b2900) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#129 0x000055fb2cdff273 in Fcall_interactively (function=<optimized out>, record_flag=<optimized out>, keys=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/callint.c:789
#130 0x00007f5106173a65 in F636f6d6d616e642d65786563757465_command_execute_0 () at /usr/bin/../lib64/emacs/30.0.50/native-lisp/30.0.50-fe1371f1/preloaded/simple-fab5b0cf-4bc03d0b.eln
#131 0x000055fb2cdfb195 in funcall_subr (subr=0x7f5106da1e68, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b2d48) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3096
#132 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=1, args=args@entry=0x7ffdeb3b2d48) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
#133 0x000055fb2cdf8a16 in Ffuncall (nargs=2, args=0x7ffdeb3b2d40) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
#134 0x000055fb2cd5afcf in command_loop_1 () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1549
#135 0x000055fb2cdf7d07 in internal_condition_case (bfun=0x55fb2cd5abc0 <command_loop_1>, handlers=<optimized out>, hfun=0x55fb2cd59ca0 <cmd_error>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1537
#136 0x000055fb2cd5a0de in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1167
#137 0x000055fb2cdf7c11 in internal_catch (tag=<optimized out>, func=0x55fb2cd5a0b0 <command_loop_2>, arg=XIL(0x90)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1217
#138 0x000055fb2cd58c49 in command_loop () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1145
#139 0x000055fb2cd59786 in recursive_edit_1 () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:753
#140 0x000055fb2cd59b9c in Frecursive_edit () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:836
#141 0x000055fb2cc1cadc in main (argc=2, argv=0x7ffdeb3b3218) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:2626
You can't do that without a process to debug.

Thread 7 (Thread 0x7f50fe8006c0 (LWP 35539)):
You can't do that without a process to debug.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
       [not found]   ` <87mspui23l.fsf@>
@ 2024-04-16 12:16     ` Eli Zaretskii
  2024-04-16 13:13       ` Mattias Engdegård
  2024-04-16 13:39       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 42+ messages in thread
From: Eli Zaretskii @ 2024-04-16 12:16 UTC (permalink / raw)
  To: Björn Bidar, Mattias Engdegård; +Cc: luangruo, yguo, 66416

> From: Björn Bidar <bjorn.bidar@thaodan.de>
> Cc: Eli Zaretskii <eliz@gnu.org>,  luangruo@yahoo.com,  66416@debbugs.gnu.org
> Date: Tue, 16 Apr 2024 03:27:10 +0300
> 
> I'm not 100% sure if the crash I got is related but today I got a very similar backtrace
> but with the X11/Gtk build.
> Breakpoint 1 at 0x55fb2cc11ebd: file ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c, line 441.
> Breakpoint 2 at 0x55fb2cd23c00: file ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c, line 26990.
> #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
> #1  0x00007f510aa94a73 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
> #2  0x00007f510aa41176 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
> #3  0x000055fb2cc11f70 in terminate_due_to_signal (sig=6, backtrace_limit=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:479
> #4  0x000055fb2cc1261c in emacs_abort () at ../../emacs-30.0.50.5934.0fab2649e28/src/sysdep.c:2391
> #5  0x000055fb2cc0e742 in redisplay_internal () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:16869
> #6  0x000055fb2cc5f26a in redisplay_preserve_echo_area (from_where=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:17740
> #7  0x000055fb2ce5c5eb in Fdelete_process (process=XIL(0x55fc70bb3075)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:1146
> #8  0x000055fb2ce69cd5 in kill_buffer_processes (buffer=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:8288
> #9  0x000055fb2cd588fa in shut_down_emacs (sig=sig@entry=6, stuff=stuff@entry=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:3104
> #10 0x000055fb2cc11f3c in terminate_due_to_signal (sig=6, backtrace_limit=40) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:462
> #11 0x000055fb2cc1261c in emacs_abort () at ../../emacs-30.0.50.5934.0fab2649e28/src/sysdep.c:2391
> #12 0x000055fb2cc0e742 in redisplay_internal () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:16869
> #13 0x000055fb2cc5f26a in redisplay_preserve_echo_area (from_where=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:17740
> #14 0x000055fb2ce5c5eb in Fdelete_process (process=XIL(0x55fcae60bef5)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:1146
> #15 0x000055fb2ce69cd5 in kill_buffer_processes (buffer=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/process.c:8288
> #16 0x000055fb2cd588fa in shut_down_emacs (sig=0, stuff=XIL(0)) at ../../emacs-30.0.50.5934.0fab2649e28/src/emacs.c:3104
> #17 0x000055fb2cd23937 in x_connection_closed (dpy=<optimized out>, error_message=<optimized out>, ioerror=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:26819
> #18 0x000055fb2cd23c8a in x_error_quitter (display=0x55fb3ad0aa90, event=0x7ffdeb3a9570) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:27013
> #19 0x000055fb2cd2415b in x_error_handler (display=0x55fb3ad0aa90, event=0x7ffdeb3a9570) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:26978
> #20 0x00007f511519e3ab in _XError () at /lib64/libX11.so.6
> #21 0x00007f511519e4a7 in  () at /lib64/libX11.so.6
> #22 0x00007f511519e55d in  () at /lib64/libX11.so.6
> #23 0x00007f511519e5e2 in _XEventsQueued () at /lib64/libX11.so.6
> #24 0x00007f511519e985 in _XGetRequest () at /lib64/libX11.so.6
> #25 0x00007f511511bff8 in XRenderCompositeText16 () at /lib64/libXrender.so.1
> #26 0x00007f5115744c68 in  () at /lib64/libcairo.so.2
> #27 0x00007f5115703a8d in  () at /lib64/libcairo.so.2
> #28 0x00007f51156c9d87 in  () at /lib64/libcairo.so.2
> #29 0x00007f51156ca330 in  () at /lib64/libcairo.so.2
> #30 0x00007f5115676a31 in  () at /lib64/libcairo.so.2
> #31 0x00007f511570d430 in  () at /lib64/libcairo.so.2
> #32 0x00007f51156c9021 in  () at /lib64/libcairo.so.2
> #33 0x00007f51156854cf in  () at /lib64/libcairo.so.2
> #34 0x00007f51156d11c2 in cairo_show_glyphs () at /lib64/libcairo.so.2
> #35 0x000055fb2ceb3cce in ftcrfont_draw (s=0x7ffdeb3ae680, from=<optimized out>, to=<optimized out>, x=<optimized out>, y=<optimized out>, with_background=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/ftcrfont.c:622
> #36 0x000055fb2cd07e4d in x_draw_glyph_string_foreground (s=s@entry=0x7ffdeb3ae680) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:8642
> #37 0x000055fb2cd0c3ea in x_draw_glyph_string (s=0x7ffdeb3ae680) at ../../emacs-30.0.50.5987.9a79db506e3/src/xterm.c:10912
> #38 0x000055fb2cc77064 in draw_glyphs (w=<optimized out>, x=1899, row=<optimized out>, area=<optimized out>, start=<optimized out>, end=<optimized out>, hl=<optimized out>, overlaps=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:31204
> #39 0x000055fb2cc81f23 in gui_write_glyphs (w=0x55fcb07d2f28, updated_row=<optimized out>, start=<optimized out>, updated_area=TEXT_AREA, len=105) at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:33346
> #40 0x000055fb2cc1dad1 in update_text_area (partial_p=<synthetic pointer>, vpos=955, updated_row=0x55fc6b5c6290, w=0x55fcb07d2f28) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:4033
> #41 update_window_line (w=w@entry=0x55fcb07d2f28, vpos=955, mouse_face_overwritten_p=mouse_face_overwritten_p@entry=0x7ffdeb3aee47) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:4291
> #42 0x000055fb2cc249ff in update_window (w=w@entry=0x55fcb07d2f28, force_p=force_p@entry=true) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:3718
> #43 0x000055fb2cc25f2b in update_window_tree (w=w@entry=0x55fcb07d2f28, force_p=force_p@entry=true) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:3488
> #44 0x000055fb2cc26c9d in update_frame (f=0x55fcb07d2cb0, force_p=true, inhibit_hairy_id_p=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/dispnew.c:3323
> #45 0x000055fb2cc5dcc4 in redisplay_internal () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:17461
> #46 0x000055fb2cd61b0f in redisplay () at ../../emacs-30.0.50.5934.0fab2649e28/src/xdisp.c:16562
> #47 read_char (commandflag=1, map=XIL(0x55fb30a6ce13), prev_event=XIL(0), used_mouse_menu=0x7ffdeb3b09eb, end_time=0x0) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:2677
> #48 0x000055fb2cd739ef in read_key_sequence (keybuf=0x7ffdeb3b0b80, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false, disable_text_conversion_p=false) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:10722
> #49 0x000055fb2cd5ad97 in command_loop_1 () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1428
> #50 0x000055fb2cdf7d07 in internal_condition_case (bfun=0x55fb2cd5abc0 <command_loop_1>, handlers=<optimized out>, hfun=0x55fb2cd59ca0 <cmd_error>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1537
> #51 0x000055fb2cd5a0de in command_loop_2 (handlers=handlers@entry=XIL(0x90)) at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1167
> #52 0x000055fb2cdf7c11 in internal_catch (tag=<optimized out>, func=0x55fb2cd5a0b0 <command_loop_2>, arg=XIL(0x90)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1217
> #53 0x000055fb2cd58bef in command_loop () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:1137
> #54 0x000055fb2cd59786 in recursive_edit_1 () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:753
> #55 0x000055fb2cd59b9c in Frecursive_edit () at ../../emacs-30.0.50.5987.9a79db506e3/src/keyboard.c:836
> #56 0x000055fb2cdfb24d in funcall_subr (subr=0x55fb2d44d7c0 <Srecursive_edit>, numargs=numargs@entry=0, args=args@entry=0x7ffdeb3b0fa0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3088
> #57 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=0, args=args@entry=0x7ffdeb3b0fa0) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
> #58 0x000055fb2cdf8a16 in Ffuncall (nargs=1, args=0x7ffdeb3b0f98) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
> #59 0x00007f51023f58f6 in F6465627567_debug_0 () at /usr/lib64/emacs/30.0.50/native-lisp/30.0.50-fe1371f1/debug-bee52b4d-b0c8a741.eln
> #60 0x000055fb2cdfb0fc in funcall_subr (subr=0x55fb349e9ad8, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1108) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3113
> #61 0x000055fb2cdf8820 in funcall_general (fun=<optimized out>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1108) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:2242
> #62 0x000055fb2cdf8a16 in Ffuncall (nargs=nargs@entry=3, args=0x7ffdeb3b1100) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3022
> #63 0x000055fb2cdf8e80 in Fapply (nargs=nargs@entry=2, args=args@entry=0x7ffdeb3b11b0) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2693
> #64 0x000055fb2cdf9408 in apply1 (arg=XIL(0x55fb5213abe3), fn=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2907
> #65 call_debugger (arg=XIL(0x55fb5213abe3)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:310
> #66 0x000055fb2cdf9cd5 in maybe_call_debugger (error=XIL(0x55fb5213ac13), conditions=XIL(0x7f5106d91a03)) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:2051
> #67 signal_or_quit (error_symbol=<optimized out>, data=<optimized out>, continuable=continuable@entry=false) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1876
> #68 0x000055fb2cc15245 in Fsignal (error_symbol=<optimized out>, error_symbol@entry=XIL(0x12db0), data=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1746
> #69 0x000055fb2cc15463 in xsignal (data=<optimized out>, error_symbol=XIL(0x12db0)) at ../../emacs-30.0.50.5987.9a79db506e3/src/lisp.h:4808
> #70 xsignal2 (error_symbol=XIL(0x12db0), arg1=<optimized out>, arg2=<optimized out>) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:1912
> #71 0x000055fb2cc1435b in wrong_type_argument (predicate=<optimized out>, value=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/data.c:142
> #72 0x000055fb2cc16e84 in check_obarray_slow (obarray=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:4914
> #73 0x000055fb2ce36467 in check_obarray (obarray=XIL(0x55fc40b4ea8d)) at ../../emacs-30.0.50.5934.0fab2649e28/src/lisp.h:2465
> #74 Fintern (string=XIL(0x55fb52250fe4), obarray=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:5034
> #75 0x000055fb2cdfb15d in funcall_subr (subr=0x55fb2d45dea0 <Sintern>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1448) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3092

The above backtrace seems to tell the following story:

  . Emacs loaded some package
  . loading the package triggered its processing (including loading of
    some other package)
  . eventually, as part of processing the loaded packages, Emacs
    called 'intern' (frame #74), which called check_obarray, which
    signaled a wrong-type-argument error (frame #71)
  . the error handling called the Lisp debugger
  . the debugger caused redisplay, which called cairo_show_glyphs,
    which caused an X error (frame #19)
  . the X error caused the X connection to close
  . Emacs then tried to shut down in an orderly fashion, which again
    triggered redisplay, which aborted (most probably because
    X-related data structures are invalid, due to the closed X
    connection)

I suspect that the error we tried to signal in frame #71 has something
to do with the recent changes in obarray handling, with which the
package that is being loaded here does not comply.  So I added Mattias
to the discussion.

I also see that we detect recursive invocations of redisplay too late,
so I have now fixed that on master.

As for the cause of this -- some problem in ftcrfont_draw -- maybe Po
Lu can suggest some ideas.  I guess we should try to understand what
kind of X error was caused here?





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
  2024-04-16 12:16     ` Eli Zaretskii
@ 2024-04-16 13:13       ` Mattias Engdegård
  2024-04-16 14:21         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-04-16 13:39       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 42+ messages in thread
From: Mattias Engdegård @ 2024-04-16 13:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, Björn Bidar, yguo, 66416

16 apr. 2024 kl. 14.16 skrev Eli Zaretskii <eliz@gnu.org>:

>> #71 0x000055fb2cc1435b in wrong_type_argument (predicate=<optimized out>, value=<optimized out>) at ../../emacs-30.0.50.5934.0fab2649e28/src/data.c:142
>> #72 0x000055fb2cc16e84 in check_obarray_slow (obarray=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:4914
>> #73 0x000055fb2ce36467 in check_obarray (obarray=XIL(0x55fc40b4ea8d)) at ../../emacs-30.0.50.5934.0fab2649e28/src/lisp.h:2465
>> #74 Fintern (string=XIL(0x55fb52250fe4), obarray=<optimized out>) at /usr/src/debug/emacs-30.0.50.5990.9b755244bf0/src/lread.c:5034
>> #75 0x000055fb2cdfb15d in funcall_subr (subr=0x55fb2d45dea0 <Sintern>, numargs=numargs@entry=2, args=args@entry=0x7ffdeb3b1448) at ../../emacs-30.0.50.5987.9a79db506e3/src/eval.c:3092

It looks like `intern` was called with a second argument that wasn't of a valid type (obarray or nonempty vector starting with 0) but that's as far as it goes, and doesn't indicate anything wrong in the obarray code.

We would need to catch it in the act with a debugger attached, and/or know what Lisp code is being executed.






^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
  2024-04-16 12:16     ` Eli Zaretskii
  2024-04-16 13:13       ` Mattias Engdegård
@ 2024-04-16 13:39       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-04-16 14:19         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 42+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-16 13:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Björn Bidar, yguo, 66416, Mattias Engdegård

Eli Zaretskii <eliz@gnu.org> writes:

> As for the cause of this -- some problem in ftcrfont_draw -- maybe Po
> Lu can suggest some ideas.  I guess we should try to understand what
> kind of X error was caused here?

Yes.  Please switch to the frame of the call to x_error_quitter, there
run:

  (gdb) p *event
  (gdb) shell xdpyinfo -ext all

and respond the output of these commands.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
  2024-04-16 13:39       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-16 14:19         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 42+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-16 14:19 UTC (permalink / raw)
  To: Po Lu; +Cc: Mattias Engdegård, Eli Zaretskii, 66416, yguo

Po Lu <luangruo@yahoo.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> As for the cause of this -- some problem in ftcrfont_draw -- maybe Po
>> Lu can suggest some ideas.  I guess we should try to understand what
>> kind of X error was caused here?
>
> Yes.  Please switch to the frame of the call to x_error_quitter, there
> run:
>
>   (gdb) p *event
>   (gdb) shell xdpyinfo -ext all
>
> and respond the output of these commands.

I didn't trigger the error on purpose but by accident. A package used
obarray wrong (with nil instead of 0) which caused an error like this:
(wrong-type-argument obarrayp [nil nil nil nil nil nil nil nil nil nil
nil nil nil])

The error did not immediately cause a crash but some time after.

I have a gdb attached, If get a crash now I can send these outputs.

I'm not sure if this related but sometimes Emacs is stuck rendering
org-mode buffers till it receives SIGUSR2 or user input.
Requests such as emacsclient -nc don't reach Emacs until either of the
two above happens.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* bug#66416: 29.1; pgtk build crashes due to ftcrfont
  2024-04-16 13:13       ` Mattias Engdegård
@ 2024-04-16 14:21         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 42+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-16 14:21 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: Po Lu, 66416, Eli Zaretskii, yguo

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> It looks like `intern` was called with a second argument that wasn't
> of a valid type (obarray or nonempty vector starting with 0) but
> that's as far as it goes, and doesn't indicate anything wrong in the
> obarray code.
>
> We would need to catch it in the act with a debugger attached, and/or know what Lisp code is being executed.

The lisp code that caused the error comes from this package:
https://github.com/myuhe/smartrep.el/pull/25/files

Another user reported a similar error a few days ago here regarding that
obarray error:
https://github.com/dgutov/diff-hl/issues/217





^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2024-04-16 14:21 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-08 20:32 bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Yuchen Guo
2023-10-09 10:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-09 11:19   ` Eli Zaretskii
2023-10-09 11:24 ` Eli Zaretskii
     [not found]   ` <87bkd7k6b8.fsf@lan>
2023-10-09 18:45     ` Eli Zaretskii
2023-10-09 19:07       ` Yuchen Guo
2023-10-10  2:30         ` Eli Zaretskii
2023-10-10  5:26           ` Yuchen Guo
2023-10-10 12:08             ` Eli Zaretskii
2023-10-10 12:59               ` Yuchen Guo
2023-10-10 13:40                 ` Eli Zaretskii
2023-10-10 16:26                   ` Yuchen Guo
2023-10-11 11:31                     ` Eli Zaretskii
2023-10-11 12:45                       ` Yuchen Guo
2023-10-11 13:12                         ` Eli Zaretskii
2023-10-10  4:39         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-09 18:44 ` bug#66416: Coredump Yuchen Guo
2023-10-12  7:46 ` bug#66416: GDB output from new crash Yuchen Guo
2023-10-12  8:12   ` Yuchen Guo
2023-10-12 10:23     ` Eli Zaretskii
2023-10-12 11:22       ` Yuchen Guo
2023-10-12 12:31         ` Eli Zaretskii
2023-10-12 13:58           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-12 14:28             ` Yuchen Guo
2023-10-12 14:42             ` Yuchen Guo
2023-10-14 11:00               ` Eli Zaretskii
2023-10-14 11:26                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 12:38                   ` Eli Zaretskii
2023-10-14 12:40                   ` Yuchen Guo
2023-10-14 12:44                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 14:23                       ` Yuchen Guo
2023-10-14 15:40                         ` Eli Zaretskii
2023-10-15  1:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-15  5:54                           ` Yuchen Guo
2023-10-12 11:43       ` Yuchen Guo
2023-10-14 19:14 ` bug#66416: 29.1; pgtk build crashes due to ftcrfont Yuchen Guo
2024-04-16  0:27   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]   ` <87mspui23l.fsf@>
2024-04-16 12:16     ` Eli Zaretskii
2024-04-16 13:13       ` Mattias Engdegård
2024-04-16 14:21         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 13:39       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 14:19         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors

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).