Subject: bug#69421: 30.0.50; hangs when scrolling a certain web page

From: Gregor Zattler <[email-masked]>
Date: Tue, 27 Feb 2024 09:33:08 +0100

Dear Emacs developers, when I open this web page
https://ux.stackexchange.com/questions/144576/how-to-visually-represent-4-state-checkbox
with eww and press the down key at some point Emacs
hangs and this is the output of gdb:

Starting program: /home/grfz/src/uncompiled/src/emacs -xrm "Emacs.synchronous: true"   --init-directory="${USER_EMACS_DIRECTORY}"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after vfork from child process 800556]
[Detaching after vfork from child process 800557]
[Detaching after vfork from child process 800558]
[Detaching after vfork from child process 800559]
[Detaching after vfork from child process 800560]
[New Thread 0x7fffecfe9380 (LWP 801015)]
[Thread 0x7fffecfe9380 (LWP 801015) exited]
[New Thread 0x7fffecfe9380 (LWP 801044)]
[New Thread 0x7fffecf06380 (LWP 801045)]
[New Thread 0x7fffe3fff6c0 (LWP 801046)]
[Thread 0x7fffecf06380 (LWP 801045) exited]
[New Thread 0x7fffe37fe6c0 (LWP 801047)]
[Thread 0x7fffe3fff6c0 (LWP 801046) exited]
[Thread 0x7fffe37fe6c0 (LWP 801047) exited]
[New Thread 0x7fffe37fe6c0 (LWP 801048)]
[Thread 0x7fffecfe9380 (LWP 801044) exited]
[Thread 0x7fffe37fe6c0 (LWP 801048) exited]

Thread 1 "emacs" received signal SIGABRT, Aborted.
0x00007ffff3d4ae2c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#0  0x00007ffff3d4ae2c in  () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff3cfbfb2 in raise () at /lib/x86_64-linux-gnu/libc.so.6
#2  0x00005555556bc94e in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at ./src/emacs.c:479
#3  0x00005555557255bb in die (msg=msg@entry=0x555555818216 "bidi_it->resolved_level == -1", file=file@entry=0x5555558180f4 "bidi.c", line=line@entry=2911) at ./src/alloc.c:8075
#4  0x00005555556565c7 in bidi_resolve_brackets (bidi_it=bidi_it@entry=0x7ffffffed458) at ./src/bidi.c:2911
#5  0x0000555555656946 in bidi_resolve_neutral (bidi_it=bidi_it@entry=0x7ffffffed458) at ./src/bidi.c:3109
#6  0x0000555555656b11 in bidi_type_of_next_char (bidi_it=bidi_it@entry=0x7ffffffed458) at ./src/bidi.c:3215
#7  0x0000555555656f53 in bidi_level_of_next_char (bidi_it=bidi_it@entry=0x7ffffffed458) at ./src/bidi.c:3282
#8  0x0000555555657ac9 in bidi_move_to_visually_next (bidi_it=bidi_it@entry=0x7ffffffed458) at ./src/bidi.c:3485
#9  0x00005555555dd534 in face_before_or_after_it_pos (it=it@entry=0x7fffffff5400, before_p=before_p@entry=false) at ./src/xdisp.c:5022
#10 0x00005555555de073 in get_next_display_element (it=it@entry=0x7fffffff5400) at ./src/xdisp.c:8621
#11 0x00005555555dfbd1 in move_it_in_display_line_to (it=it@entry=0x7fffffff5400, to_charpos=to_charpos@entry=12039, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at ./src/xdisp.c:9998
#12 0x00005555555e1cbf in move_it_to (it=it@entry=0x7fffffff5400, to_charpos=12039, to_x=to_x@entry=-1, to_y=<optimized out>, to_vpos=to_vpos@entry=-1, op=op@entry=10) at ./src/xdisp.c:10732
#13 0x00005555555ea9cc in partial_line_height (it_origin=it_origin@entry=0x7fffffff67e0) at ./src/xdisp.c:11364
#14 0x00005555555ec460 in try_scrolling (window=..., window@entry=..., just_this_one_p=just_this_one_p@entry=true, arg_scroll_conservatively=101, arg_scroll_conservatively@entry=1000, scroll_step=0, temp_scroll_step=false, last_line_misfit=<optimized out>) at ./src/xdisp.c:18929
#15 0x0000555555606984 in redisplay_window (window=..., just_this_one_p=just_this_one_p@entry=true) at ./src/xdisp.c:20575
#16 0x00005555556086f4 in redisplay_window_1 (window=..., window@entry=...) at ./src/xdisp.c:18018
#17 0x000055555574fbba in internal_condition_case_1 (bfun=bfun@entry=0x5555556086c5 <redisplay_window_1>, arg=..., arg@entry=..., handlers=..., hfun=hfun@entry=0x5555555bc861 <redisplay_window_error>) at ./src/eval.c:1561
#18 0x00005555555f4ba6 in redisplay_internal () at ./src/xdisp.c:17507
#19 0x00005555555f51bf in redisplay () at ./src/xdisp.c:16560
#20 0x00005555556d0573 in read_char (commandflag=1, map=..., map@entry=..., prev_event=..., used_mouse_menu=used_mouse_menu@entry=0x7fffffffce4b, end_time=end_time@entry=0x0) at ./src/keyboard.c:2686
#21 0x00005555556d2734 in read_key_sequence (keybuf=keybuf@entry=0x7fffffffcf70, prompt=..., prompt@entry=..., 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, disable_text_conversion_p=false) at ./src/keyboard.c:10707
#22 0x00005555556d3824 in command_loop_1 () at ./src/lisp.h:1178
#23 0x000055555574fb11 in internal_condition_case (bfun=bfun@entry=0x5555556d3610 <command_loop_1>, handlers=..., handlers@entry=..., hfun=hfun@entry=0x5555556c69a3 <cmd_error>) at ./src/eval.c:1537
#24 0x00005555556be34d in command_loop_2 (handlers=handlers@entry=...) at ./src/keyboard.c:1167
#25 0x000055555574fa1c in internal_catch (tag=..., tag@entry=..., func=func@entry=0x5555556be333 <command_loop_2>, arg=..., arg@entry=...) at ./src/eval.c:1217
#26 0x00005555556be310 in command_loop () at ./src/lisp.h:1178
#27 0x00005555556c64b9 in recursive_edit_1 () at ./src/keyboard.c:753
#28 0x00005555556c685b in Frecursive_edit () at ./src/keyboard.c:836
#29 0x00005555556bdc81 in main (argc=4, argv=0x7fffffffd328) at ./src/emacs.c:2624

HTH, don't hesitate to ask (very specified, as I have
no clue) questions, Gregor

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu,
 cairo version 1.16.0) of 2024-02-27 built on no
Repository revision: b3eb49a4661e31306555e82bdf24db6c36d67ad2
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --infodir=/usr/share/info/emacs --with-json
 --with-file-notification=yes --with-libsystemd
 --with-cairo --with-x=yes --with-x-toolkit=no
 --without-toolkit-scroll-bars --without-gsettings
 --enable-check-lisp-object-type
 --enable-checking=yes,glyphs 'CFLAGS=-g3 -Og
 -ffile-prefix-map=/home/grfz/src/emacs-master--b3eb49a4661e31306555e82bdf24db6c36d67ad2--2024-02-26T23-37+01-00=. -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
HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD
LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY
OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS
TIFF WEBP X11 XDBE XIM XINPUT2 XPM ZLIB

Important settings:
  value of $LC_ALL:
  value of $LC_COLLATE: de_DE.utf8
  value of $LC_CTYPE: de_DE.utf8
  value of $LC_MESSAGES: POSIX
  value of $LC_MONETARY: de_DE.utf8
  value of $LC_NUMERIC: de_DE.utf8
  value of $LC_TIME: de_DE.utf8
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  rainbow-delimiters-mode: t
  winner-mode: t
  mail-abbrevs-mode: t
  savehist-mode: t
  ws-butler-global-mode: t
  ws-butler-mode: t
  delete-selection-mode: t
  which-function-mode: t
  windmove-mode: t
  xterm-mouse-mode: t
  key-chord-mode: t
  emacs-gc-stats-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/grfz/src/notmuch/emacs/notmuch-lib hides /usr/local/share/emacs/site-lisp/notmuch-lib
/home/grfz/src/notmuch/emacs/coolj hides /usr/local/share/emacs/site-lisp/coolj
/home/grfz/src/notmuch/emacs/notmuch-address hides /usr/local/share/emacs/site-lisp/notmuch-address
/home/grfz/src/notmuch/emacs/notmuch-hello hides /usr/local/share/emacs/site-lisp/notmuch-hello
/home/grfz/src/notmuch/emacs/notmuch-parser hides /usr/local/share/emacs/site-lisp/notmuch-parser
/home/grfz/src/notmuch/emacs/notmuch-show hides /usr/local/share/emacs/site-lisp/notmuch-show
/home/grfz/src/notmuch/emacs/notmuch-wash hides /usr/local/share/emacs/site-lisp/notmuch-wash
/home/grfz/src/notmuch/emacs/notmuch-draft hides /usr/local/share/emacs/site-lisp/notmuch-draft
/home/grfz/src/notmuch/emacs/notmuch-tree hides /usr/local/share/emacs/site-lisp/notmuch-tree
/home/grfz/src/notmuch/emacs/notmuch-version hides /usr/local/share/emacs/site-lisp/notmuch-version
/home/grfz/src/notmuch/emacs/notmuch-jump hides /usr/local/share/emacs/site-lisp/notmuch-jump
/home/grfz/src/notmuch/emacs/notmuch-company hides /usr/local/share/emacs/site-lisp/notmuch-company
/home/grfz/src/notmuch/emacs/notmuch hides /usr/local/share/emacs/site-lisp/notmuch
/home/grfz/src/notmuch/emacs/notmuch-crypto hides /usr/local/share/emacs/site-lisp/notmuch-crypto
/home/grfz/src/notmuch/emacs/notmuch-compat hides /usr/local/share/emacs/site-lisp/notmuch-compat
/home/grfz/src/notmuch/emacs/notmuch-maildir-fcc hides /usr/local/share/emacs/site-lisp/notmuch-maildir-fcc
/home/grfz/src/notmuch/emacs/notmuch-tag hides /usr/local/share/emacs/site-lisp/notmuch-tag
/home/grfz/src/notmuch/emacs/notmuch-message hides /usr/local/share/emacs/site-lisp/notmuch-message
/home/grfz/src/notmuch/emacs/notmuch-print hides /usr/local/share/emacs/site-lisp/notmuch-print
/home/grfz/src/notmuch/emacs/notmuch-mua hides /usr/local/share/emacs/site-lisp/notmuch-mua
/home/grfz/src/notmuch/emacs/notmuch-query hides /usr/local/share/emacs/site-lisp/notmuch-query
/home/grfz/src/notmuch/emacs/notmuch-address hides /home/grfz/.config/emacs/elisp/notmuch-address
/home/grfz/src/ol-notmuch/ol-notmuch hides /home/grfz/.config/emacs/elisp/ol-notmuch
/home/grfz/.config/emacs/elpa-30.0/transient-0.5.3/transient hides /home/grfz/src/uncompiled/lisp/transient

Features:
(shadow sort orgalist wcheck-mode ecomplete mail-extr
emacsbug add-log rainbow-delimiters notifications time
winner ol-notmuch notmuch notmuch-tree notmuch-jump
notmuch-hello notmuch-show notmuch-print notmuch-crypto
notmuch-mua notmuch-message notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company
notmuch-parser notmuch-wash diff-mode coolj goto-addr
icalendar diary-lib diary-loaddefs notmuch-tag crm
notmuch-lib notmuch-version notmuch-compat hl-line
message yank-media rfc822 mml nnheader range gmm-utils
mailheader compat org-crypt org-protocol org-clock dbus
xml ob-plantuml ob-shell shell finder-inf mailabbrev
sendmail mail-utils savehist auth-source-pass holidays
holiday-loaddefs ws-butler delsel modus-operandi-theme
modus-themes which-func windmove xt-mouse edmacro
kmacro key-chord emacs-gc-stats dired-aux dired desktop
frameset dired-loaddefs org ob ob-ref ob-lob ob-table
ob-exp org-macro org-pcomplete pcomplete org-list
org-footnote org-faces org-entities noutline outline
so-long ob-emacs-lisp org-table org-loaddefs find-func
cal-menu calendar cal-loaddefs ob-tangle ol org-src
sh-script flymake project thingatpt smie treesit
shortdoc executable skeleton org-keys oc ob-comint
ob-core org-cycle org-fold org-fold-core org-compat
ob-eval org-version org-macs format-spec use-package
use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key
use-package-core async-autoloads csv-mode-autoloads
debbugs-autoloads dired-git-info-autoloads
emacs-gc-stats-autoloads gcmh-autoloads
hyperbole-autoloads kotl-autoloads hact set hhist
key-chord-autoloads magit-autoloads
git-commit-autoloads magit-section-autoloads
dash-autoloads org-contrib-autoloads org-autoloads
orgalist-autoloads paredit-autoloads
rainbow-delimiters-autoloads rainbow-mode-autoloads
transient-autoloads wcheck-mode-autoloads
which-key-autoloads info speedbar imenu ezimage dframe
with-editor-autoloads ws-butler-autoloads package
let-alist browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mm-view
mml-smime mml-sec epa gnus-util time-date smime gnutls
puny dig mailcap url-handlers mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-parse auth-source eieio
eieio-core password-cache json map byte-opt comp
comp-cstr warnings comp-run comp-common bytecomp
byte-compile compile rx text-property-search comint
files-x ansi-osc ansi-color ring url-vars epg cl-extra
help-mode cl-seq rfc6068 epg-config cus-edit derived pp
cus-load icons wid-edit subr-x easy-mmode cl-macs
inline cl-loaddefs cl-lib gv pcase rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win
x-win term/common-win x-dnd touch-screen 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 dbusbind inotify lcms2 dynamic-setting
font-render-setting cairo xinput2 x multi-tty
move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 947545 6406658) (symbols 48 39847 17)
 (strings 32 97304 53945) (string-bytes 1 3594759) (vectors 16 18408)
 (vector-slots 8 214131 199074) (floats 8 337 116)
 (intervals 56 719 136) (buffers 976 13))