all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
@ 2024-05-30  9:51 Daniel Clemente
  2024-05-30 11:38 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Clemente @ 2024-05-30  9:51 UTC (permalink / raw)
  To: 71274

I have --enable-checking=yes,glyphs enabled, and am using emacsclient
without X support but inside a urxvt terminal in X. Built with no
extra patches. Running in gdb.

I was editing Python code when this error happened. Last things I did were:
M-space to remove extra spaces, and by mistake I hit S-space which
enabled scim (input method chooser, a small widget appearing on top
and stealing window-manager focus), then I disabled it again.
This information may be bogus since these operations work fine when I
retest them.
I wasn't doing anything weird like stress-testing it, resizing
windows, changing fonts/resolution, …

I don't know how to reproduce this yet. Feel free to close if it
doesn't clearly show a possible bug.
I didn't have time to research the crash more in detail; and I forgot
"bt full". I'll do it if I can reproduce it.

Note that the window is called "Folder". I'm certain it refers to
Wanderlust's (Emacs mail reader) main view which shows the mailboxes
(inbox, drafts, etc.), which I had open at that time in a different
frame (not visible, i.e. it was in a different window manager
workspace and I wasn't working with it). I don't know why it relates
to the crash; maybe I switched to that frame for a bit without
noticing?
Proof that Wanderlust's window is called Folder: (get-buffer-window)
returns something like: #<window 19 on Folder>



[Detaching after vfork from child process 23040]
[Detaching after vfork from child process 23097]
[Detaching after vfork from child process 24446]
[Detaching after vfork from child process 24447]
[Detaching after vfork from child process 24454]
[Detaching after vfork from child process 24455]

xdisp.c:21783: Emacs fatal error: assertion failed: w->window_end_valid

Breakpoint 1, terminate_due_to_signal (sig=6,
backtrace_limit=2147483647) at emacs.c:443
443      signal (sig, SIG_DFL);


(gdb) bt
#0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:443
#1  0x00005555557350bb in die (msg=0x5555558527c0 "w->window_end_valid",
    file=0x555555850b08 "xdisp.c", line=21783) at alloc.c:8082
#2  0x00005555555dcd5f in find_first_unchanged_at_end_row (w=0x5555622c4f68,
    delta=0x7fffffff7b18, delta_bytes=0x7fffffff7b10) at xdisp.c:21783
#3  0x00005555555de527 in try_window_id (w=0x5555622c4f68) at xdisp.c:22347
#4  0x00005555555d93ad in redisplay_window
(window=XIL(0x5555622c4f6d), just_this_one_p=false)
    at xdisp.c:20438
#5  0x00005555555d0991 in redisplay_window_0
(window=XIL(0x5555622c4f6d)) at xdisp.c:18016
#6  0x000055555576c7b0 in internal_condition_case_1
(bfun=0x5555555d094f <redisplay_window_0>,
    arg=XIL(0x5555622c4f6d), handlers=XIL(0x7ffff1f56cdb),
    hfun=0x5555555d082d <redisplay_window_error>) at eval.c:1637
#7  0x00005555555d0803 in redisplay_windows
(window=XIL(0x5555622c4f6d)) at xdisp.c:17985
#8  0x00005555555cf382 in redisplay_internal () at xdisp.c:17384
#9  0x00005555555cfed6 in redisplay_preserve_echo_area (from_where=9)
at xdisp.c:17747
#10 0x00005555557ed8a7 in wait_reading_process_output (time_limit=30,
nsecs=0, read_kbd=-1,
    do_display=true, wait_for_cell=XIL(0), wait_proc=0x0,
just_wait_proc=0) at process.c:5434
#11 0x0000555555594eb9 in sit_for (timeout=make_fixnum(30),
reading=true, display_option=1)
    at dispnew.c:6318
#12 0x0000555555695250 in read_char (commandflag=1,
map=XIL(0x555564f84233), prev_event=XIL(0),
    used_mouse_menu=0x7fffffffd6df, end_time=0x0) at keyboard.c:2923
#13 0x00005555556a67ff in read_key_sequence (keybuf=0x7fffffffd8f0,
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
keyboard.c:10728
#14 0x0000555555690ee7 in command_loop_1 () at keyboard.c:1429
#15 0x000055555576c6cf in internal_condition_case (bfun=0x555555690ab8
<command_loop_1>,
    handlers=XIL(0x90), hfun=0x55555568ff63 <cmd_error>) at eval.c:1613
#16 0x0000555555690696 in command_loop_2 (handlers=XIL(0x90)) at keyboard.c:1168
#17 0x000055555576bafc in internal_catch (tag=XIL(0xfc60),
func=0x55555569066c <command_loop_2>,
    arg=XIL(0x90)) at eval.c:1292
#18 0x0000555555690628 in command_loop () at keyboard.c:1146
#19 0x000055555568fa05 in recursive_edit_1 () at keyboard.c:754
#20 0x000055555568fc31 in Frecursive_edit () at keyboard.c:837
#21 0x000055555568b698 in main (argc=2, argv=0x7fffffffdf18) at emacs.c:2621

Lisp Backtrace:
"redisplay_internal (C function)" (0x0)
(gdb)

(gdb) frame 4
#4  0x00005555555d93ad in redisplay_window
(window=XIL(0x5555622c4f6d), just_this_one_p=false)
    at xdisp.c:20438
20438      else if ((tem = try_window_id (w)) != 0)


(gdb) pp window
#<window 85 on Folder>


(other random debugging done here)

(gdb) cont
Continuing.
Fatal error 6: Aborted
Backtrace:
/opt/dc/emacs/bin/emacs(+0x1691ad)[0x5555556bd1ad]
/opt/dc/emacs/bin/emacs(+0x1344a8)[0x5555556884a8]
/opt/dc/emacs/bin/emacs(+0x1e10bb)[0x5555557350bb]
/opt/dc/emacs/bin/emacs(+0x88d5f)[0x5555555dcd5f]
/opt/dc/emacs/bin/emacs(+0x8a527)[0x5555555de527]
/opt/dc/emacs/bin/emacs(+0x853ad)[0x5555555d93ad]
/opt/dc/emacs/bin/emacs(+0x7c991)[0x5555555d0991]
/opt/dc/emacs/bin/emacs(+0x2187b0)[0x55555576c7b0]
/opt/dc/emacs/bin/emacs(+0x7c803)[0x5555555d0803]
/opt/dc/emacs/bin/emacs(+0x7b382)[0x5555555cf382]
/opt/dc/emacs/bin/emacs(+0x7bed6)[0x5555555cfed6]
/opt/dc/emacs/bin/emacs(+0x2998a7)[0x5555557ed8a7]
/opt/dc/emacs/bin/emacs(+0x40eb9)[0x555555594eb9]
/opt/dc/emacs/bin/emacs(+0x141250)[0x555555695250]
/opt/dc/emacs/bin/emacs(+0x1527ff)[0x5555556a67ff]
/opt/dc/emacs/bin/emacs(+0x13cee7)[0x555555690ee7]
/opt/dc/emacs/bin/emacs(+0x2186cf)[0x55555576c6cf]
/opt/dc/emacs/bin/emacs(+0x13c696)[0x555555690696]
/opt/dc/emacs/bin/emacs(+0x217afc)[0x55555576bafc]
/opt/dc/emacs/bin/emacs(+0x13c628)[0x555555690628]
/opt/dc/emacs/bin/emacs(+0x13ba05)[0x55555568fa05]
/opt/dc/emacs/bin/emacs(+0x13bc31)[0x55555568fc31]
/opt/dc/emacs/bin/emacs(+0x137698)[0x55555568b698]
/lib/x86_64-linux-gnu/libc.so.6(+0x2724a)[0x7ffff544624a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7ffff5446305]
/opt/dc/emacs/bin/emacs(+0x30831)[0x555555584831]

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6,
    no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44    ./nptl/pthread_kill.c: No such file or directory.



In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu) of 2024-05-29 built on sonn
Repository revision: d9512da49514623ef3e35524dc894c06f2c0ce20
Repository branch: master
System Description: Devuan GNU/Linux 5 (daedalus)

Configured using:
 'configure --prefix=/opt/dc/emacs/ --without-dbus --with-tiff=no --without-tiff
 --without-libsystemd --without-dbus --with-mailutils
--with-native-compilation --with-x-toolkit=no
 --without-imagemagick --without-xft --without-harfbuzz
--without-freetype --without-libotf
 --without-xwidgets --without-xpm --without-jpeg --without-gif
--without-png --without-webp
 --without-rsvg --without-cairo --without-x
--enable-checking=yes,glyphs 'CFLAGS=-g3 -O0''

Configured features:
GMP GNUTLS LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER SECCOMP SOUND SQLITE3
THREADS XIM ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  xterm-mouse-mode: t
  erc-track-mode: t
  erc-services-mode: t
  erc-ring-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-match-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-readonly-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  erc-networks-mode: t
  savehist-mode: t
  recentf-mode: t
  hexl-follow-ascii: t
  helm-mode: t
  helm-minibuffer-history-mode: t
  async-bytecomp-package-mode: t
  global-git-commit-mode: t
  server-mode: t
  jdecomp-mode: t
  projectile-mode: t
  global-semantic-decoration-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-show-unmatched-syntax-mode: -1
  semantic-mode: t
  rcirc-track-minor-mode: t
  jabber-activity-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  unpackaged/org-export-html-with-useful-ids-mode: t
  org-superstar-mode: t
  minibuffer-depth-indicate-mode: t
  global-so-long-mode: t
  display-time-mode: t
  global-hl-line-mode: t
  xclip-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/w/helm/helm-files hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-files
/w/helm/helm-comint hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-comint
/w/helm/helm-elisp-package hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-elisp-package
/w/helm/helm-external hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-external
/w/helm/helm-easymenu hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-easymenu
/w/helm/helm-font hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-font
/w/helm/helm-imenu hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-imenu
/w/helm/helm-x-files hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-x-files
/w/helm/helm-regexp hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-regexp
/w/helm/helm-net hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-net
/w/helm/helm-ring hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-ring
/w/helm/helm-find hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-find
/w/helm/helm-misc hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-misc
/w/helm/helm-occur hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-occur
/w/helm/helm-sys hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-sys
/w/helm/helm-types hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-types
/w/helm/helm-elisp hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-elisp
/w/helm/helm-adaptive hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-adaptive
/w/helm/helm-shell hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-shell
/w/helm/helm-id-utils hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-id-utils
/w/helm/helm-bookmark hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-bookmark
/w/helm/helm-mode hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-mode
/w/helm/helm-eshell hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-eshell
/w/helm/helm-dabbrev hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-dabbrev
/w/helm/helm-grep hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-grep
/w/helm/helm-color hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-color
/w/helm/helm-help hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-help
/w/helm/helm-buffers hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-buffers
/w/helm/helm-locate hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-locate
/w/helm/helm-tags hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-tags
/w/helm/helm-autoloads hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-autoloads
/w/helm/helm-info hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-info
/w/helm/helm-semantic hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-semantic
/w/helm/helm-config hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-config
/w/helm/helm-command hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-command
/w/helm/helm-utils hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-utils
/w/helm/helm-eval hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-eval
/w/helm/helm-for-files hides
/home/dc/.emacs.d/elpa/helm-20191101.641/helm-for-files
/w/helm/helm-man hides /home/dc/.emacs.d/elpa/helm-20191101.641/helm-man
/w/helm/helm-multi-match hides
/home/dc/.emacs.d/elpa/helm-core-20191031.1931/helm-multi-match
/w/helm/helm-lib hides /home/dc/.emacs.d/elpa/helm-core-20191031.1931/helm-lib
/w/helm/helm-source hides
/home/dc/.emacs.d/elpa/helm-core-20191031.1931/helm-source
/w/helm/helm hides /home/dc/.emacs.d/elpa/helm-core-20191031.1931/helm
/home/dc/.emacs.d/elpa/transient-20220717.1713/transient hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/transient
/w/org-mode/lisp/org-fold-core hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-fold-core
/w/org-mode/lisp/ob-haskell hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-haskell
/w/org-mode/lisp/org-plot hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-plot
/w/org-mode/lisp/ox-icalendar hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-icalendar
/w/org-mode/lisp/org-footnote hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-footnote
/w/org-mode/lisp/org-archive hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-archive
/w/org-mode/lisp/ob-exp hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-exp
/w/org-mode/lisp/ob-octave hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-octave
/w/org-mode/lisp/oc-natbib hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/oc-natbib
/w/org-mode/lisp/org-num hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-num
/w/org-mode/lisp/ob-processing hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-processing
/w/org-mode/lisp/org-mouse hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-mouse
/w/org-mode/lisp/ob-core hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-core
/w/org-mode/lisp/ob-awk hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-awk
/w/org-mode/lisp/org-table hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-table
/w/org-mode/lisp/org-lint hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-lint
/w/org-mode/lisp/oc-basic hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/oc-basic
/w/org-mode/lisp/ob-scheme hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-scheme
/w/org-mode/lisp/ox-latex hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-latex
/w/org-mode/lisp/org-loaddefs hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-loaddefs
/w/org-mode/lisp/ob-table hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-table
/w/org-mode/lisp/ob-shell hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-shell
/w/org-mode/lisp/org hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/org
/w/org-mode/lisp/ol-man hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-man
/w/org-mode/lisp/ol-rmail hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-rmail
/w/org-mode/lisp/ox-man hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-man
/w/org-mode/lisp/org-cycle hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-cycle
/w/org-mode/lisp/org-datetree hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-datetree
/w/org-mode/lisp/ol-mhe hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-mhe
/w/org-mode/lisp/ob-css hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-css
/w/org-mode/lisp/org-fold hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-fold
/w/org-mode/lisp/ob-lilypond hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-lilypond
/w/org-mode/lisp/ob-comint hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-comint
/w/org-mode/lisp/ob-plantuml hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-plantuml
/w/org-mode/lisp/ol-bbdb hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-bbdb
/w/org-mode/lisp/ox-ascii hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-ascii
/w/org-mode/lisp/ob-python hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-python
/w/org-mode/lisp/ob-ref hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-ref
/w/org-mode/lisp/ob-js hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-js
/w/org-mode/lisp/ox-md hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-md
/w/org-mode/lisp/oc hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/oc
/w/org-mode/lisp/org-keys hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-keys
/w/org-mode/lisp/org-feed hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-feed
/w/org-mode/lisp/org-capture hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-capture
/w/org-mode/lisp/org-ctags hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-ctags
/w/org-mode/lisp/ob-lob hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-lob
/w/org-mode/lisp/ob-forth hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-forth
/w/org-mode/lisp/ob-clojure hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-clojure
/w/org-mode/lisp/ob-sass hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-sass
/w/org-mode/lisp/ol-eshell hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-eshell
/w/org-mode/lisp/org-timer hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-timer
/w/org-mode/lisp/ob-R hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-R
/w/org-mode/lisp/org-src hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-src
/w/org-mode/lisp/ox-koma-letter hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-koma-letter
/w/org-mode/lisp/ob-tangle hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-tangle
/w/org-mode/lisp/ob-matlab hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-matlab
/w/org-mode/lisp/org-macro hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-macro
/w/org-mode/lisp/ob-makefile hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-makefile
/w/org-mode/lisp/ox-texinfo hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-texinfo
/w/org-mode/lisp/ob-org hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-org
/w/org-mode/lisp/ol-docview hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-docview
/w/org-mode/lisp/org-list hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-list
/w/org-mode/lisp/ob-eval hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-eval
/w/org-mode/lisp/org-element hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-element
/w/org-mode/lisp/ob hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob
/w/org-mode/lisp/ob-sqlite hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-sqlite
/w/org-mode/lisp/org-clock hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-clock
/w/org-mode/lisp/org-compat hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-compat
/w/org-mode/lisp/org-mobile hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-mobile
/w/org-mode/lisp/ol hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol
/w/org-mode/lisp/ob-groovy hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-groovy
/w/org-mode/lisp/org-goto hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-goto
/w/org-mode/lisp/ob-emacs-lisp hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-emacs-lisp
/w/org-mode/lisp/ol-eww hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-eww
/w/org-mode/lisp/org-tempo hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-tempo
/w/org-mode/lisp/oc-csl hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/oc-csl
/w/org-mode/lisp/ob-ruby hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-ruby
/w/org-mode/lisp/org-crypt hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-crypt
/w/org-mode/lisp/ol-irc hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-irc
/w/org-mode/lisp/org-faces hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-faces
/w/org-mode/lisp/ob-latex hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-latex
/w/org-mode/lisp/org-colview hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-colview
/w/org-mode/lisp/ol-bibtex hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-bibtex
/w/org-mode/lisp/ob-lua hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-lua
/w/org-mode/lisp/org-protocol hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-protocol
/w/org-mode/lisp/org-attach-git hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-attach-git
/w/org-mode/lisp/ob-screen hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-screen
/w/org-mode/lisp/org-agenda hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-agenda
/w/org-mode/lisp/org-persist hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-persist
/w/org-mode/lisp/ob-sql hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-sql
/w/org-mode/lisp/ob-gnuplot hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-gnuplot
/w/org-mode/lisp/ob-sed hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-sed
/w/org-mode/lisp/ol-gnus hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-gnus
/w/org-mode/lisp/org-inlinetask hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-inlinetask
/w/org-mode/lisp/ox-html hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-html
/w/org-mode/lisp/oc-biblatex hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/oc-biblatex
/w/org-mode/lisp/org-pcomplete hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-pcomplete
/w/org-mode/lisp/ob-perl hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-perl
/w/org-mode/lisp/org-version hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-version
/w/org-mode/lisp/org-indent hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-indent
/w/org-mode/lisp/org-refile hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-refile
/w/org-mode/lisp/ob-julia hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-julia
/w/org-mode/lisp/ol-info hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-info
/w/org-mode/lisp/ol-doi hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-doi
/w/org-mode/lisp/org-habit hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-habit
/w/org-mode/lisp/org-entities hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-entities
/w/org-mode/lisp/ox-publish hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-publish
/w/org-mode/lisp/org-duration hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-duration
/w/org-mode/lisp/ob-ditaa hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-ditaa
/w/org-mode/lisp/ob-dot hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-dot
/w/org-mode/lisp/ob-C hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-C
/w/org-mode/lisp/ox-org hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-org
/w/org-mode/lisp/ox-beamer hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-beamer
/w/org-mode/lisp/ob-fortran hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-fortran
/w/org-mode/lisp/ob-maxima hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-maxima
/w/org-mode/lisp/ob-eshell hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-eshell
/w/org-mode/lisp/ol-w3m hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ol-w3m
/w/org-mode/lisp/org-id hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-id
/w/org-mode/lisp/ox-odt hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox-odt
/w/org-mode/lisp/ob-java hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-java
/w/org-mode/lisp/ob-calc hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-calc
/w/org-mode/lisp/org-attach hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-attach
/w/org-mode/lisp/ob-ocaml hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-ocaml
/w/org-mode/lisp/oc-bibtex hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/oc-bibtex
/w/org-mode/lisp/ox hides /opt/dc/emacs/share/emacs/30.0.50/lisp/org/ox
/w/org-mode/lisp/ob-lisp hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/ob-lisp
/w/org-mode/lisp/org-macs hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/org/org-macs
/w/flim/sasl hides /opt/dc/emacs/share/emacs/30.0.50/lisp/net/sasl
/home/dc/.emacs.d/elpa/hierarchy-20190425.842/hierarchy hides
/opt/dc/emacs/share/emacs/30.0.50/lisp/emacs-lisp/hierarchy

Features:
(shadow emacsbug vc-mtn shortdoc cl-print helm-dabbrev helm-git-grep
solar cal-dst mule-util
misearch multi-isearch elmo-multi elmo-maildir modb-standard
org-duration cal-iso vc-hg ffap
oc-basic ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect ol-docview
ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi face-remap
help-fns radix-tree vc-git
vc-dispatcher semantic/db-file data-debug cedet-files semantic/wisent/python
semantic/decorate/include semantic/db-find semantic/db-ref
semantic/wisent/python-wy eglot
external-completion jsonrpc xref flymake winner tramp-archive
tramp-gvfs dired-aux xterm-keybinder
xt-mouse term/rxvt term/xterm xterm hideshow ox-texinfo erc-track
erc-services erc-ring erc-netsplit
erc-menu erc-match erc-goodies erc-pcomplete erc-button erc-fill
erc-stamp erc-join erc erc-backend
erc-networks erc-common erc-compat erc-loaddefs quail rot13 git-link
nukneval bustrofedon
dired-filetype-face dired-tar gnus-dired dired-x mime-w3m w3m-lnum w3m
w3m-hist bookmark-w3m w3m-ems
w3m-favicon w3m-image w3m-fb tab-line w3m-proc w3m-util savehist
tramp-cache time-stamp tramp-sh
recentf tree-widget em-term term ehelp esh-ext esh-proc esh-opt esh-io
esh-arg esh-module esh-groups
esh-util zone-select zone org-location-google-maps google-maps
google-maps-static
google-maps-geocode google-maps-base beancount binview calc
calc-loaddefs calc-macs hexl
taskjuggler-mode generic generic-x boxquote rect rainbow-delimiters
rainbow-mode htmlize-hack
htmlize log4j-mode oddmuse skeleton doc-view jka-compr fc
flashcard-sm5 flashcard keywiz gamegrid
tt-mode helm-mode helm-misc helm-for-files helm-bookmark helm-adaptive
magit-bookmark bookmark
fringe helm-external helm-sys helm-net helm-man helm-color helm-elisp
helm-files image-dired
image-dired-tags image-dired-external image-dired-util image-mode exif
tramp trampver
tramp-integration files-x tramp-message tramp-compat tramp-loaddefs
helm-buffers helm-occur
helm-tags helm-locate helm-grep helm-regexp helm-info helm-utils
helm-types helm-eval edebug
helm-help helm helm-global-bindings helm-easymenu helm-core
async-bytecomp helm-source
helm-multi-match helm-lib async helm-config helm-autoloads diary-lib
diary-loaddefs magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos
magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff diff-mode track-changes
git-commit log-edit pcvs-util add-log magit-core magit-autorevert
autorevert filenotify magit-margin
magit-transient magit-process with-editor server magit-mode transient
magit-git magit-base
magit-section dash chuck-mode minizinc-mode jdecomp arc-mode
archive-mode cus-edit cus-load
projectile lisp-mnt ibuf-ext semantic/dep srecode/mode
semantic/senator semantic/wisent
semantic/wisent/wisent srecode/insert srecode/filters srecode/args
ede/speedbar ede/files ede
ede/detect ede/base ede/auto ede/source eieio-speedbar speedbar dframe
eieio-custom srecode/find
srecode/map srecode/ctxt srecode/compile srecode/dictionary
srecode/fields srecode/table
semantic/decorate/mode semantic/decorate pulse srecode
semantic/db-mode semantic/idle
semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn
semantic/db eieio-base
semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt
semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw
mode-local cedet rcirc offlineimap
sasl-xoauth2 oauth2 url-http url-auth url-gw nsm plstore crm
wl-template wl-fldmgr wl-score wl-demo
wl-thread wl-action wl wl-draft wl-folder elmo-nntp elmo-net
elmo-cache elmo-map elmo-dop ps-print
ps-print-loaddefs lpr elmo-filter wl-summary wl-refile wl-message
wl-mime mime-play filename
mime-edit mime-setup mail-mime-setup semi-setup smtp wl-e21
wl-highlight invisible inv-23 elmo-mime
mmelmo-buffer mmelmo-imap mmimap mmbuffer mime-view mime-conf calist
semi-def wl-address pldap
wl-util wl-vars wl-version modb-generic elmo-flag elmo-localdir elmo
elmo-signal elmo-msgdb modb
modb-entity elmo-date eword-encode mime-parse mime mmgeneric elmo-util
eword-decode mel mime-def
alist pces pces-e20 pces-20 mcs-e20 mcs-20 mcharset timezone elmo-vars
path-util elmo-version luna
std11 pccl pccl-20 ccl broken static apel-ver product jabber
jabber-truncate jabber-time
jabber-autoaway jabber-vcard-avatars jabber-chatstates jabber-events
jabber-vcard jabber-avatar
jabber-activity jabber-watch jabber-modeline jabber-ahc-presence
jabber-ahc jabber-version
jabber-ourversion jabber-muc-nick-completion hippie-exp jabber-browse
jabber-search jabber-register
jabber-roster jabber-presence jabber-muc jabber-bookmarks
jabber-private jabber-muc-nick-coloring
jabber-widget jabber-disco jabber-chat jabber-history
jabber-chatbuffer jabber-alert jabber-iq
jabber-core jabber-console sgml-mode facemenu jabber-keymap
jabber-sasl sasl sasl-anonymous
sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls
tls jabber-xml jabber-menu
jabber-util goto-addr hexrgb markdown-mode color thingatpt yasnippet
org-contacts gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range message sendmail
yank-media puny dired dnd
dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode
mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus nnheader
mail-utils range mm-util mail-prsvr gnus-util org-crypt ob-sqlite
ob-sql ob-shell shell ob-ruby
ob-python python project compat ob-plantuml ob-perl ob-lilypond ob-js
ob-haskell ob-gnuplot ox-odt
rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn
nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox
ob-dot ob-ditaa ob-C cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs ob-R org-attach
org-protocol iimage org-clock calfw-gcal calfw-org org-capture
org-agenda calfw edmacro kmacro
holidays holiday-loaddefs cal-move org-inlinetask org-superstar
org-element org-persist xdg avl-tree
generator org-test ert-x ert pp ewoc debug backtrace org-id org-refile
org-element-ast inline org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script
smie treesit executable
ob-comint org-pcomplete pcomplete org-list org-footnote org-faces
org-entities time-date noutline
outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold
org-fold-core org-keys oc
org-loaddefs find-func cal-menu calendar cal-loaddefs org-version
org-compat org-macs format-spec
ibuf-macs ibuffer ibuffer-loaddefs mb-depth comp comp-cstr warnings
comp-run comp-common rx advice
mwheel easy-mmode so-long longlines grep compile text-property-search
comint regexp-opt ansi-osc
ansi-color ring revbufs derived disp-table hide-mode-line time image
hl-line color-theme wid-edit
reporter xclip finder-inf elp boxquote-autoloads calfw-autoloads
calfw-gcal-autoloads
calfw-ical-autoloads calfw-org-autoloads csv-mode-autoloads
debbugs-autoloads emacsql-psql-autoloads
emacsql-autoloads emmet-mode-autoloads feature-mode-autoloads
git-link-autoloads gnuplot-autoloads
google-translate-autoloads haskell-mode-autoloads cl-extra help-mode
helm-sql-connect-autoloads
jabber-autoloads fsm-autoloads jdecomp-autoloads jedi-autoloads
jedi-core-autoloads
jinja2-mode-autoloads json-reformat-autoloads jsonian-autoloads
magit-autoloads pcase
git-commit-autoloads magit-section-autoloads mingus-autoloads libmpdee-autoloads
mmm-jinja2-autoloads mmm-mode-autoloads oauth2-autoloads
org-superstar-autoloads persist-autoloads
projectile-autoloads python-environment-autoloads
rcirc-color-autoloads srv-autoloads cl
terraform-mode-autoloads tmr-autoloads transient-autoloads
typescript-mode-autoloads
vimrc-mode-autoloads vue-html-mode-autoloads with-editor-autoloads
xclip-autoloads
xterm-keybinder-autoloads yasnippet-autoloads zone-nyan-autoloads info
tool-bar dash-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 icons 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 tabulated-list replace newcomment text-mode
lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select mouse
jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple
cl-generic indonesian philippine cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj
charscript charprop case-table epa-hook jka-cmpr-hook help abbrev
obarray oclosure cl-preloaded
button loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5
base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads
inotify lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 1951716 195837) (symbols 48 73646 11) (strings 32 336621
7944) (string-bytes 1 14549678)
 (vectors 16 178447) (vector-slots 8 2913855 179182) (floats 8 1654
26369) (intervals 56 13701 6360)
 (buffers 984 192))





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-05-30  9:51 bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row Daniel Clemente
@ 2024-05-30 11:38 ` Eli Zaretskii
  2024-05-31 10:08   ` Daniel Clemente
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-05-30 11:38 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: 71274

> From: Daniel Clemente <n142857@gmail.com>
> Date: Thu, 30 May 2024 09:51:20 +0000
> 
> I have --enable-checking=yes,glyphs enabled, and am using emacsclient
> without X support but inside a urxvt terminal in X. Built with no
> extra patches. Running in gdb.
> 
> I was editing Python code when this error happened. Last things I did were:
> M-space to remove extra spaces, and by mistake I hit S-space which
> enabled scim (input method chooser, a small widget appearing on top
> and stealing window-manager focus), then I disabled it again.
> This information may be bogus since these operations work fine when I
> retest them.
> I wasn't doing anything weird like stress-testing it, resizing
> windows, changing fonts/resolution, …
> 
> I don't know how to reproduce this yet. Feel free to close if it
> doesn't clearly show a possible bug.

Not only does it not show a possible bug, it actually shows an
impossible condition.  I feel like I must be missing something here,
because this simply cannot happen, if my reading of the code is
correct.  See below.

> (gdb) bt
> #0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:443
> #1  0x00005555557350bb in die (msg=0x5555558527c0 "w->window_end_valid",
>     file=0x555555850b08 "xdisp.c", line=21783) at alloc.c:8082
> #2  0x00005555555dcd5f in find_first_unchanged_at_end_row (w=0x5555622c4f68,
>     delta=0x7fffffff7b18, delta_bytes=0x7fffffff7b10) at xdisp.c:21783

This points to the following assertion:

  static struct glyph_row *
  find_first_unchanged_at_end_row (struct window *w,
				   ptrdiff_t *delta, ptrdiff_t *delta_bytes)
  {
    struct glyph_row *row;
    struct glyph_row *row_found = NULL;

    *delta = *delta_bytes = 0;

    /* Display must not have been paused, otherwise the current matrix
       is not up to date.  */
    eassert (w->window_end_valid); <<<<<<<<<<<<<<<<<<<<<<

However, find_first_unchanged_at_end_row is called from try_window_id:

> #3  0x00005555555de527 in try_window_id (w=0x5555622c4f68) at xdisp.c:22347

And that function already checked that w->window_end_valid is
non-zero, several dozens of lines before that:

    /* Verify that display wasn't paused.  */
    if (!w->window_end_valid)
      GIVE_UP (8);

GIVE_UP returns from the function.  So how come w->window_end_valid
became zero between that test and the assertion, Emacs being a
single-threaded program??  What am I missing here?  The only possible
explanation I could think of is some compiler bug that causes it to
emit incorrect code, or maybe some hardware problem with memory.  Both
possibilities are almost unthinkable.

Any ideas, even crazy ones, are welcome.





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-05-30 11:38 ` Eli Zaretskii
@ 2024-05-31 10:08   ` Daniel Clemente
  2024-05-31 11:11     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Clemente @ 2024-05-31 10:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71274

> However, find_first_unchanged_at_end_row is called from try_window_id:
> > #3  0x00005555555de527 in try_window_id (w=0x5555622c4f68) at xdisp.c:22347
> And that function already checked that w->window_end_valid is
> non-zero, several dozens of lines before that:
>     /* Verify that display wasn't paused.  */
>     if (!w->window_end_valid)
>       GIVE_UP (8);

Between this check (the one "several dozens of lines before that"),
and the call to find_first_unchanged_at_end_row, something has the
side effect of changing window_end_valid to false. In particular:


  if (last_unchanged_at_beg_row)
    {
      /* Avoid starting to display in the middle of a character, a TAB
     for instance.  This is easier than to set up the iterator
     exactly, and it's not a frequent case, so the additional
     effort wouldn't really pay off.  */
      while ((MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row)
          || last_unchanged_at_beg_row->ends_in_newline_from_string_p)
         && last_unchanged_at_beg_row > w->current_matrix->rows)
    --last_unchanged_at_beg_row;

      if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row))
    GIVE_UP (17);

      if (! init_to_row_end (&it, w, last_unchanged_at_beg_row))
    GIVE_UP (18);


Before that last init_to_row_end, w->window_end_valid was true, and,
after it, it was false.
I saw it through fprintfs added before and after the line.
It's not always like that; sometimes it just stays true all through. I
still don't know the conditions to reproduce this, but I have seen
this bug 4 or 5 times yesterday+today.

So it must be a side effect of init_to_row_end.

I didn't have to read its code yet.


By the way, could this comment in try_window_id explain what is
happening? Maybe this part needs to be moved earlier.

  /* The redisplay iterations in display_line above could have
     triggered font-lock, which could have done something that
     invalidates IT->w window's end-point information, on which we
     rely below.  E.g., one package, which will remain unnamed, used
     to install a font-lock-fontify-region-function that called
     bury-buffer, whose side effect is to switch the buffer displayed
     by IT->w, and that predictably resets IT->w's window_end_valid
     flag, which we already tested at the entry to this function.
     Amply punish such packages/modes by giving up on this
     optimization in those cases.  */
  if (!w->window_end_valid)
    {
      clear_glyph_matrix (w->desired_matrix);
      return -1;
    }





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-05-31 10:08   ` Daniel Clemente
@ 2024-05-31 11:11     ` Eli Zaretskii
  2024-06-03 17:50       ` Daniel Clemente
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-05-31 11:11 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: 71274

> From: Daniel Clemente <n142857@gmail.com>
> Date: Fri, 31 May 2024 10:08:18 +0000
> Cc: 71274@debbugs.gnu.org
> 
> > However, find_first_unchanged_at_end_row is called from try_window_id:
> > > #3  0x00005555555de527 in try_window_id (w=0x5555622c4f68) at xdisp.c:22347
> > And that function already checked that w->window_end_valid is
> > non-zero, several dozens of lines before that:
> >     /* Verify that display wasn't paused.  */
> >     if (!w->window_end_valid)
> >       GIVE_UP (8);
> 
> Between this check (the one "several dozens of lines before that"),
> and the call to find_first_unchanged_at_end_row, something has the
> side effect of changing window_end_valid to false. In particular:
> 
> 
>   if (last_unchanged_at_beg_row)
>     {
>       /* Avoid starting to display in the middle of a character, a TAB
>      for instance.  This is easier than to set up the iterator
>      exactly, and it's not a frequent case, so the additional
>      effort wouldn't really pay off.  */
>       while ((MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row)
>           || last_unchanged_at_beg_row->ends_in_newline_from_string_p)
>          && last_unchanged_at_beg_row > w->current_matrix->rows)
>     --last_unchanged_at_beg_row;
> 
>       if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row))
>     GIVE_UP (17);
> 
>       if (! init_to_row_end (&it, w, last_unchanged_at_beg_row))
>     GIVE_UP (18);
> 
> 
> Before that last init_to_row_end, w->window_end_valid was true, and,
> after it, it was false.

Thanks, but please find where it changes inside the call to
init_to_row_end, because I couldn't see anything obvious in the code
involved in that call.  There's some factor at work here that we need
to identify and understand.

(It is easy to add some band-aid without such an understanding, but
I'm not yet prepared to do that.)

> I saw it through fprintfs added before and after the line.
> It's not always like that; sometimes it just stays true all through. I
> still don't know the conditions to reproduce this, but I have seen
> this bug 4 or 5 times yesterday+today.
> 
> So it must be a side effect of init_to_row_end.

Yes, but where exactly in that function or the ones it calls?

> By the way, could this comment in try_window_id explain what is
> happening? Maybe this part needs to be moved earlier.

Maybe.  But I'd like to see a backtrace with some of those guilty
parties in the callstack, before I do that.





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-05-31 11:11     ` Eli Zaretskii
@ 2024-06-03 17:50       ` Daniel Clemente
  2024-06-03 18:14         ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Clemente @ 2024-06-03 17:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71274

> Thanks, but please find where it changes inside the call to
> init_to_row_end, because I couldn't see anything obvious in the code
> involved in that call.  There's some factor at work here that we need
> to identify and understand.

It happens (window_end_valid becoming false) inside init_iterator,  in
init_from_display_pos (called init_to_row_end). Here:

  /* Keep in mind: the call to reseat in init_iterator skips invisible
     text, so we might end up at a position different from POS.  This
     is only a problem when POS is a row start after a newline and an
     overlay starts there with an after-string, and the overlay has an
     invisible property.  Since we don't skip invisible text in
     display_line and elsewhere immediately after consuming the
     newline before the row start, such a POS will not be in a string,
     but the call to init_iterator below will move us to the
     after-string.  */
 init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID);


Inside init_iterator, window_end_valid becomes false during this code
(i.e. it was true just before, and false just after):

  /* If face attributes have been changed since the last redisplay,
     free realized faces now because they depend on face definitions
     that might have changed.  Don't free faces while there might be
     desired matrices pending which reference these faces.  */
  if (!inhibit_free_realized_faces)
    {
      if (face_change)
    {
      face_change = false;
      XFRAME (w->frame)->face_change = 0;
      free_all_realized_faces (Qnil);
    }
      else if (XFRAME (w->frame)->face_change)
    {
      XFRAME (w->frame)->face_change = 0;
      free_all_realized_faces (w->frame);
    }
    }

I don't know yet which branch runs or what happens inside
free_all_realized_faces, since I didn't see this crash recently.

Does this give any hint about how window_end_valid could become false?

In next tests I'll run with the latest git version, including your
recent commit eb9afd558ec (which I know is for something different
—SIGWINCH— but who knows, maybe it was related to this bug).





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-06-03 17:50       ` Daniel Clemente
@ 2024-06-03 18:14         ` Eli Zaretskii
  2024-06-06 12:39           ` Daniel Clemente
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-06-03 18:14 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: 71274

> From: Daniel Clemente <n142857@gmail.com>
> Date: Mon, 3 Jun 2024 17:50:47 +0000
> Cc: 71274@debbugs.gnu.org
> 
> > Thanks, but please find where it changes inside the call to
> > init_to_row_end, because I couldn't see anything obvious in the code
> > involved in that call.  There's some factor at work here that we need
> > to identify and understand.
> 
> It happens (window_end_valid becoming false) inside init_iterator,  in
> init_from_display_pos (called init_to_row_end). Here:
> 
>   /* Keep in mind: the call to reseat in init_iterator skips invisible
>      text, so we might end up at a position different from POS.  This
>      is only a problem when POS is a row start after a newline and an
>      overlay starts there with an after-string, and the overlay has an
>      invisible property.  Since we don't skip invisible text in
>      display_line and elsewhere immediately after consuming the
>      newline before the row start, such a POS will not be in a string,
>      but the call to init_iterator below will move us to the
>      after-string.  */
>  init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID);
> 
> 
> Inside init_iterator, window_end_valid becomes false during this code
> (i.e. it was true just before, and false just after):
> 
>   /* If face attributes have been changed since the last redisplay,
>      free realized faces now because they depend on face definitions
>      that might have changed.  Don't free faces while there might be
>      desired matrices pending which reference these faces.  */
>   if (!inhibit_free_realized_faces)
>     {
>       if (face_change)
>     {
>       face_change = false;
>       XFRAME (w->frame)->face_change = 0;
>       free_all_realized_faces (Qnil);
>     }
>       else if (XFRAME (w->frame)->face_change)
>     {
>       XFRAME (w->frame)->face_change = 0;
>       free_all_realized_faces (w->frame);
>     }
>     }
> 
> I don't know yet which branch runs or what happens inside
> free_all_realized_faces, since I didn't see this crash recently.
> 
> Does this give any hint about how window_end_valid could become false?

Yes, it does, thanks.  I installed a fix which hopefully plugs this.

> In next tests I'll run with the latest git version, including your
> recent commit eb9afd558ec (which I know is for something different
> —SIGWINCH— but who knows, maybe it was related to this bug).

I don't think so.





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-06-03 18:14         ` Eli Zaretskii
@ 2024-06-06 12:39           ` Daniel Clemente
  2024-06-06 13:35             ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Clemente @ 2024-06-06 12:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71274

Thanks, well, I'm not seeing these errors anymore. I don't have a
formula to reproduce the bug, but I trust the patch will help and this
bug can be closed.

I don't much knowledge about try_window_id. Could this change create
new situations in which a window isn't fully redisplayed but it
should?
I saw a redisplay issue after resizing the window (mangled text) but I
don't think it's related to this bug because I placed a breakpoint on
your new code and it didn't run.  I posted some details at 71289.









On Mon, 3 Jun 2024 at 18:15, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Daniel Clemente <n142857@gmail.com>
> > Date: Mon, 3 Jun 2024 17:50:47 +0000
> > Cc: 71274@debbugs.gnu.org
> >
> > > Thanks, but please find where it changes inside the call to
> > > init_to_row_end, because I couldn't see anything obvious in the code
> > > involved in that call.  There's some factor at work here that we need
> > > to identify and understand.
> >
> > It happens (window_end_valid becoming false) inside init_iterator,  in
> > init_from_display_pos (called init_to_row_end). Here:
> >
> >   /* Keep in mind: the call to reseat in init_iterator skips invisible
> >      text, so we might end up at a position different from POS.  This
> >      is only a problem when POS is a row start after a newline and an
> >      overlay starts there with an after-string, and the overlay has an
> >      invisible property.  Since we don't skip invisible text in
> >      display_line and elsewhere immediately after consuming the
> >      newline before the row start, such a POS will not be in a string,
> >      but the call to init_iterator below will move us to the
> >      after-string.  */
> >  init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID);
> >
> >
> > Inside init_iterator, window_end_valid becomes false during this code
> > (i.e. it was true just before, and false just after):
> >
> >   /* If face attributes have been changed since the last redisplay,
> >      free realized faces now because they depend on face definitions
> >      that might have changed.  Don't free faces while there might be
> >      desired matrices pending which reference these faces.  */
> >   if (!inhibit_free_realized_faces)
> >     {
> >       if (face_change)
> >     {
> >       face_change = false;
> >       XFRAME (w->frame)->face_change = 0;
> >       free_all_realized_faces (Qnil);
> >     }
> >       else if (XFRAME (w->frame)->face_change)
> >     {
> >       XFRAME (w->frame)->face_change = 0;
> >       free_all_realized_faces (w->frame);
> >     }
> >     }
> >
> > I don't know yet which branch runs or what happens inside
> > free_all_realized_faces, since I didn't see this crash recently.
> >
> > Does this give any hint about how window_end_valid could become false?
>
> Yes, it does, thanks.  I installed a fix which hopefully plugs this.
>
> > In next tests I'll run with the latest git version, including your
> > recent commit eb9afd558ec (which I know is for something different
> > —SIGWINCH— but who knows, maybe it was related to this bug).
>
> I don't think so.





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

* bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row
  2024-06-06 12:39           ` Daniel Clemente
@ 2024-06-06 13:35             ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2024-06-06 13:35 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: 71274-done

> From: Daniel Clemente <n142857@gmail.com>
> Date: Thu, 6 Jun 2024 12:39:39 +0000
> Cc: 71274@debbugs.gnu.org
> 
> Thanks, well, I'm not seeing these errors anymore. I don't have a
> formula to reproduce the bug, but I trust the patch will help and this
> bug can be closed.

Done.

> I don't much knowledge about try_window_id. Could this change create
> new situations in which a window isn't fully redisplayed but it
> should?

No.  try_window_id is an optimization: it tries to avoid some work by
reusing portions of the previously-displayed glyph matrix.  When
try_window_id calls GIVE_UP, it means the optimization cannot be used,
but the result should still be correct, just perhaps slower.





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

end of thread, other threads:[~2024-06-06 13:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30  9:51 bug#71274: 30.0.50; assertion failed: w->window_end_valid, in find_first_unchanged_at_end_row Daniel Clemente
2024-05-30 11:38 ` Eli Zaretskii
2024-05-31 10:08   ` Daniel Clemente
2024-05-31 11:11     ` Eli Zaretskii
2024-06-03 17:50       ` Daniel Clemente
2024-06-03 18:14         ` Eli Zaretskii
2024-06-06 12:39           ` Daniel Clemente
2024-06-06 13:35             ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.