Subject: bug#44448:

From: Amai Kinono <[email-masked]>
Date: Fri, 5 Feb 2021 21:42:25 +0800

I'm on Emacs 28 now. The problem can still be reproduced, just the
chance becomes lower. Maybe it's appropriate to reopen this.

I've found some factors that seem to increase the chance to reproduce,
so here's a new recipe:

- `$ emacs -Q`

- Eval this:

  (run-with-timer 0 0.01 (lambda () (setq mode-line-format "hi")))

  Smaller `repeat` value seems to increase the chance. Also notice that
  setting `header-line-format` and `tab-line-format` can both work.

- `M-x delete-other-windows` so we have only one window.

- `C-x C-f` to open a file. I use
  https://github.com/lsof-org/lsof/blob/master/main.c when testing, but
  any file that's long enough should work.

- `M-x split-window-horizontally`, so we have 2 windows viewing the same
  file.

- Shrink the Emacs frame until many lines are not fully displayed. This
  is important. It increases the chance by a lot.

- Scroll one window down to somethere.

- Hold `C-g`, then the window will go to the same position in file as
  the other window. If it doesn't, release `C-g` and hold it again.

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24,
cairo version 1.17.4)
 of 2021-02-05 built on kino-pc2
Repository revision: 9730575f3a2599be0a4f9c3d1ef5321bf1294e93
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Manjaro Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-sound=alsa --with-modules --without-gconf --without-gsettings
 --enable-link-time-optimization --with-x-toolkit=gtk3 --without-xaw3d
 --without-compress-install 'CFLAGS=-march=x86-64 -mtune=generic -O2
 -pipe -fno-plt -flto -fuse-linker-plugin -flto -fuse-linker-plugin'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

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

Important settings:
  value of $LC_MONETARY: zh_CN.UTF-8
  value of $LC_NUMERIC: zh_CN.UTF-8
  value of $LC_TIME: zh_CN.UTF-8
  value of $LANG: zh_CN.utf8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: C/*l

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search seq byte-opt
gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils vc-git diff-mode easy-mmode
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs time-date subr-x cl-loaddefs cl-lib china-util
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type 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 elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu 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 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 font-render-setting cairo move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 85780 7204)
 (symbols 48 9615 1)
 (strings 32 26180 1255)
 (string-bytes 1 967039)
 (vectors 16 16414)
 (vector-slots 8 262420 9066)
 (floats 8 29 56)
 (intervals 56 2112 0)
 (buffers 984 11))