Subject: 31.0.50; Flickering on macOS

From: Aaron Jensen <[email-masked]>
Date: Sat, 15 Mar 2025 09:41:38 -0700

I have been using Emacs 31 since the version was increased on master. In
the last few monthns I have noticed that there is occasional flickering
where the text will not render and the background will be visible. This
only happens in a part of the window and not the entire window. It seems
to get worse the longer Emacs is open and it seems to only occur in
certain buffers or windows. I cannot consistently reproduce it and
sometimes it takes hours of Emacs being open for it to start happening
so it's challenging to bisect.

I don't know if there have been any changes to the rendering code
recently that could potentially cause this. I'm wondering about the
recent child frame changes to make them compatible with the terminal. I
make heavy use of child frames for text completions and other things. Is
it possible that that is related? I don't think there have been many
macOS specific changes recently.

I'll send more information as I get it, but I wanted to report this
in case anyone had any ideas.

In GNU Emacs 31.0.50 (build 2, aarch64-apple-darwin24.3.0, NS
 appkit-2575.40 Version 15.3.2 (Build 24D81)) of 2025-03-15 built on
 Aarons-MacBook-Pro-3.local
Repository revision: 3860562a715b8ba7b727f7831e06ce5a0e676784
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.3.2

Configured using:
 'configure --with-ns --with-native-compilation --with-modules
 --without-dbus --without-webp --with-xml2 --with-gnutls
 --disable-ns-self-contained'

Configured features:
ACL GLIB GNUTLS LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS
PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER XIM
ZLIB

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

Major mode: Magit

Minor modes in effect:
  xterm-mouse-mode: t
  pdf-occur-global-minor-mode: t
  eval-sexp-fu-flash-mode: t
  magit-delta-mode: t
  global-flycheck-mode: t
  consult-notes-denote-mode: t
  denote-rename-buffer-mode: t
  denote-menu-bar-mode: t
  windmove-mode: t
  corfu-prescient-mode: t
  corfu-history-mode: t
  which-key-posframe-mode: t
  which-key-mode: t
  global-anzu-mode: t
  anzu-mode: t
  global-evil-mc-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  global-git-commit-mode: t
  global-auto-revert-mode: t
  treemacs-filewatch-mode: t
  treemacs-follow-mode: t
  treemacs-git-mode: t
  treemacs-fringe-indicator-mode: t
  ns-auto-titlebar-mode: t
  recentf-mode: t
  repeat-mode: t
  gcmh-mode: t
  undo-fu-session-global-mode: t
  ws-butler-global-mode: t
  save-place-mode: t
  tabspaces-mode: t
  savehist-mode: t
  delete-selection-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  vertico-prescient-mode: t
  prescient-persist-mode: t
  vertico-mouse-mode: t
  vertico-mode: t
  mini-frame-mode: t
  better-jumper-mode: t
  modern-tab-bar-mode: t
  +popup-mode: t
  evil-mode: t
  evil-local-mode: t
  server-mode: t
  leader-key-leader-override-mode: t
  global-leader-key-leader-override-mode: t
  elpaca-use-package-mode: t
  override-global-mode: t
  global-display-line-numbers-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/Users/aaronjensen/.emacs.d/elpaca/builds/lispy/elpa hides /Users/aaronjensen/.emacs.d/elpaca/builds/ivy/elpa
/Users/aaronjensen/.emacs.d/elpaca/builds/transient/transient hides /Users/aaronjensen/Source/emacs/lisp/transient

Features:
(shadow sort mail-extr emacsbug lisp-mnt tramp-cmds vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view bug-reference org-capture
evil-collection-dired typescript-ts-mode lsp-diagnostics lsp-modeline
lsp-icons lsp-lens lsp-zig lsp-yang lsp-yaml lsp-xml lsp-wgsl lsp-volar
lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v
lsp-typespec lsp-typeprof lsp-ttcn3 lsp-ts-query lsp-trunk lsp-toml
lsp-tilt lsp-tex lsp-terraform lsp-svelte lsp-steep lsp-sqls lsp-sql
lsp-sorbet lsp-solidity lsp-solargraph lsp-semgrep lsp-rust lsp-ruff
lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop lsp-roslyn lsp-roc lsp-rf
lsp-remark lsp-racket lsp-r lsp-qml lsp-pylsp lsp-pyls lsp-pwsh
lsp-purescript lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad
lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-nextflow lsp-move
lsp-mojo lsp-mint lsp-meson lsp-mdx lsp-matlab lsp-marksman lsp-markdown
lsp-magik lsp-fennel lsp-lua lsp-lisp lsp-kubernetes-helm lsp-kotlin
lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe lsp-hack lsp-groovy
lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam lsp-gdscript lsp-fsharp
lsp-futhark lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elm
lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher
lsp-cucumber lsp-copilot lsp-css lsp-c3 lsp-csharp lsp-crystal lsp-credo
lsp-cobol lsp-cmake lsp-clojure lsp-clangd lsp-bufls lsp-go
lsp-completion lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro
lsp-asm lsp-ansible lsp-angular lsp-ada lsp-semantic-tokens
lsp-actionscript dabbrev elec-pair tab-line popup-mode-core diary-lib
diary-loaddefs org-indent oc-basic ol-eww ol-rmail ol-mhe ol-irc ol-info
ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls
dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud
nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range
gnus-win ol-docview doc-view ol-bibtex bibtex ol-bbdb ol-w3m ol-doi
org-link-doi magit-extras flyspell ispell visual-wrap vertico-directory
xt-mouse swiper ivy ivy-faces ivy-overlay colir iedit iedit-lib
hide-mode-line goto-chg cfrs elysium gptel-ollama gptel gptel-openai
copy-as-format tabify evil-collection-pdf pdf-history pdf-occur ibuf-ext
evil-collection-ibuffer ibuffer ibuffer-loaddefs tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag cedet
pdf-isearch let-alist pdf-misc pdf-loader pdf-tools pdf-view jka-compr
pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif
evil-collection-restclient restclient dumb-jump popup haml-mode css-mode
eww vtable url-queue shr pixel-fill kinsoku url-file svg xml mm-url gnus
nnheader range emmet-mode terraform-mode hcl-mode dockerfile-mode
yaml-mode json-mode json-snatcher js c-ts-common cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine grip-mode
lua-mode ruby-refactor bundler inf-ruby ruby-mode evil-ruby-text-objects
sotlisp skeleton elisp-def ert lispyville lispy hydra lispy-inline etags
fileloop lispy-tags zoutline eros eval-sexp-fu web-mode ripgrep-capf
git-link consult-git-commit evil-collection-git-timemachine
git-timemachine magit-delta prettier editorconfig editorconfig-core
editorconfig-core-handle editorconfig-fnmatch nvm iter2 lsp-ui
lsp-ui-flycheck lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek
lsp-ui-sideline flycheck lsp-ui-util lsp-mode lsp-protocol spinner
network-stream markdown-mode lv ewoc consult-notes-denote consult-notes
denote-rename-buffer denote imenu-list hideshow org-superstar
org-pandoc-import gnuplot org-journal org-crypt cal-iso orgonomic
org-drill persist org-appear org-mac-link org-goto embark-org
org-download url-http url-auth url-gw nsm async evil-org-agenda evil-org
ob-shell 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 org-agenda ox-ascii ox-gfm ox-md ox-html table ox-publish
ox org-attach org-element org-persist org-id org-refile org-element-ast
avl-tree generator org-tempo tempo 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 org-list org-footnote org-faces org-entities
noutline outline org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu
calendar cal-loaddefs org-compat org-macs evil-terminal-cursor-changer
ace-window buffer-move windmove rotate embark-consult embark ffap
consult cape corfu-prescient corfu-history evil-collection-corfu corfu
which-key-posframe evil-collection-which-key which-key evil-anzu anzu
titlecase titlecase-data wgrep grep avy form-feed dtrt-indent evil-mc
evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make
evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars
evil-mc-known-commands evil-mc-common evil-numbers speeddating
evil-matchit evil-matchit-evil-setup evil-matchit-sdk semantic/lex
semantic/fw mode-local evil-nerd-commenter evil-nerd-commenter-operator
evil-nerd-commenter-sdk sgml-mode facemenu dom evil-visualstar
evil-surround evil-collection-vundo vundo evil-collection-ztree ztree
ztree-diff ztree-diff-model ztree-dir ztree-view ztree-protocol
ztree-util dwim-shell-commands proced dwim-shell-command view
evil-collection-magit treemacs-magit magit-bookmark magit-submodule
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 package
url-handlers magit-repos magit-apply magit-wip magit-log magit-diff
smerge-mode diff git-commit log-edit message sendmail yank-media puny
rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-core magit-autorevert autorevert magit-margin
magit-transient magit-process with-editor magit-mode browse-url
benchmark magit-git magit-base magit-section cursor-sensor crm llama
treemacs-evil treemacs-tab-bar treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-bookmarks treemacs-tags
evil-collection-xref xref treemacs-interface treemacs-persistence
treemacs-filewatch-mode filenotify treemacs-follow-mode
treemacs-rendering treemacs-annotations treemacs-async
treemacs-workspaces treemacs-dom treemacs-visuals
treemacs-fringe-indicator pulse treemacs-faces treemacs-icons
treemacs-scope treemacs-themes treemacs-core-utils pfuture inline
hl-line ht treemacs-logging treemacs-customization treemacs-macros
all-the-icons all-the-icons-faces data-material data-weathericons
data-octicons data-fileicons data-faicons data-alltheicons rainbow-mode
xterm-color posframe ns-auto-titlebar envrc inheritenv
evil-collection-helpful helpful cc-langs cc-vars cc-defs trace cl-print
evil-collection-edebug edebug evil-collection-debug debug backtrace
info-look info f help-fns radix-tree elisp-refs s dired-subtree
dired-hacks-utils dired-aux dash recentf tree-widget repeat gcmh
undo-fu-session ws-butler saveplace tabspaces dired-x vc savehist delsel
yasnippet vertico-prescient prescient char-fold vertico-mouse vertico
mini-frame better-jumper advice popup-mode-hacks aidermacs
aidermacs-models aidermacs-backends aidermacs-backend-vterm
evil-collection-vterm vterm bookmark color term ehelp find-func
vterm-module term/xterm xterm aidermacs-backend-comint tramp trampver
tramp-integration tramp-message tramp-compat xdg shell pcomplete
parse-time iso8601 tramp-loaddefs which-func imenu vc-git diff-mode
track-changes files-x vc-dispatcher evil-collection-ediff ediff
ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util dired dired-loaddefs transient format-spec orderless
modern-tab-bar popup-mode popup-mode-settings evil-collection-elpaca
evil-collection annalist evil-little-word cus-edit cus-start cus-load
wid-edit pp evil evil-integration evil-maps evil-commands reveal
evil-jumps evil-command-window evil-types evil-search evil-ex
evil-macros evil-repeat evil-states evil-core project evil-common
thingatpt rect evil-vars memoize nano-modeline nano-theme face-remap
nano-theme-support disp-table gcmh-autoloads elysium-autoloads
gptel-autoloads aidermacs-autoloads copy-as-format-autoloads
pdf-tools-autoloads tablist-autoloads restclient-autoloads
vterm-autoloads dumb-jump-autoloads popup-autoloads haml-mode-autoloads
emmet-mode-autoloads terraform-mode-autoloads hcl-mode-autoloads
dockerfile-mode-autoloads yaml-mode-autoloads json-mode-autoloads
json-snatcher-autoloads grip-mode-autoloads lua-mode-autoloads
bundler-autoloads inf-ruby-autoloads ruby-refactor-autoloads
evil-ruby-text-objects-autoloads sotlisp-autoloads elisp-def-autoloads
lispyville-autoloads lispy-autoloads iedit-autoloads swiper-autoloads
ivy-autoloads zoutline-autoloads eros-autoloads eval-sexp-fu-autoloads
web-mode-autoloads ripgrep-capf-autoloads git-link-autoloads
consult-git-commit-autoloads git-timemachine-autoloads
magit-delta-autoloads xterm-color-autoloads prettier-autoloads
iter2-autoloads nvm-autoloads flycheck-autoloads lsp-ui-autoloads
lsp-mode-autoloads spinner-autoloads markdown-mode-autoloads
consult-notes-autoloads denote-autoloads imenu-list-autoloads
org-superstar-autoloads ox-gfm-autoloads org-pandoc-import-autoloads
gnuplot-autoloads org-download-autoloads async-autoloads
org-journal-autoloads orgonomic-autoloads org-drill-autoloads
persist-autoloads org-appear-autoloads org-mac-link-autoloads
evil-org-autoloads evil-terminal-cursor-changer-autoloads
better-jumper-autoloads buffer-move-autoloads rotate-autoloads
mini-frame-autoloads embark-consult-autoloads embark-autoloads
consult-autoloads orderless-autoloads cape-autoloads
corfu-prescient-autoloads corfu-autoloads vertico-prescient-autoloads
vertico-autoloads prescient-autoloads tabspaces-autoloads
modern-tab-bar-autoloads which-key-posframe-autoloads
popup-mode-autoloads hide-mode-line-autoloads evil-anzu-autoloads
anzu-autoloads titlecase-autoloads wgrep-autoloads yasnippet-autoloads
form-feed-autoloads dtrt-indent-autoloads ws-butler-autoloads
evil-collection-autoloads annalist-autoloads evil-mc-autoloads
evil-numbers-autoloads speeddating-autoloads evil-little-word-autoloads
evil-matchit-autoloads evil-nerd-commenter-autoloads
evil-visualstar-autoloads evil-surround-autoloads vundo-autoloads
undo-fu-session-autoloads ztree-autoloads dwim-shell-command-autoloads
treemacs-tab-bar-autoloads treemacs-magit-autoloads magit-autoloads
magit-section-autoloads llama-autoloads transient-autoloads
with-editor-autoloads treemacs-evil-autoloads evil-autoloads
goto-chg-autoloads treemacs-autoloads ace-window-autoloads avy-autoloads
pfuture-autoloads hydra-autoloads lv-autoloads ht-autoloads
cfrs-autoloads all-the-icons-autoloads rainbow-mode-autoloads
posframe-autoloads ns-auto-titlebar-autoloads nano-modeline-autoloads
nano-theme-autoloads memoize-autoloads envrc-autoloads
inheritenv-autoloads helpful-autoloads f-autoloads elisp-refs-autoloads
s-autoloads dired-subtree-autoloads dired-hacks-utils-autoloads
dash-autoloads server pcase edmacro kmacro compdef derived
compdef-autoloads leader-key bind-map leader-key-autoloads
bind-map-autoloads no-littering compat no-littering-autoloads
elpaca-use-package use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core elpaca-use-package-autoloads compile
text-property-search comint ansi-osc ansi-color ring time-date comp-run
literate-config literate-config-autoloads elpaca-log elpaca-ui
elpaca-menu-elpa elpaca-menu-melpa url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util url-parse auth-source eieio eieio-core cl-macs password-cache
json map byte-opt url-vars mailcap elpaca-menu-org elpaca elpaca-process
elpaca-autoloads comp cl-seq comp-cstr comp-common warnings subr-x rx gv
bytecomp byte-compile cl-extra help-mode icons cl-loaddefs cl-lib
display-line-numbers rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns lcms2
multi-tty make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 2238502 3433019) (symbols 48 87339 26) (strings 32 653723 387319)
 (string-bytes 1 16855963) (vectors 16 290916) (vector-slots 8 3770891 910650)
 (floats 8 3361 4370) (intervals 56 25266 4815) (buffers 992 74))