Subject: bug#64857: 28.2; Crashes with tab-bar-mode and which-key-mode

From: Thalis Charakas <[email-masked]>
Date: Tue, 25 Jul 2023 13:30:20 +0000

When left clicking a tab on the tab-bar while holding down any modifier
key (Shift, Meta, Control), Emacs crahses. This happens when
tab-bar-mode and which-key-mode are enabled. This also happens with a
testinit.el (using "emacs -q --load ~/testinit.el"). The test init was
used for this report-emacs-bug.

When running "emacs -q --load ~/testinit.el", and inducing the bug, the
following crash report gets printed on the terminal:

$ emacs -q --load testinit.el
Fatal error 6: Aborted
Backtrace:
emacs(+0x1536c3)[0x55cff59136c3]
emacs(+0x48835)[0x55cff5808835]
emacs(+0x48d25)[0x55cff5808d25]
emacs(+0x4c51b)[0x55cff580c51b]
emacs(+0x1d6b22)[0x55cff5996b22]
emacs(+0x1d7014)[0x55cff5997014]
emacs(+0x1d84a3)[0x55cff59984a3]
emacs(+0x1ae325)[0x55cff596e325]
emacs(+0x1aed1f)[0x55cff596ed1f]
emacs(+0x1b811b)[0x55cff597811b]
/usr/bin/../lib/emacs/28.2/native-lisp/28.2-e4556eb6/preloaded/timer-3ee7cfd9-d5a7a198.eln(F74696d65722d6576656e742d68616e646c6572_timer_event_handler_0+0x2e2)[0x7f7a131dd012]
emacs(+0x1b811b)[0x55cff597811b]
emacs(+0x1b826a)[0x55cff597826a]
emacs(+0x13f9fa)[0x55cff58ff9fa]
emacs(+0x13fd0d)[0x55cff58ffd0d]
emacs(+0x140678)[0x55cff5900678]
emacs(+0x14074d)[0x55cff590074d]
emacs(+0x5b690)[0x55cff581b690]
emacs(+0x146215)[0x55cff5906215]
emacs(+0x146c79)[0x55cff5906c79]
emacs(+0x148861)[0x55cff5908861]
emacs(+0x1b70d7)[0x55cff59770d7]
emacs(+0x138e56)[0x55cff58f8e56]
emacs(+0x1b7031)[0x55cff5977031]
emacs(+0x138df1)[0x55cff58f8df1]
emacs(+0x13e8cb)[0x55cff58fe8cb]
emacs(+0x13ec15)[0x55cff58fec15]
emacs(+0x51082)[0x55cff5811082]
/lib/x86_64-linux-gnu/libc.so.6(+0x2718a)[0x7f7a14a4618a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7f7a14a46245]
emacs(+0x51741)[0x55cff5811741]
Aborted

The test init is the following:

$ cat testinit.el
;;; Package management

(require 'package)
(setq package-archives '(("GNU ELPA" . "https://elpa.gnu.org/packages/")
("NonGNU ELPA" . "https://elpa.nongnu.org/nongnu/")
("MELPA Stable" . "https://stable.melpa.org/packages/")
("MELPA" . "https://melpa.org/packages/"))
package-archive-priorities '(("GNU ELPA" . 10)
("NonGNU ELPA" . 9)
("MELPA Stable" . 5)
("MELPA" . 1)))

(package-initialize)
(unless package-archive-contents (package-refresh-contents))

(unless (package-installed-p 'use-package) (package-install 'use-package))
(require 'use-package)
(require 'use-package-ensure)
(setq use-package-always-ensure t)

(tab-bar-mode 1)

(use-package which-key
:init (setq which-key-idle-delay 0
which-key-idle-secondary-delay nil)
:config (which-key-mode 1))

I don't know whether I should also report this to which-key. It's my
first ever bug report, please tell me what else I should do if anything.

In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0)
of 2023-05-14, modified by Debian built on x86-ubc-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12201009
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/libexec
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils
--with-native-compilation --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/libexec
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils
--with-native-compilation --with-cairo --with-x=yes
--with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
-ffile-prefix-map=/build/emacs-mPr7Vr/emacs-28.2+1=. -fstack-protector-strong
-Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
value of $LC_MONETARY: el_GR.UTF-8
value of $LC_NUMERIC: el_GR.UTF-8
value of $LC_TIME: el_GR.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
which-key-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
tab-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t

Load-path shadows:
/home/thales/.emacs.d/elpa/hydra-0.15.0/lv hides /home/thales/.emacs.d/elpa/lv-0.15.0/lv
/home/thales/.emacs.d/elpa/use-package-2.4.5/bind-key hides /home/thales/.emacs.d/elpa/bind-key-2.4.1/bind-key

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils which-key
cl-extra help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cus-edit pp
cus-start cus-load wid-edit cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-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 cl-generic 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 simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 400612 14008)
(symbols 48 16572 0)
(strings 32 127250 3260)
(string-bytes 1 3143946)
(vectors 16 28180)
(vector-slots 8 524420 22626)
(floats 8 58 30)
(intervals 56 416 0) (buffers 992 11))