unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
@ 2023-09-09 16:35 Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-09 16:49 ` Eli Zaretskii
  2023-09-09 19:53 ` Alan Third
  0 siblings, 2 replies; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-09 16:35 UTC (permalink / raw)
  To: 65843

[-- Attachment #1: Type: text/plain, Size: 5698 bytes --]


=============================================================================
In Emacs 28 and Emacs 29, desktop-load crashes when there are too many
iconified frames in the .emacs.desktop file.

The two attached .emacs.desktop files show the smallest test case that
I could come up with:

- .emacs.desktop.works with 3 non-iconified and 4 iconified frames
  loads without problem in Emacs 28

  + desktop-load of this file crashes in Emacs 29.1

  + a .emacs.desktop with 3 non-iconified and 3 iconified frames works
    in Emacs 29.1

- .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames
  leads to a crash in Emacs 28 (see attached problem report generated
  by macOS)

- I tried .emacs.desktop with up to 17 non-iconified frames in Emacs
  28 without problems

- Up to Emacs 27, I've never seen a problem with desktop-load crashing
=============================================================================

In GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559))
 of 2022-09-12 built on armbob.lan
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.5.2

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $EMACSLOADPATH: /Users/tanzer/.emacs.lib::/Applications/Emacs.app/Contents/Resources/site-lisp:
  value of $LC_CTYPE: UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Elisp

Minor modes in effect:
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-auto-revert-mode: t
  recentf-mode: t
  msb-mode: t
  shell-dirtrack-mode: t
  global-hl-line-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Load-path shadows:
/System/Volumes/Data/Swing/work/project/ls-emacs/javascript hides /Users/tanzer/.emacs.lib/javascript
/Users/tanzer/.emacs.lib/custom hides /Applications/Emacs-28.2.app/Contents/Resources/lisp/custom
/System/Volumes/Data/Swing/work/project/ls-emacs/picture hides /Applications/Emacs-28.2.app/Contents/Resources/lisp/textmodes/picture

Features:
(shadow emacsbug message rmc puny dired dired-loaddefs rfc822 mml
mml-sec epa epg rfc6068 epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils cl-extra help-mode flyspell ispell help-at-pt easy-mmode
display-fill-column-indicator autorevert filenotify recentf
tree-widget wid-edit javascript-mode jinja-mode sgml-mode facemenu dom
swing-kartei-quot swing-kartei-person swing-kartei-firma
swing-kartei-bib swing-kartei--summary swing-kartei--entry
swing-command whitespace msb python tramp-sh tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat parse-time iso8601
time-date ls-lisp format-spec lse-python tex-mode shell pcomplete
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs derived lse-cal lse-tpu-edit-units imenu
lse-window lse-vcs lse-range lse-mode-alist lse-menu lse-mark-stack
lse-learn-key lse-language lse-kill lse-keys lse-interactive lse-git
server hl-line desktop frameset lse-session lse-frame
lse-fill-in--search lse-fill-in--delimiters lse-fill-in-marks
lse-fill-in-history lse-hash lse-fill-in-info lse-flat-fill-in
lse-fill-in ffap thingatpt url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs cl-loaddefs cl-lib password-cache
json subr-x map seq byte-opt gv bytecomp byte-compile cconv url-vars
lse-file lse-face lse-editing lse-define lse-deep-fill-in
lse-completion lse-tpu-keys compile text-property-search comint
ansi-color ring lse-compilation lse-indent lse-comment lse-command
lse-byte-compile lse-buffer-list lse-buffer lse-tpu time picture
lse-pos-ring lse-list-util lse-basics ls-emacs lse-macosx iso-transl
tooltip 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 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 kqueue
cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 175982 22705)
 (symbols 48 18405 19)
 (strings 32 57896 1128)
 (string-bytes 1 1911663)
 (vectors 16 31974)
 (vector-slots 8 405187 13402)
 (floats 8 113 104)
 (intervals 56 2435 67)
 (buffers 992 14))

[-- Attachment #2: .emacs.desktop.works --]
[-- Type: text/x-lisp, Size: 11549 bytes --]

;; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*-
;; --------------------------------------------------------------------------
;; Desktop File for Emacs
;; --------------------------------------------------------------------------
;; Created Sat Sep  9 17:12:10 2023
;; Desktop file format version 208
;; Emacs version 28.2

;; Global section:
(setq desktop-saved-frameset [frameset 1 (25852 39258 621480 0) (desktop . "208") "tanzer@CTs-MBA-M1.c10a.cluster" nil nil ((((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (last-focus-update) (frameset--id . "22F2-0539-CFD6-62B1") (frameset--mini t) (height . 98) (width . 80) (modeline . t) (unsplittable) (left . 0) (top . 25) (icon-name) (visibility . icon) (tool-bar-position . top)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 1358) (total-width . 84) (total-height . 97) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 21739) (start . 21702))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . icon) (last-focus-update) (frameset--id . "20A4-5AB8-CF13-849D") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 98) (width . 80) (left . 692) (top . 25)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 1358) (total-width . 84) (total-height . 97) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 22472) (start . 22437))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . icon) (last-focus-update) (frameset--id . "B4F4-50C9-0C48-3915") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 48) (width . 80) (left . 0) (top . 25)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer "ls-emacs:ls-emacs.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 7182) (start . 7159))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance . unbound) (ns-transparent-titlebar . unbound) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . t) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (tab-bar-lines . 0) (alpha-background) (last-focus-update) (frameset--id . "1946-F0C7-D565-7523") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 48) (width . 80) (left . 1309) (top . 723)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer "ls-emacs:ls-emacs.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 7182) (start . 5973)) (prev-buffers ("ls-emacs:lse-face.el" 12406 13098) ("lse-frame.el" 29141 29143))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . t) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (tab-bar-lines . 0) (alpha-background) (last-focus-update) (frameset--id . "4937-7B60-73F9-945F") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 98) (width . 80) (left . 1905) (top . 25)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 1358) (total-width . 84) (total-height . 97) (normal-height . 1.0) (normal-width . 1.0) (buffer "lse-frame.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 6698) (start . 6688)) (prev-buffers ("*scratch*" 1 1))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . t) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (tab-bar-lines . 0) (alpha-background) (last-focus-update . t) (frameset--id . "0F0D-B0BD-46F0-CD08") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 48) (width . 80) (left . 397) (top . 58)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 21739) (start . 21428)) (prev-buffers ("lse-frame.el" 34641 36025))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (background-mode . light) (environment) (root-p . t) (title-prefix-suffix . "-Root") (tab-bar-lines . 0) (alpha-background) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (sticky) (last-focus-update) (frameset--id . "56AB-01CB-1E91-5598") (frameset--mini t . t) (modeline . t) (unsplittable) (icon-name) (visibility . icon) (tool-bar-position . top) (height . 48) (width . 80) (left . 994) (top . 60)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer "lse-frame.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 11226) (start . 11222)) (prev-buffers ("*scratch*" 1 1))))])

;; Buffer section -- buffers listed in same order as in buffer list:
(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/private/tanzer/Dotfiles/.emacs"
  ".emacs"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  21739
  '(22126 nil)
  nil
  nil
  '((buffer-display-time 25852 39257 691232 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring (22212 22212 20949 21199 21365 22436 21739))))

(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/work/project/ls-emacs/ls-emacs.el"
  "ls-emacs:ls-emacs.el"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  7182
  '(nil nil)
  nil
  nil
  '((buffer-display-time 25852 39246 545156 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring nil)))

(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/work/project/ls-emacs/lse-frame.el"
  "lse-frame.el"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  6698
  '(nil nil)
  nil
  nil
  '((buffer-display-time 25852 39246 454463 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring nil)))

(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/work/project/ls-emacs/lse-face.el"
  "ls-emacs:lse-face.el"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  13098
  '(nil nil)
  nil
  nil
  '((buffer-display-time 25852 39245 843355 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring nil)))


[-- Attachment #3: .emacs.desktop.crashes --]
[-- Type: text/x-lisp, Size: 12816 bytes --]

;; -*- mode: emacs-lisp; lexical-binding:t; coding: utf-8-emacs; -*-
;; --------------------------------------------------------------------------
;; Desktop File for Emacs
;; --------------------------------------------------------------------------
;; Created Sat Sep  9 16:32:31 2023
;; Desktop file format version 208
;; Emacs version 28.2

;; Global section:
(setq desktop-saved-frameset [frameset 1 (25852 36879 967273 0) (desktop . "208") "tanzer@CTs-MBA-M1.c10a.cluster" nil nil ((((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (last-focus-update) (frameset--id . "5897-8DF5-64A8-ADD4") (frameset--mini t) (height . 98) (width . 80) (modeline . t) (unsplittable) (left . 0) (top . 25) (icon-name) (visibility . icon) (tool-bar-position . top)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 1358) (total-width . 84) (total-height . 97) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 20614) (start . 20577))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (last-focus-update) (frameset--id . "4126-609D-C799-E2DA") (frameset--mini t) (height . 30) (width . 80) (modeline . t) (unsplittable) (left . 0) (top . 25) (icon-name) (visibility . icon) (tool-bar-position . top)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 406) (total-width . 84) (total-height . 29) (normal-height . 1.0) (normal-width . 1.0) (buffer "lse-frame.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 6698) (start . 6688))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . icon) (last-focus-update) (frameset--id . "20A4-5AB8-CF13-849D") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 98) (width . 80) (left . 692) (top . 25)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 1358) (total-width . 84) (total-height . 97) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 22472) (start . 22437))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . icon) (last-focus-update) (frameset--id . "B4F4-50C9-0C48-3915") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 48) (width . 80) (left . 0) (top . 25)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer "ls-emacs:ls-emacs.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 7182) (start . 7159))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance . unbound) (ns-transparent-titlebar . unbound) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . t) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (tab-bar-lines . 0) (alpha-background) (last-focus-update) (frameset--id . "1946-F0C7-D565-7523") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 48) (width . 80) (left . 1309) (top . 722)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer "ls-emacs:ls-emacs.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 7182) (start . 5973)) (prev-buffers ("ls-emacs:lse-face.el" 12406 13098) ("lse-frame.el" 29141 29143))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . t) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (tab-bar-lines . 0) (alpha-background) (last-focus-update) (frameset--id . "4937-7B60-73F9-945F") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 98) (width . 80) (left . 1905) (top . 25)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 1358) (total-width . 84) (total-height . 97) (normal-height . 1.0) (normal-width . 1.0) (buffer "lse-frame.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 6698) (start . 6688)) (prev-buffers ("*scratch*" 1 1))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (sticky) (background-mode . light) (visibility . t) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (tab-bar-lines . 0) (alpha-background) (last-focus-update . t) (frameset--id . "0F0D-B0BD-46F0-CD08") (frameset--mini t) (modeline . t) (unsplittable) (icon-name) (tool-bar-position . top) (height . 48) (width . 80) (left . 397) (top . 58)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer ".emacs" (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 20614) (start . 20389)) (prev-buffers ("lse-frame.el" 34641 36025))) (((minibuffer . t) (fontsize . 0) (font . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (child-frame-border-width) (vertical-scroll-bars . right) (horizontal-scroll-bars) (line-spacing) (no-special-glyphs) (undecorated) (ns-appearance) (ns-transparent-titlebar) (z-group) (no-focus-on-map) (no-accept-focus) (menu-bar-lines . 1) (tool-bar-lines . 0) (title) (icon-type) (scroll-bar-height . 15) (fullscreen) (background-mode . light) (environment) (root-p . t) (title-prefix-suffix . "-Root") (tab-bar-lines . 0) (alpha-background) (font-parameter . "-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1") (sticky) (last-focus-update) (frameset--id . "56AB-01CB-1E91-5598") (frameset--mini t . t) (modeline . t) (unsplittable) (icon-name) (visibility . icon) (tool-bar-position . top) (height . 48) (width . 80) (left . 994) (top . 60)) ((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 7) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 56) (min-pixel-width . 70) (min-pixel-height-ignore . 28) (min-pixel-width-ignore . 49) (min-pixel-height-safe . 14) (min-pixel-width-safe . 14)) leaf (pixel-width . 591) (pixel-height . 658) (total-width . 84) (total-height . 47) (normal-height . 1.0) (normal-width . 1.0) (buffer "lse-frame.el" (selected) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 3 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 11226) (start . 11222)) (prev-buffers ("*scratch*" 1 1))))])

;; Buffer section -- buffers listed in same order as in buffer list:
(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/private/tanzer/Dotfiles/.emacs"
  ".emacs"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  20614
  '(22126 nil)
  nil
  nil
  '((buffer-display-time 25852 36878 565202 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring (22212 22212 20949 21199 21365 22436 21739))))

(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/work/project/ls-emacs/ls-emacs.el"
  "ls-emacs:ls-emacs.el"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  7182
  '(nil nil)
  nil
  nil
  '((buffer-display-time 25852 36808 625167 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring nil)))

(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/work/project/ls-emacs/lse-frame.el"
  "lse-frame.el"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  6698
  '(nil nil)
  nil
  nil
  '((buffer-display-time 25852 36836 328021 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring nil)))

(desktop-create-buffer 208
  "/System/Volumes/Data/Swing/work/project/ls-emacs/lse-face.el"
  "ls-emacs:lse-face.el"
  'emacs-lisp-mode
  '(eldoc-mode auto-fill-mode global-auto-revert-mode)
  13098
  '(nil nil)
  nil
  nil
  '((buffer-display-time 25852 36807 926417 0) (buffer-file-coding-system . utf-8-unix))
  '((mark-ring nil)))


[-- Attachment #4: emacs28_problem_report_desktop_load_crash --]
[-- Type: text/plain, Size: 44876 bytes --]

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Emacs-arm64-11 [17658]
Path:                  /Applications/Emacs-28.2.app/Contents/MacOS/Emacs-arm64-11
Identifier:            Emacs-arm64-11
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        bash [4962]
Responsible:           Terminal [1508]
User ID:               1764

Date/Time:             2023-09-09 16:52:52.0976 +0100
OS Version:            macOS 13.5.2 (22G91)
Report Version:        12
Anonymous UUID:        CABD3841-01FB-3CEF-894B-8807EC1334A0

Sleep/Wake UUID:       9BEC088D-C217-46FF-9B35-9235728BC016

Time Awake Since Boot: 84000 seconds
Time Since Wake:       23609 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x7d67800192eab940 -> 0x0000000192eab940 (possible pointer authentication failure)
Exception Codes:       0x0000000000000001, 0x7d67800192eab940

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Emacs-arm64-11 [17658]

VM Region Info: 0x192eab940 is in 0x192ea1000-0x19321f000;  bytes after start: 43328  bytes before end: 3618495
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      __TEXT                      192af8000-192ea1000    [ 3748K] r-x/r-x SM=COW  ...ions/A/vImage
--->  __TEXT                      192ea1000-19321f000    [ 3576K] r-x/r-x SM=COW  .../A/QuartzCore
      __TEXT                      19321f000-193271000    [  328K] r-x/r-x SM=COW  ...egistry.dylib

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                     0x18b8a4764 __pthread_kill + 8
1   libsystem_pthread.dylib                    0x18b8dbc28 pthread_kill + 288
2   libsystem_c.dylib                          0x18b7b246c raise + 32
3   Emacs-arm64-11                             0x100f89754 terminate_due_to_signal + 204
4   Emacs-arm64-11                             0x100f89de0 emacs_abort + 20
5   Emacs-arm64-11                             0x100f5801c ns_term_shutdown + 144
6   Emacs-arm64-11                             0x100e55d84 shut_down_emacs + 328
7   Emacs-arm64-11                             0x100f8971c terminate_due_to_signal + 148
8   Emacs-arm64-11                             0x100e751a8 handle_fatal_signal + 16
9   Emacs-arm64-11                             0x100e75224 deliver_thread_signal + 124
10  Emacs-arm64-11                             0x100e73730 deliver_fatal_thread_signal + 12
11  libsystem_platform.dylib                   0x18b90aa24 _sigtramp + 56
12  ???                                 0xffff800192eab398 ???
13  QuartzCore                                 0x192eab25c CA::Layer::toggle_flipped(CA::Transaction*) + 108
14  QuartzCore                                 0x1930ec900 CA::Layer::set_bit(unsigned int, unsigned int, unsigned int, bool, void (CA::Layer::*)(CA::Transaction*)) + 288
15  CoreUI                                     0x19329547c -[CUIWindowFrameLayer init] + 60
16  QuartzCore                                 0x192ea5d18 +[CALayer layer] + 16
17  CoreUI                                     0x19329498c CUICoreThemeRenderer::MakeOrUpdateWindowFrameLayerNew(CUIDescriptor const*, CALayer**) + 76
18  CoreUI                                     0x1932942b0 CUICoreThemeRenderer::CreateOrUpdateLayer(CUIDescriptor const*, CALayer**) + 1832
19  CoreUI                                     0x193293b14 CUIRenderer::CreateOrUpdateLayer(__CFDictionary const*, CALayer**) + 260
20  AppKit                                     0x18ebe865c -[NSCompositeAppearance _callCoreUIWithBlock:options:requireBezelTintColor:] + 284
21  AppKit                                     0x18ebff2ec -[NSAppearance _createOrUpdateLayer:options:] + 100
22  AppKit                                     0x18ebfe810 -[NSThemeFrame _cuiMakeOrUpdateBackgroundLayer:topHeight:drawTopSeparator:bottomHeight:forTitlebar:] + 136
23  AppKit                                     0x18ec03bc0 -[NSThemeFrame _updateBackgroundLayer] + 140
24  AppKit                                     0x18ebcf8f8 +[NSAppearance _performWithCurrentAppearance:usingBlock:] + 72
25  AppKit                                     0x18ec03b1c __49-[NSThemeFrame addSubview:positioned:relativeTo:]_block_invoke + 132
26  AppKit                                     0x18ec0386c -[NSFocusStack performWithFocusView:inWindow:usingBlock:] + 96
27  AppKit                                     0x18ec013b0 -[NSThemeFrame addSubview:positioned:relativeTo:] + 168
28  AppKit                                     0x18ec012f0 -[NSThemeFrame _addKnownSubview:positioned:relativeTo:] + 44
29  AppKit                                     0x18ebf7658 __49-[NSThemeFrame _floatTitlebarAndToolbarFromInit:]_block_invoke + 432
30  AppKit                                     0x18ebf73c8 +[NSAnimationContext runAnimationGroup:] + 56
31  AppKit                                     0x18ebf7274 -[NSThemeFrame _floatTitlebarAndToolbarFromInit:] + 120
32  AppKit                                     0x18ebf2ce8 -[NSThemeFrame initWithFrame:styleMask:owner:] + 216
33  AppKit                                     0x18ebf0e30 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 532
34  AppKit                                     0x18ebf0888 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 684
35  AppKit                                     0x18ebf05d0 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48
36  AppKit                                     0x18ee4fccc -[NSWindow initWithContentRect:styleMask:backing:defer:screen:] + 24
37  Emacs-arm64-11                             0x100f60328 -[EmacsWindow initWithEmacsFrame:fullscreen:screen:] + 276
38  Emacs-arm64-11                             0x100f5dac8 -[EmacsView initFrameFromEmacs:] + 464
39  Emacs-arm64-11                             0x100f6b7ec Fx_create_frame + 3324
40  Emacs-arm64-11                             0x100eda0f4 funcall_subr + 264
41  Emacs-arm64-11                             0x100ed96c8 Ffuncall + 752
42  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
43  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
44  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
45  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
46  Emacs-arm64-11                             0x100ed96c8 Ffuncall + 752
47  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
48  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
49  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
50  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
51  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
52  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
53  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
54  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
55  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
56  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
57  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
58  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
59  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
60  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
61  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
62  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
63  Emacs-arm64-11                             0x100ed9804 Frun_hook_with_args + 152
64  Emacs-arm64-11                             0x100ed9728 Frun_hooks + 52
65  Emacs-arm64-11                             0x100ed96c8 Ffuncall + 752
66  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
67  Emacs-arm64-11                             0x100ed9640 Ffuncall + 616
68  Emacs-arm64-11                             0x100f1aaa0 exec_byte_code + 1952
69  Emacs-arm64-11                             0x100ed8f70 apply_lambda + 360
70  Emacs-arm64-11                             0x100ed4f50 eval_sub + 880
71  Emacs-arm64-11                             0x100ed8cd0 Feval + 108
72  Emacs-arm64-11                             0x100ed7800 internal_condition_case + 264
73  Emacs-arm64-11                             0x100e691e4 top_level_1 + 48
74  Emacs-arm64-11                             0x100ed6dd4 internal_catch + 264
75  Emacs-arm64-11                             0x100f89a54 recursive_edit_1.cold.1 + 64
76  Emacs-arm64-11                             0x100e58b90 recursive_edit_1 + 268
77  Emacs-arm64-11                             0x100e58d38 Frecursive_edit + 388
78  Emacs-arm64-11                             0x100e58124 main + 9036
79  dyld                                       0x18b583f28 start + 2236

Thread 1:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 5:
0   libsystem_kernel.dylib                     0x18b8a7030 __select + 8
1   Emacs-arm64-11                             0x100f5939c -[EmacsApp fd_handler:] + 244
2   Foundation                                 0x18c92b53c __NSThread__start__ + 716
3   libsystem_pthread.dylib                    0x18b8dbfa8 _pthread_start + 148
4   libsystem_pthread.dylib                    0x18b8d6da0 thread_start + 8

Thread 6:: com.apple.NSEventThread
0   libsystem_kernel.dylib                     0x18b89bf54 mach_msg2_trap + 8
1   libsystem_kernel.dylib                     0x18b8ae280 mach_msg2_internal + 80
2   libsystem_kernel.dylib                     0x18b8a4bb8 mach_msg_overwrite + 604
3   libsystem_kernel.dylib                     0x18b89c2d0 mach_msg + 24
4   CoreFoundation                             0x18b9ba7e4 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                             0x18b9b90c4 __CFRunLoopRun + 1208
6   CoreFoundation                             0x18b9b84b8 CFRunLoopRunSpecific + 612
7   AppKit                                     0x18ed09f54 _NSEventThread + 172
8   libsystem_pthread.dylib                    0x18b8dbfa8 _pthread_start + 148
9   libsystem_pthread.dylib                    0x18b8d6da0 thread_start + 8

Thread 7:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 10:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0

Thread 11:
0   libsystem_pthread.dylib                    0x18b8d6d8c start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00006000024c1bc0   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x4f900b6d13925bb7   x9: 0x4f900b6cf507bb37  x10: 0x0000000000000001  x11: 0x00000000000007fb
   x12: 0x00000000c8a907fb  x13: 0x00000000000007fd  x14: 0x00000000c8c908df  x15: 0x00000000c8a907fb
   x16: 0x0000000000000148  x17: 0x00000001eb4833a0  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001e695e080  x21: 0x0000000000000103  x22: 0x00000001e695e160  x23: 0x00006000000005a0
   x24: 0x0000000000000000  x25: 0x0000000107d12c58  x26: 0x0000000000400000  x27: 0x00000001e4178000
   x28: 0x00000001e4178000   fp: 0x000000016f05b1c0   lr: 0x000000018b8dbc28
    sp: 0x000000016f05b1a0   pc: 0x000000018b8a4764 cpsr: 0x40001000
   far: 0x7d67800192eab940  esr: 0x56000080  Address size fault

Binary Images:
       0x100da0000 -        0x100fcbfff Emacs-arm64-11 (*) <80137eff-3551-35df-a76a-e0ee2108906c> /Applications/Emacs-28.2.app/Contents/MacOS/Emacs-arm64-11
       0x101754000 -        0x1018a7fff libgnutls.30.dylib (*) <65edcf7b-929d-375f-a526-09912675bfe7> /Applications/Emacs-28.2.app/Contents/MacOS/lib-arm64-11/libgnutls.30.dylib
       0x101584000 -        0x10158ffff libjansson.4.dylib (*) <18be0886-ee42-3d52-9c34-e7bee5397ec3> /Applications/Emacs-28.2.app/Contents/MacOS/lib-arm64-11/libjansson.4.dylib
       0x10161c000 -        0x101677fff libgmp.10.dylib (*) <30f901d6-8f8e-3f0e-b864-1b4cf8668b32> /Applications/Emacs-28.2.app/Contents/MacOS/lib-arm64-11/libgmp.10.dylib
       0x1015a4000 -        0x1015affff libintl.8.dylib (*) <233c4c12-e3d0-37f5-ae58-af0d2ba9e127> /Applications/Emacs-28.2.app/Contents/MacOS/lib-arm64-11/libintl.8.dylib
       0x101944000 -        0x101977fff libnettle.8.dylib (*) <b2d53a81-fc41-3e42-93e4-d676717034ad> /Applications/Emacs-28.2.app/Contents/MacOS/lib-arm64-11/libnettle.8.dylib
       0x1016f0000 -        0x101727fff libhogweed.6.dylib (*) <a68a51bf-72a1-34b0-883d-3a56c41eb07f> /Applications/Emacs-28.2.app/Contents/MacOS/lib-arm64-11/libhogweed.6.dylib
       0x107bc4000 -        0x107bcffff libobjc-trampolines.dylib (*) <8e928412-9e96-32d4-b173-d99beb9fed0b> /usr/lib/libobjc-trampolines.dylib
       0x110694000 -        0x11069bfff com.apple.CloudDocsFileProvider (1.0) <d26653d7-1d6c-3050-8aa2-396c6a9c3e0f> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/CloudDocsFileProvider.bundle/Contents/MacOS/CloudDocsFileProvider
       0x1106ac000 -        0x1106b3fff com.apple.FileProviderOverride (855.140.6) <e2c50aa6-091b-38f3-8180-aad8381e3887> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/FileProviderOverride.bundle/Contents/MacOS/FileProviderOverride
       0x117f74000 -        0x117f93fff com.apple.findersync.fileprovideroverride.FinderSyncCollaborationFileProviderOverride (13.5) <3eeb03ea-b41e-3526-baf4-bb8c1dde7973> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride
       0x18b89b000 -        0x18b8d4ff7 libsystem_kernel.dylib (*) <08c5fe2a-b0bf-3ab6-bb42-460c18917d33> /usr/lib/system/libsystem_kernel.dylib
       0x18b8d5000 -        0x18b8e1fff libsystem_pthread.dylib (*) <1f30fb9a-bdf9-32db-a709-8417666a7e45> /usr/lib/system/libsystem_pthread.dylib
       0x18b773000 -        0x18b7f1ff7 libsystem_c.dylib (*) <949943e2-52cb-3c95-ab08-7ed984333d03> /usr/lib/system/libsystem_c.dylib
       0x18b907000 -        0x18b90dffb libsystem_platform.dylib (*) <6d458354-3c39-3f35-a3bb-d01a78817b4a> /usr/lib/system/libsystem_platform.dylib
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x192ea1000 -        0x19321efff com.apple.QuartzCore (1.11) <e5f1c0e3-63e6-335d-8d67-d395562e9778> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
       0x193271000 -        0x1933b6fff com.apple.coreui (2.1) <c5339b73-e461-34db-8fdc-8faffd45a22c> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
       0x18eba6000 -        0x18fab5fff com.apple.AppKit (6.9) <55f7d958-6ed1-3c36-a70e-94d7ffc18d5a> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x18b57e000 -        0x18b60c587 dyld (*) <e7a99595-e0f8-34af-be8b-9347d0d658a4> /usr/lib/dyld
       0x18c8d5000 -        0x18d29afff com.apple.Foundation (6.9) <b7799cb6-0a3c-3c8b-a185-8cec55845b14> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x18b93b000 -        0x18be14fff com.apple.CoreFoundation (6.9) <b3b2df49-2db8-370e-84ae-e0a2704515b8> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)

                                VIRTUAL   REGION
REGION TYPE                        SIZE    COUNT (non-coalesced)
===========                     =======  =======
Accelerate framework               128K        1
Activity Tracing                   256K        1
CG backing stores                 3840K        4
CG image                           480K        9
ColorSync                          560K       28
CoreAnimation                     2320K       40
CoreGraphics                        32K        2
CoreGraphics (reserved)             32K        2         reserved VM address space (unallocated)
CoreImage                           96K        6
CoreUI image data                 1552K       11
Foundation                          16K        1
Kernel Alloc Once                   32K        1
MALLOC                           263.3M       68
MALLOC guard page                  192K        8
MALLOC_MEDIUM (reserved)         720.0M        6         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       54.6M       12
Stack                             15.4M       13
VM_ALLOCATE                        304K       18
__AUTH                             872K      221
__AUTH_CONST                      15.9M      398
__CTF                               824        1
__DATA                            7918K      394
__DATA_CONST                      19.0M      411
__DATA_DIRTY                      1070K      132
__FONT_DATA                        2352        1
__LINKEDIT                       804.5M       12
__OBJC_RO                         66.4M        1
__OBJC_RW                         2012K        1
__TEXT                           312.9M      427
dyld private memory                272K        2
mapped file                      201.2M       39
shared memory                      960K       20
===========                     =======  =======
TOTAL                              2.8G     2292
TOTAL, minus reserved VM space     1.7G     2292



-----------
Full Report
-----------

{"app_name":"Emacs-arm64-11","timestamp":"2023-09-09 16:52:52.00 +0100","app_version":"","slice_uuid":"80137eff-3551-35df-a76a-e0ee2108906c","build_version":"","platform":1,"share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.5.2 (22G91)","roots_installed":0,"incident_id":"A313E1AC-3CC7-4860-B27C-84D85BF5893E","name":"Emacs-arm64-11"}
{
  "uptime" : 84000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 1764,
  "deployVersion" : 210,
  "modelCode" : "MacBookAir10,1",
  "coalitionID" : 937,
  "osVersion" : {
    "train" : "macOS 13.5.2",
    "build" : "22G91",
    "releaseType" : "User"
  },
  "captureTime" : "2023-09-09 16:52:52.0976 +0100",
  "incident" : "A313E1AC-3CC7-4860-B27C-84D85BF5893E",
  "pid" : 17658,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-09-09 16:52:50.4577 +0100",
  "procStartAbsTime" : 2024705525670,
  "procExitAbsTime" : 2024744704651,
  "procName" : "Emacs-arm64-11",
  "procPath" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/Emacs-arm64-11",
  "parentProc" : "bash",
  "parentPid" : 4962,
  "coalitionName" : "com.apple.Terminal",
  "crashReporterKey" : "CABD3841-01FB-3CEF-894B-8807EC1334A0",
  "responsiblePid" : 1508,
  "responsibleProc" : "Terminal",
  "codeSigningID" : "Emacs-arm64-11",
  "codeSigningTeamID" : "5BRAQAFB8B",
  "codeSigningFlags" : 570495745,
  "codeSigningValidationCategory" : 6,
  "codeSigningTrustLevel" : 0,
  "wakeTime" : 23609,
  "sleepWakeUUID" : "9BEC088D-C217-46FF-9B35-9235728BC016",
  "sip" : "enabled",
  "vmRegionInfo" : "0x192eab940 is in 0x192ea1000-0x19321f000;  bytes after start: 43328  bytes before end: 3618495\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      __TEXT                      192af8000-192ea1000    [ 3748K] r-x\/r-x SM=COW  ...ions\/A\/vImage\n--->  __TEXT                      192ea1000-19321f000    [ 3576K] r-x\/r-x SM=COW  ...\/A\/QuartzCore\n      __TEXT                      19321f000-193271000    [  328K] r-x\/r-x SM=COW  ...egistry.dylib",
  "exception" : {"codes":"0x0000000000000001, 0x7d67800192eab940","rawCodes":[1,9036331921590368576],"type":"EXC_BAD_ACCESS","signal":"SIGABRT","subtype":"KERN_INVALID_ADDRESS at 0x7d67800192eab940 -> 0x0000000192eab940 (possible pointer authentication failure)"},
  "termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"Emacs-arm64-11","byPid":17658},
  "vmregioninfo" : "0x192eab940 is in 0x192ea1000-0x19321f000;  bytes after start: 43328  bytes before end: 3618495\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      __TEXT                      192af8000-192ea1000    [ 3748K] r-x\/r-x SM=COW  ...ions\/A\/vImage\n--->  __TEXT                      192ea1000-19321f000    [ 3576K] r-x\/r-x SM=COW  ...\/A\/QuartzCore\n      __TEXT                      19321f000-193271000    [  328K] r-x\/r-x SM=COW  ...egistry.dylib",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":519286,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":105553154808768},{"value":0},{"value":0},{"value":0},{"value":5733094888750341047},{"value":5733094888237939511},{"value":1},{"value":2043},{"value":3366520827},{"value":2045},{"value":3368618207},{"value":3366520827},{"value":328},{"value":8242344864},{"value":0},{"value":6},{"value":8163549312,"symbolLocation":0,"symbol":"_main_thread"},{"value":259},{"value":8163549536,"symbolLocation":224,"symbol":"_main_thread"},{"value":105553116267936},{"value":0},{"value":4426116184},{"value":4194304},{"value":8121712640},{"value":8121712640}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6636289064},"cpsr":{"value":1073745920},"fp":{"value":6157611456},"sp":{"value":6157611424},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6636062564,"matchesCrashFrame":1},"far":{"value":9036331921590368576}},"queue":"com.apple.main-thread","frames":[{"imageOffset":38756,"symbol":"__pthread_kill","symbolLocation":8,"imageIndex":11},{"imageOffset":27688,"symbol":"pthread_kill","symbolLocation":288,"imageIndex":12},{"imageOffset":259180,"symbol":"raise","symbolLocation":32,"imageIndex":13},{"imageOffset":2004820,"symbol":"terminate_due_to_signal","symbolLocation":204,"imageIndex":0},{"imageOffset":2006496,"symbol":"emacs_abort","symbolLocation":20,"imageIndex":0},{"imageOffset":1802268,"symbol":"ns_term_shutdown","symbolLocation":144,"imageIndex":0},{"imageOffset":744836,"symbol":"shut_down_emacs","symbolLocation":328,"imageIndex":0},{"imageOffset":2004764,"symbol":"terminate_due_to_signal","symbolLocation":148,"imageIndex":0},{"imageOffset":872872,"symbol":"handle_fatal_signal","symbolLocation":16,"imageIndex":0},{"imageOffset":872996,"symbol":"deliver_thread_signal","symbolLocation":124,"imageIndex":0},{"imageOffset":866096,"symbol":"deliver_fatal_thread_signal","symbolLocation":12,"imageIndex":0},{"imageOffset":14884,"symbol":"_sigtramp","symbolLocation":56,"imageIndex":14},{"imageOffset":18446603342981018520,"imageIndex":15},{"imageOffset":41564,"symbol":"CA::Layer::toggle_flipped(CA::Transaction*)","symbolLocation":108,"imageIndex":16},{"imageOffset":2406656,"symbol":"CA::Layer::set_bit(unsigned int, unsigned int, unsigned int, bool, void (CA::Layer::*)(CA::Transaction*))","symbolLocation":288,"imageIndex":16},{"imageOffset":148604,"symbol":"-[CUIWindowFrameLayer init]","symbolLocation":60,"imageIndex":17},{"imageOffset":19736,"symbol":"+[CALayer layer]","symbolLocation":16,"imageIndex":16},{"imageOffset":145804,"symbol":"CUICoreThemeRenderer::MakeOrUpdateWindowFrameLayerNew(CUIDescriptor const*, CALayer**)","symbolLocation":76,"imageIndex":17},{"imageOffset":144048,"symbol":"CUICoreThemeRenderer::CreateOrUpdateLayer(CUIDescriptor const*, CALayer**)","symbolLocation":1832,"imageIndex":17},{"imageOffset":142100,"symbol":"CUIRenderer::CreateOrUpdateLayer(__CFDictionary const*, CALayer**)","symbolLocation":260,"imageIndex":17},{"imageOffset":271964,"symbol":"-[NSCompositeAppearance _callCoreUIWithBlock:options:requireBezelTintColor:]","symbolLocation":284,"imageIndex":18},{"imageOffset":365292,"symbol":"-[NSAppearance _createOrUpdateLayer:options:]","symbolLocation":100,"imageIndex":18},{"imageOffset":362512,"symbol":"-[NSThemeFrame _cuiMakeOrUpdateBackgroundLayer:topHeight:drawTopSeparator:bottomHeight:forTitlebar:]","symbolLocation":136,"imageIndex":18},{"imageOffset":383936,"symbol":"-[NSThemeFrame _updateBackgroundLayer]","symbolLocation":140,"imageIndex":18},{"imageOffset":170232,"symbol":"+[NSAppearance _performWithCurrentAppearance:usingBlock:]","symbolLocation":72,"imageIndex":18},{"imageOffset":383772,"symbol":"__49-[NSThemeFrame addSubview:positioned:relativeTo:]_block_invoke","symbolLocation":132,"imageIndex":18},{"imageOffset":383084,"symbol":"-[NSFocusStack performWithFocusView:inWindow:usingBlock:]","symbolLocation":96,"imageIndex":18},{"imageOffset":373680,"symbol":"-[NSThemeFrame addSubview:positioned:relativeTo:]","symbolLocation":168,"imageIndex":18},{"imageOffset":373488,"symbol":"-[NSThemeFrame _addKnownSubview:positioned:relativeTo:]","symbolLocation":44,"imageIndex":18},{"imageOffset":333400,"symbol":"__49-[NSThemeFrame _floatTitlebarAndToolbarFromInit:]_block_invoke","symbolLocation":432,"imageIndex":18},{"imageOffset":332744,"symbol":"+[NSAnimationContext runAnimationGroup:]","symbolLocation":56,"imageIndex":18},{"imageOffset":332404,"symbol":"-[NSThemeFrame _floatTitlebarAndToolbarFromInit:]","symbolLocation":120,"imageIndex":18},{"imageOffset":314600,"symbol":"-[NSThemeFrame initWithFrame:styleMask:owner:]","symbolLocation":216,"imageIndex":18},{"imageOffset":306736,"symbol":"-[NSWindow _commonInitFrame:styleMask:backing:defer:]","symbolLocation":532,"imageIndex":18},{"imageOffset":305288,"symbol":"-[NSWindow _initContent:styleMask:backing:defer:contentView:]","symbolLocation":684,"imageIndex":18},{"imageOffset":304592,"symbol":"-[NSWindow initWithContentRect:styleMask:backing:defer:]","symbolLocation":48,"imageIndex":18},{"imageOffset":2792652,"symbol":"-[NSWindow initWithContentRect:styleMask:backing:defer:screen:]","symbolLocation":24,"imageIndex":18},{"imageOffset":1835816,"symbol":"-[EmacsWindow initWithEmacsFrame:fullscreen:screen:]","symbolLocation":276,"imageIndex":0},{"imageOffset":1825480,"symbol":"-[EmacsView initFrameFromEmacs:]","symbolLocation":464,"imageIndex":0},{"imageOffset":1882092,"symbol":"Fx_create_frame","symbolLocation":3324,"imageIndex":0},{"imageOffset":1286388,"symbol":"funcall_subr","symbolLocation":264,"imageIndex":0},{"imageOffset":1283784,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1283784,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1284100,"symbol":"Frun_hook_with_args","symbolLocation":152,"imageIndex":0},{"imageOffset":1283880,"symbol":"Frun_hooks","symbolLocation":52,"imageIndex":0},{"imageOffset":1283784,"symbol":"Ffuncall","symbolLocation":752,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1283648,"symbol":"Ffuncall","symbolLocation":616,"imageIndex":0},{"imageOffset":1551008,"symbol":"exec_byte_code","symbolLocation":1952,"imageIndex":0},{"imageOffset":1281904,"symbol":"apply_lambda","symbolLocation":360,"imageIndex":0},{"imageOffset":1265488,"symbol":"eval_sub","symbolLocation":880,"imageIndex":0},{"imageOffset":1281232,"symbol":"Feval","symbolLocation":108,"imageIndex":0},{"imageOffset":1275904,"symbol":"internal_condition_case","symbolLocation":264,"imageIndex":0},{"imageOffset":823780,"symbol":"top_level_1","symbolLocation":48,"imageIndex":0},{"imageOffset":1273300,"symbol":"internal_catch","symbolLocation":264,"imageIndex":0},{"imageOffset":2005588,"symbol":"recursive_edit_1.cold.1","symbolLocation":64,"imageIndex":0},{"imageOffset":756624,"symbol":"recursive_edit_1","symbolLocation":268,"imageIndex":0},{"imageOffset":757048,"symbol":"Frecursive_edit","symbolLocation":388,"imageIndex":0},{"imageOffset":753956,"symbol":"main","symbolLocation":9036,"imageIndex":0},{"imageOffset":24360,"symbol":"start","symbolLocation":2236,"imageIndex":19}]},{"id":519287,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519288,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519292,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519294,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519301,"frames":[{"imageOffset":49200,"symbol":"__select","symbolLocation":8,"imageIndex":11},{"imageOffset":1807260,"symbol":"-[EmacsApp fd_handler:]","symbolLocation":244,"imageIndex":0},{"imageOffset":353596,"symbol":"__NSThread__start__","symbolLocation":716,"imageIndex":20},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":12},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":12}]},{"id":519308,"name":"com.apple.NSEventThread","frames":[{"imageOffset":3924,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":11},{"imageOffset":78464,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":11},{"imageOffset":39864,"symbol":"mach_msg_overwrite","symbolLocation":604,"imageIndex":11},{"imageOffset":4816,"symbol":"mach_msg","symbolLocation":24,"imageIndex":11},{"imageOffset":522212,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":21},{"imageOffset":516292,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":21},{"imageOffset":513208,"symbol":"CFRunLoopRunSpecific","symbolLocation":612,"imageIndex":21},{"imageOffset":1458004,"symbol":"_NSEventThread","symbolLocation":172,"imageIndex":18},{"imageOffset":28584,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":12},{"imageOffset":7584,"symbol":"thread_start","symbolLocation":8,"imageIndex":12}]},{"id":519309,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519310,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519311,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519314,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]},{"id":519403,"frames":[{"imageOffset":7564,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4309254144,
    "size" : 2277376,
    "uuid" : "80137eff-3551-35df-a76a-e0ee2108906c",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/Emacs-arm64-11",
    "name" : "Emacs-arm64-11"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4319428608,
    "size" : 1392640,
    "uuid" : "65edcf7b-929d-375f-a526-09912675bfe7",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/lib-arm64-11\/libgnutls.30.dylib",
    "name" : "libgnutls.30.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4317528064,
    "size" : 49152,
    "uuid" : "18be0886-ee42-3d52-9c34-e7bee5397ec3",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/lib-arm64-11\/libjansson.4.dylib",
    "name" : "libjansson.4.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4318150656,
    "size" : 376832,
    "uuid" : "30f901d6-8f8e-3f0e-b864-1b4cf8668b32",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/lib-arm64-11\/libgmp.10.dylib",
    "name" : "libgmp.10.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4317659136,
    "size" : 49152,
    "uuid" : "233c4c12-e3d0-37f5-ae58-af0d2ba9e127",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/lib-arm64-11\/libintl.8.dylib",
    "name" : "libintl.8.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4321460224,
    "size" : 212992,
    "uuid" : "b2d53a81-fc41-3e42-93e4-d676717034ad",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/lib-arm64-11\/libnettle.8.dylib",
    "name" : "libnettle.8.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4319019008,
    "size" : 229376,
    "uuid" : "a68a51bf-72a1-34b0-883d-3a56c41eb07f",
    "path" : "\/Applications\/Emacs-28.2.app\/Contents\/MacOS\/lib-arm64-11\/libhogweed.6.dylib",
    "name" : "libhogweed.6.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4424744960,
    "size" : 49152,
    "uuid" : "8e928412-9e96-32d4-b173-d99beb9fed0b",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4570300416,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.CloudDocsFileProvider",
    "size" : 32768,
    "uuid" : "d26653d7-1d6c-3050-8aa2-396c6a9c3e0f",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/CloudDocsFileProvider.bundle\/Contents\/MacOS\/CloudDocsFileProvider",
    "name" : "CloudDocsFileProvider",
    "CFBundleVersion" : "1553.141.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4570398720,
    "CFBundleShortVersionString" : "855.140.6",
    "CFBundleIdentifier" : "com.apple.FileProviderOverride",
    "size" : 32768,
    "uuid" : "e2c50aa6-091b-38f3-8180-aad8381e3887",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/FileProviderOverride.bundle\/Contents\/MacOS\/FileProviderOverride",
    "name" : "FileProviderOverride",
    "CFBundleVersion" : "855.140.6"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4697047040,
    "CFBundleShortVersionString" : "13.5",
    "CFBundleIdentifier" : "com.apple.findersync.fileprovideroverride.FinderSyncCollaborationFileProviderOverride",
    "size" : 131072,
    "uuid" : "3eeb03ea-b41e-3526-baf4-bb8c1dde7973",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/FinderSyncCollaborationFileProviderOverride.bundle\/Contents\/MacOS\/FinderSyncCollaborationFileProviderOverride",
    "name" : "FinderSyncCollaborationFileProviderOverride",
    "CFBundleVersion" : "1564.7.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6636023808,
    "size" : 237560,
    "uuid" : "08c5fe2a-b0bf-3ab6-bb42-460c18917d33",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6636261376,
    "size" : 53248,
    "uuid" : "1f30fb9a-bdf9-32db-a709-8417666a7e45",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6634811392,
    "size" : 520184,
    "uuid" : "949943e2-52cb-3c95-ab08-7ed984333d03",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6636466176,
    "size" : 28668,
    "uuid" : "6d458354-3c39-3f35-a3bb-d01a78817b4a",
    "path" : "\/usr\/lib\/system\/libsystem_platform.dylib",
    "name" : "libsystem_platform.dylib"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6759780352,
    "CFBundleShortVersionString" : "1.11",
    "CFBundleIdentifier" : "com.apple.QuartzCore",
    "size" : 3661824,
    "uuid" : "e5f1c0e3-63e6-335d-8d67-d395562e9778",
    "path" : "\/System\/Library\/Frameworks\/QuartzCore.framework\/Versions\/A\/QuartzCore",
    "name" : "QuartzCore",
    "CFBundleVersion" : "1045.20"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6763778048,
    "CFBundleShortVersionString" : "2.1",
    "CFBundleIdentifier" : "com.apple.coreui",
    "size" : 1335296,
    "uuid" : "c5339b73-e461-34db-8fdc-8faffd45a22c",
    "path" : "\/System\/Library\/PrivateFrameworks\/CoreUI.framework\/Versions\/A\/CoreUI",
    "name" : "CoreUI",
    "CFBundleVersion" : "805"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6689546240,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15794176,
    "uuid" : "55f7d958-6ed1-3c36-a70e-94d7ffc18d5a",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2299.70.136"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6632759296,
    "size" : 583048,
    "uuid" : "e7a99595-e0f8-34af-be8b-9347d0d658a4",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6653038592,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 10248192,
    "uuid" : "b7799cb6-0a3c-3c8b-a185-8cec55845b14",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1979"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6636679168,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5087232,
    "uuid" : "b3b2df49-2db8-370e-84ae-e0a2704515b8",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1979"
  }
],
  "sharedCache" : {
  "base" : 6632095744,
  "size" : 3553361920,
  "uuid" : "40eab1ab-8b22-3dec-aa46-bb3136a05069"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               128K        1 \nActivity Tracing                   256K        1 \nCG backing stores                 3840K        4 \nCG image                           480K        9 \nColorSync                          560K       28 \nCoreAnimation                     2320K       40 \nCoreGraphics                        32K        2 \nCoreGraphics (reserved)             32K        2         reserved VM address space (unallocated)\nCoreImage                           96K        6 \nCoreUI image data                 1552K       11 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           263.3M       68 \nMALLOC guard page                  192K        8 \nMALLOC_MEDIUM (reserved)         720.0M        6         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       54.6M       12 \nStack                             15.4M       13 \nVM_ALLOCATE                        304K       18 \n__AUTH                             872K      221 \n__AUTH_CONST                      15.9M      398 \n__CTF                               824        1 \n__DATA                            7918K      394 \n__DATA_CONST                      19.0M      411 \n__DATA_DIRTY                      1070K      132 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       804.5M       12 \n__OBJC_RO                         66.4M        1 \n__OBJC_RW                         2012K        1 \n__TEXT                           312.9M      427 \ndyld private memory                272K        2 \nmapped file                      201.2M       39 \nshared memory                      960K       20 \n===========                     =======  ======= \nTOTAL                              2.8G     2292 \nTOTAL, minus reserved VM space     1.7G     2292 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "b2aa6811692c3c6fa383544536bacb0461e7783c",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "5fb4245a1bbfe8005e33a1e1",
      "factorPackIds" : {

      },
      "deploymentId" : 240000021
    },
    {
      "rolloutId" : "63582c5f8a53461413999550",
      "factorPackIds" : {

      },
      "deploymentId" : 240000002
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "6dd670af-0633-45e4-ae5f-122ae4df02be",
      "experimentId" : "64406ba83deb637ac8a04419",
      "deploymentId" : 900000017
    },
    {
      "treatmentId" : "a092db1b-c401-44fa-9c54-518b7d69ca61",
      "experimentId" : "64a844035c85000c0f42398a",
      "deploymentId" : 400000004
    }
  ]
}
}

Model: MacBookAir10,1, BootROM 8422.141.2, proc 8:4:4 processors, 8 GB, SMC
Graphics: Apple M1, Apple M1, Built-In
Display: Studio Display, 5120 x 2880 Retina, Main, MirrorOff, Online
Memory Module: LPDDR4, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4378), wl0: May 13 2023 07:20:48 version 18.20.383.15.7.8.150 FWID 01-b37727a5
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Network Service: Studio Display, Ethernet, en5
Network Service: USB 10/100/1000 LAN, Ethernet, en7
Network Service: cs1-psk-peer, VPN (com.wireguard.macos), utun3
PCI Card: pci144d,a808, NVM Express Controller, Thunderbolt@3,0,0
PCI Card: pci8086,15f0, USB eXtensible Host Controller, Thunderbolt@45,0,0
USB Device: USB31Bus
USB Device: USB3.0 Hub
USB Device: USB2.0 Hub
USB Device: Thunderbolt Hub
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB3 Gen2 Hub
USB Device: USB 10/100/1000 LAN
USB Device: USB2 Hub
USB Device: Studio Display
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Device: Envoy Express, Other World Computing, 1, 21.1
Thunderbolt Bus: MacBook Air, Apple Inc.
Thunderbolt Device: Thunderbolt Hub, Other World Computing, 1, 36.3

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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-09 16:35 bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS) Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-09 16:49 ` Eli Zaretskii
  2023-09-09 17:36   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-09 19:53 ` Alan Third
  1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2023-09-09 16:49 UTC (permalink / raw)
  To: tanzer; +Cc: 65843

> Date: Sat, 09 Sep 2023 16:35:56 -0000
> From:  Christian Tanzer via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> In Emacs 28 and Emacs 29, desktop-load crashes when there are too many
> iconified frames in the .emacs.desktop file.
> 
> The two attached .emacs.desktop files show the smallest test case that
> I could come up with:
> 
> - .emacs.desktop.works with 3 non-iconified and 4 iconified frames
>   loads without problem in Emacs 28
> 
>   + desktop-load of this file crashes in Emacs 29.1
> 
>   + a .emacs.desktop with 3 non-iconified and 3 iconified frames works
>     in Emacs 29.1
> 
> - .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames
>   leads to a crash in Emacs 28 (see attached problem report generated
>   by macOS)
> 
> - I tried .emacs.desktop with up to 17 non-iconified frames in Emacs
>   28 without problems
> 
> - Up to Emacs 27, I've never seen a problem with desktop-load crashing

Thanks, can you run Emacs 29 under a debugger and show a backtrace
when it crashes?





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-09 16:49 ` Eli Zaretskii
@ 2023-09-09 17:36   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-09 17:39     ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-09 17:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65843

On 09.09.2023, at 17:49, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> 
>> 
>> Date: Sat, 09 Sep 2023 16:35:56 -0000
>> From:  Christian Tanzer via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> In Emacs 28 and Emacs 29, desktop-load crashes when there are too many
>> iconified frames in the .emacs.desktop file.
>> 
>> The two attached .emacs.desktop files show the smallest test case that
>> I could come up with:
>> 
>> - .emacs.desktop.works with 3 non-iconified and 4 iconified frames
>>  loads without problem in Emacs 28
>> 
>>  + desktop-load of this file crashes in Emacs 29.1
>> 
>>  + a .emacs.desktop with 3 non-iconified and 3 iconified frames works
>>    in Emacs 29.1
>> 
>> - .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames
>>  leads to a crash in Emacs 28 (see attached problem report generated
>>  by macOS)
>> 
>> - I tried .emacs.desktop with up to 17 non-iconified frames in Emacs
>>  28 without problems
>> 
>> - Up to Emacs 27, I've never seen a problem with desktop-load crashing
> 
> Thanks, can you run Emacs 29 under a debugger and show a backtrace
> when it crashes?

Unfortunately, I don’t have a C development environment setup on my little MacBook (and haven’t used gdb for more than 20 years besides).





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-09 17:36   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-09 17:39     ` Eli Zaretskii
  2023-09-10 14:11       ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2023-09-09 17:39 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: 65843

> From: Christian Tanzer <tanzer@gg32.com>
> Date: Sat, 9 Sep 2023 18:36:07 +0100
> Cc: 65843@debbugs.gnu.org
> 
> On 09.09.2023, at 17:49, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > Thanks, can you run Emacs 29 under a debugger and show a backtrace
> > when it crashes?
> 
> Unfortunately, I don’t have a C development environment setup on my little MacBook (and haven’t used gdb for more than 20 years besides).

Backtrace from LLDB will be also helpful.  Without a crash backtrace,
we will have to wait until someone can reproduce the crashes on a
system where a debugger _is_ available.





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-09 16:35 bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS) Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-09 16:49 ` Eli Zaretskii
@ 2023-09-09 19:53 ` Alan Third
  2023-09-10  4:20   ` Gerd Möllmann
  1 sibling, 1 reply; 27+ messages in thread
From: Alan Third @ 2023-09-09 19:53 UTC (permalink / raw)
  To: tanzer; +Cc: 65843

[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]

On Sat, Sep 09, 2023 at 04:35:56PM -0000, Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
> 
> =============================================================================
> In Emacs 28 and Emacs 29, desktop-load crashes when there are too many
> iconified frames in the .emacs.desktop file.
> 
> The two attached .emacs.desktop files show the smallest test case that
> I could come up with:
> 
> - .emacs.desktop.works with 3 non-iconified and 4 iconified frames
>   loads without problem in Emacs 28
> 
>   + desktop-load of this file crashes in Emacs 29.1
> 
>   + a .emacs.desktop with 3 non-iconified and 3 iconified frames works
>     in Emacs 29.1
> 
> - .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames
>   leads to a crash in Emacs 28 (see attached problem report generated
>   by macOS)
> 
> - I tried .emacs.desktop with up to 17 non-iconified frames in Emacs
>   28 without problems
> 
> - Up to Emacs 27, I've never seen a problem with desktop-load crashing
> =============================================================================

Can you please try the master branch with the two attached patches
applied? The v2 patch should be applied first.

The apple crash report is enough to see that the crash is happening
somewhere deep inside the AppKit code on frame creation. No idea why,
but maybe we'll be lucky and the fix will be the same as the last
frame-creation crash fix...
-- 
Alan Third

[-- Attachment #2: v2-0001-Simplify-the-EmacsLayer-double-buffering-code-bug.patch --]
[-- Type: text/x-diff, Size: 8169 bytes --]

From 72b13fa67981c40f0e3c63092aa796525fe61344 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Sun, 23 Jul 2023 12:00:30 +0100
Subject: [PATCH v2] Simplify the EmacsLayer double buffering code (bug#63187)

---
 src/nsfns.m  | 30 +++++++++++++++++++++++++++++-
 src/nsterm.h | 13 ++++++++++++-
 src/nsterm.m | 50 ++++++++++++++++++++++++++------------------------
 3 files changed, 67 insertions(+), 26 deletions(-)

diff --git a/src/nsfns.m b/src/nsfns.m
index a79892f73b6..082e06698b2 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -799,6 +799,26 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
     }
 }
 
+static void
+ns_set_inhibit_double_buffering (struct frame *f,
+                                 Lisp_Object new_value,
+                                 Lisp_Object old_value)
+{
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+  if (!EQ (new_value, old_value))
+    {
+      FRAME_DOUBLE_BUFFERED (f) = NILP (new_value);
+
+      /* If the view or layer haven't been created yet this will be a
+         noop.  */
+      [(EmacsLayer *)[FRAME_NS_VIEW (f) layer]
+          setDoubleBuffered:FRAME_DOUBLE_BUFFERED (f)];
+
+      SET_FRAME_GARBAGED (f);
+    }
+#endif
+}
+
 static void
 ns_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
@@ -1073,7 +1093,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
   gui_set_alpha,
   0, /* x_set_sticky */
   ns_set_tool_bar_position,
-  0, /* x_set_inhibit_double_buffering */
+  ns_set_inhibit_double_buffering,
   ns_set_undecorated,
   ns_set_parent_frame,
   0, /* x_set_skip_taskbar */
@@ -1461,6 +1481,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
   gui_default_parameter (f, parms, Qtitle, Qnil, "title", "Title",
                          RES_TYPE_STRING);
 
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+  tem = gui_display_get_arg (dpyinfo, parms, Qinhibit_double_buffering, NULL, NULL,
+                             RES_TYPE_BOOLEAN);
+  FRAME_DOUBLE_BUFFERED (f) = NILP (tem) || EQ (tem, Qunbound);
+  store_frame_param (f, Qinhibit_double_buffering,
+                     FRAME_DOUBLE_BUFFERED (f) ? Qnil : Qt);
+#endif
+
   parms = get_geometry_from_preferences (dpyinfo, parms);
   window_prompting = gui_figure_window_size (f, parms, false, true);
 
diff --git a/src/nsterm.h b/src/nsterm.h
index b6e5a813a6d..8d6c58290cc 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -746,9 +746,11 @@ #define NSTRACE_UNSILENCE()
   CGColorSpaceRef colorSpace;
   IOSurfaceRef currentSurface;
   CGContextRef context;
+  bool doubleBuffered;
 }
-- (id) initWithColorSpace: (CGColorSpaceRef)cs;
+- (id) initWithColorSpace: (CGColorSpaceRef)cs doubleBuffered: (bool)db;
 - (void) setColorSpace: (CGColorSpaceRef)cs;
+- (void) setDoubleBuffered: (bool)db;
 - (CGContextRef) getContext;
 @end
 #endif
@@ -996,6 +998,11 @@ #define KEY_NS_SHOW_PREFS              ((1<<28)|(0<<16)|14)
   /* Non-zero if we are doing an animation, e.g. toggling the tool bar.  */
   int in_animation;
 
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+  /* Is the frame double buffered?  */
+  bool double_buffered;
+#endif
+
 #ifdef NS_IMPL_GNUSTEP
   /* Zero if this is the first time a toolbar has been updated on this
      frame. */
@@ -1030,6 +1037,10 @@ #define FRAME_POINTER_TYPE(f) ((f)->output_data.ns->current_pointer)
 
 #define FRAME_FONT(f) ((f)->output_data.ns->font)
 
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#define FRAME_DOUBLE_BUFFERED(f) ((f)->output_data.ns->double_buffered)
+#endif
+
 #ifdef __OBJC__
 #define XNS_SCROLL_BAR(vec) ((id) xmint_pointer (vec))
 #else
diff --git a/src/nsterm.m b/src/nsterm.m
index 78089906752..28502ad1a2a 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2704,11 +2704,10 @@ Hide the window (X11 semantics)
   {
     NSRect srcRect = NSMakeRect (x, from_y, width, height);
     NSPoint dest = NSMakePoint (x, to_y);
-    NSRect destRect = NSMakeRect (x, from_y, width, height);
     EmacsView *view = FRAME_NS_VIEW (f);
 
     [view copyRect:srcRect to:dest];
-#ifdef NS_IMPL_COCOA
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED < 101400
     [view setNeedsDisplayInRect:destRect];
 #endif
   }
@@ -8607,7 +8606,8 @@ - (instancetype)toggleToolbar: (id)sender
 - (CALayer *)makeBackingLayer
 {
   EmacsLayer *l = [[EmacsLayer alloc]
-                    initWithColorSpace:[[[self window] colorSpace] CGColorSpace]];
+                    initWithColorSpace:[[[self window] colorSpace] CGColorSpace]
+                        doubleBuffered:FRAME_DOUBLE_BUFFERED (emacsframe)];
   [l setDelegate:(id)self];
   [l setContentsScale:[[self window] backingScaleFactor]];
 
@@ -8664,8 +8664,10 @@ - (void)copyRect:(NSRect)srcRect to:(NSPoint)dest
                                NSHeight (srcRect));
 
 #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
-  double scale = [[self window] backingScaleFactor];
   CGContextRef context = [(EmacsLayer *)[self layer] getContext];
+  CGContextFlush (context);
+
+  double scale = [[self window] backingScaleFactor];
   int bpp = CGBitmapContextGetBitsPerPixel (context) / 8;
   void *pixels = CGBitmapContextGetData (context);
   int rowSize = CGBitmapContextGetBytesPerRow (context);
@@ -10435,22 +10437,20 @@ @implementation EmacsLayer
    cache.  If no free surfaces are found in the cache then a new one
    is created.  */
 
-#define CACHE_MAX_SIZE 2
-
 - (id) initWithColorSpace: (CGColorSpaceRef)cs
+           doubleBuffered: (bool)db
 {
-  NSTRACE ("[EmacsLayer initWithColorSpace:]");
+  NSTRACE ("[EmacsLayer initWithColorSpace:doubleBuffered:]");
 
   self = [super init];
   if (self)
     {
-      cache = [[NSMutableArray arrayWithCapacity:CACHE_MAX_SIZE] retain];
       [self setColorSpace:cs];
+      [self setDoubleBuffered:db];
+      cache = [[NSMutableArray arrayWithCapacity:(doubleBuffered ? 2 : 1)] retain];
     }
   else
-    {
-      return nil;
-    }
+    return nil;
 
   return self;
 }
@@ -10467,6 +10467,15 @@ - (void) setColorSpace: (CGColorSpaceRef)cs
 }
 
 
+- (void) setDoubleBuffered: (bool)db
+{
+  if (doubleBuffered != db)
+    [self releaseSurfaces];
+
+  doubleBuffered = db;
+}
+
+
 - (void) dealloc
 {
   [self releaseSurfaces];
@@ -10538,7 +10547,7 @@ - (CGContextRef) getContext
             }
         }
 
-      if (!surface && [cache count] >= CACHE_MAX_SIZE)
+      if (!surface && [cache count] >= (doubleBuffered ? 2 : 1))
         {
           /* Just grab the first one off the cache.  This may result
              in tearing effects.  The alternative is to wait for one
@@ -10591,7 +10600,7 @@ - (CGContextRef) getContext
           return nil;
         }
 
-      CGContextTranslateCTM(context, 0, IOSurfaceGetHeight (currentSurface));
+      CGContextTranslateCTM(context, 0, IOSurfaceGetHeight (surface));
       CGContextScaleCTM(context, scale, -scale);
     }
 
@@ -10608,6 +10617,7 @@ - (void) releaseContext
   if (!context)
     return;
 
+  CGContextFlush (context);
   CGContextRelease (context);
   context = NULL;
 
@@ -10621,26 +10631,18 @@ - (void) display
 {
   NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "[EmacsLayer display]");
 
-  if (context)
+  if (context && context != [[NSGraphicsContext currentContext] CGContext])
     {
       [self releaseContext];
 
-#if CACHE_MAX_SIZE == 1
-      /* This forces the layer to see the surface as updated.  */
+      /* This forces the layer to see the surface as updated even if
+         we replace it with itself.  */
       [self setContents:nil];
-#endif
-
       [self setContents:(id)currentSurface];
 
       /* Put currentSurface back on the end of the cache.  */
       [cache addObject:(id)currentSurface];
       currentSurface = NULL;
-
-      /* Schedule a run of getContext so that if Emacs is idle it will
-         perform the buffer copy, etc.  */
-      [self performSelectorOnMainThread:@selector (getContext)
-                             withObject:nil
-                          waitUntilDone:NO];
     }
 }
 
-- 
2.40.1


[-- Attachment #3: 0001-Fix-crash-on-child-frame-creation-bug-65817.patch --]
[-- Type: text/x-diff, Size: 3606 bytes --]

From 893f079f51c3bc81d8719c48fe539f72b1025fb8 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Fri, 8 Sep 2023 19:33:06 +0100
Subject: [PATCH] Fix crash on child frame creation (bug#65817)

* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Reorder the way the
frame and layers are created.
([EmacsView makeBackingLayer]): Change to the newly renamed method
below.
([EmacsLayer initWithColorSpace:doubleBuffered:]):
([EmacsLayer initWithDoubleBuffered:]): Rename the method and remove
the colorspace argument as it's no longer able to be set on initial
creation.
* src/nsterm.h: Use new method prototype.
---
 src/nsterm.h |  2 +-
 src/nsterm.m | 25 +++++++++++++------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/nsterm.h b/src/nsterm.h
index 8d6c58290cc..cb162039ad8 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -748,7 +748,7 @@ #define NSTRACE_UNSILENCE()
   CGContextRef context;
   bool doubleBuffered;
 }
-- (id) initWithColorSpace: (CGColorSpaceRef)cs doubleBuffered: (bool)db;
+- (id) initWithDoubleBuffered: (bool)db;
 - (void) setColorSpace: (CGColorSpaceRef)cs;
 - (void) setDoubleBuffered: (bool)db;
 - (CGContextRef) getContext;
diff --git a/src/nsterm.m b/src/nsterm.m
index 28502ad1a2a..a3603171bb0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7921,8 +7921,6 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
   maximizing_resize = NO;
 #endif
 
-  [[EmacsWindow alloc] initWithEmacsFrame:f];
-
 #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
   /* These settings mean AppKit will retain the contents of the frame
      on resize.  Unfortunately it also means the frame will not be
@@ -7933,9 +7931,14 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
           NSViewLayerContentsRedrawOnSetNeedsDisplay];
   [self setLayerContentsPlacement:NSViewLayerContentsPlacementTopLeft];
 
-  /* initWithEmacsFrame can't create the toolbar before the layer is
-     set, so have another go at creating the toolbar here.  */
-  [(EmacsWindow*)[self window] createToolbar:f];
+  [[EmacsWindow alloc] initWithEmacsFrame:f];
+
+  /* Now the NSWindow has been created, we can finish up configuring
+     the layer.  */
+  [(EmacsLayer *)[self layer] setColorSpace:[[[self window] colorSpace] CGColorSpace]];
+  [(EmacsLayer *)[self layer] setContentsScale:[[self window] backingScaleFactor]];
+#else
+  [[EmacsWindow alloc] initWithEmacsFrame:f];
 #endif
 
   if (ns_drag_types)
@@ -8606,10 +8609,9 @@ - (instancetype)toggleToolbar: (id)sender
 - (CALayer *)makeBackingLayer
 {
   EmacsLayer *l = [[EmacsLayer alloc]
-                    initWithColorSpace:[[[self window] colorSpace] CGColorSpace]
-                        doubleBuffered:FRAME_DOUBLE_BUFFERED (emacsframe)];
+                    initWithDoubleBuffered:FRAME_DOUBLE_BUFFERED (emacsframe)];
+
   [l setDelegate:(id)self];
-  [l setContentsScale:[[self window] backingScaleFactor]];
 
   return l;
 }
@@ -10437,15 +10439,14 @@ @implementation EmacsLayer
    cache.  If no free surfaces are found in the cache then a new one
    is created.  */
 
-- (id) initWithColorSpace: (CGColorSpaceRef)cs
-           doubleBuffered: (bool)db
+- (id) initWithDoubleBuffered: (bool)db
 {
-  NSTRACE ("[EmacsLayer initWithColorSpace:doubleBuffered:]");
+  NSTRACE ("[EmacsLayer initWithDoubleBuffered:]");
 
   self = [super init];
   if (self)
     {
-      [self setColorSpace:cs];
+      [self setColorSpace:nil];
       [self setDoubleBuffered:db];
       cache = [[NSMutableArray arrayWithCapacity:(doubleBuffered ? 2 : 1)] retain];
     }
-- 
2.40.1


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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-09 19:53 ` Alan Third
@ 2023-09-10  4:20   ` Gerd Möllmann
  2023-09-10 14:59     ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10  4:20 UTC (permalink / raw)
  To: Alan Third; +Cc: 65843, tanzer

Alan Third <alan@idiocy.org> writes:

> On Sat, Sep 09, 2023 at 04:35:56PM -0000, Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
>> 
>> =============================================================================
>> In Emacs 28 and Emacs 29, desktop-load crashes when there are too many
>> iconified frames in the .emacs.desktop file.
>> 
>> The two attached .emacs.desktop files show the smallest test case that
>> I could come up with:
>> 
>> - .emacs.desktop.works with 3 non-iconified and 4 iconified frames
>>   loads without problem in Emacs 28
>> 
>>   + desktop-load of this file crashes in Emacs 29.1
>> 
>>   + a .emacs.desktop with 3 non-iconified and 3 iconified frames works
>>     in Emacs 29.1
>> 
>> - .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames
>>   leads to a crash in Emacs 28 (see attached problem report generated
>>   by macOS)
>> 
>> - I tried .emacs.desktop with up to 17 non-iconified frames in Emacs
>>   28 without problems
>> 
>> - Up to Emacs 27, I've never seen a problem with desktop-load crashing
>> =============================================================================
>
> Can you please try the master branch with the two attached patches
> applied? The v2 patch should be applied first.
>
> The apple crash report is enough to see that the crash is happening
> somewhere deep inside the AppKit code on frame creation. No idea why,
> but maybe we'll be lucky and the fix will be the same as the last
> frame-creation crash fix...

Alas, I cannot reproduce the abort here, with an unpatched master or
emacs-29, and neither on Ventura/arm64 nor Big Sur/x86_64 :-(.

Christian, can you reproduce this with emacs -Q?  Or does it perhaps
depend on your init.el?  (This was the case for me in the child frane
case that Alan fixed.)





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-09 17:39     ` Eli Zaretskii
@ 2023-09-10 14:11       ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-10 14:27         ` Eli Zaretskii
  2023-09-10 15:07         ` Gerd Möllmann
  0 siblings, 2 replies; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-10 14:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65843

On 09.09.2023, at 18:40, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Christian Tanzer <tanzer@gg32.com>
>> Date: Sat, 9 Sep 2023 18:36:07 +0100
>> Cc: 65843@debbugs.gnu.org
>> 
>>> On 09.09.2023, at 17:49, Eli Zaretskii <eliz@gnu.org> wrote:
>>> 
>>> Thanks, can you run Emacs 29 under a debugger and show a backtrace
>>> when it crashes?
>> 
>> Unfortunately, I don’t have a C development environment setup on my little MacBook (and haven’t used gdb for more than 20 years besides).
> 
> Backtrace from LLDB will be also helpful.  Without a crash backtrace,
> we will have to wait until someone can reproduce the crashes on a
> system where a debugger _is_ available.

It took me a while to get lldb to run emacs (missing get-task-value entitlement), and then:
running under lldb, emacs doesn’t crash, but it also doesn’t open any frames:

> lldb /Applications/Emacs-28.2.app/Contents/MacOS/Emacs
>   (lldb) target create "/Applications/Emacs-28.2.app/Contents/MacOS/Emacs"
>   Current executable set to '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64).
>   (lldb) run
>   Process 22971 launched: '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64)
>   Process 22971 exited with status = 0 (0x00000000) 
>   (lldb) ^D


Without lldb:

> /Applications/Emacs-28.2.app/Contents/MacOS/Emacs
>   Fatal error 11: Segmentation fault
>   Abort trap: 6


Could you please give me a hint, how to start Emacs under lldb so that it behaves the same as if started interactively ?





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 14:11       ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-10 14:27         ` Eli Zaretskii
  2023-09-10 15:07         ` Gerd Möllmann
  1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2023-09-10 14:27 UTC (permalink / raw)
  To: Christian Tanzer, Gerd Möllmann; +Cc: 65843

> From: Christian Tanzer <tanzer@gg32.com>
> Date: Sun, 10 Sep 2023 15:11:29 +0100
> Cc: 65843@debbugs.gnu.org
> 
> On 09.09.2023, at 18:40, Eli Zaretskii <eliz@gnu.org> wrote:
> > 
> > Backtrace from LLDB will be also helpful.  Without a crash backtrace,
> > we will have to wait until someone can reproduce the crashes on a
> > system where a debugger _is_ available.
> 
> It took me a while to get lldb to run emacs (missing get-task-value entitlement), and then:
> running under lldb, emacs doesn’t crash, but it also doesn’t open any frames:
> 
> > lldb /Applications/Emacs-28.2.app/Contents/MacOS/Emacs
> >   (lldb) target create "/Applications/Emacs-28.2.app/Contents/MacOS/Emacs"
> >   Current executable set to '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64).
> >   (lldb) run
> >   Process 22971 launched: '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64)
> >   Process 22971 exited with status = 0 (0x00000000) 
> >   (lldb) ^D
> 
> 
> Without lldb:
> 
> > /Applications/Emacs-28.2.app/Contents/MacOS/Emacs
> >   Fatal error 11: Segmentation fault
> >   Abort trap: 6
> 
> 
> Could you please give me a hint, how to start Emacs under lldb so that it behaves the same as if started interactively ?

Thank you for your efforts.

Gerd, could you perhaps help Christian reproduce this under LLDB and
produce a useful backtrace?  He needs to run Emacs so as to restore
the desktop saved on the .emacs.desktop file.

Thanks.





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10  4:20   ` Gerd Möllmann
@ 2023-09-10 14:59     ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-10 15:37       ` Gerd Möllmann
  0 siblings, 1 reply; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-10 14:59 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: Alan Third, 65843

[-- Attachment #1: Type: text/plain, Size: 3232 bytes --]

On 10.09.2023, at 05:20, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
>>> On Sat, Sep 09, 2023 at 04:35:56PM -0000, Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
>>> 
>>> =============================================================================
>>> In Emacs 28 and Emacs 29, desktop-load crashes when there are too many
>>> iconified frames in the .emacs.desktop file.
>>> 
>>> The two attached .emacs.desktop files show the smallest test case that
>>> I could come up with:
>>> 
>>> - .emacs.desktop.works with 3 non-iconified and 4 iconified frames
>>>  loads without problem in Emacs 28
>>> 
>>>  + desktop-load of this file crashes in Emacs 29.1
>>> 
>>>  + a .emacs.desktop with 3 non-iconified and 3 iconified frames works
>>>    in Emacs 29.1
>>> 
>>> - .emacs.desktop.crashes with 3 non-iconified and 5 iconified frames
>>>  leads to a crash in Emacs 28 (see attached problem report generated
>>>  by macOS)
>>> 
>>> - I tried .emacs.desktop with up to 17 non-iconified frames in Emacs
>>>  28 without problems
>>> 
>>> - Up to Emacs 27, I've never seen a problem with desktop-load crashing
>>> =============================================================================
>> 
> Alas, I cannot reproduce the abort here, with an unpatched master or
> emacs-29, and neither on Ventura/arm64 nor Big Sur/x86_64 :-(.
> 
> Christian, can you reproduce this with emacs -Q?  Or does it perhaps
> depend on your init.el?  (This was the case for me in the child frane
> case that Alan fixed.)

Emacs29 -Q also crashes, but differently:

/Applications/Emacs-29.1.app/Contents/MacOS/Emacs --load=emacs28_desktop_load_init.el
    Fatal error 11: Segmentation fault
    Abort trap: 6

/Applications/Emacs-29.1.app/Contents/MacOS/Emacs -Q --load=emacs28_desktop_load_init.el
    objc[23222]: autorelease pool page 0x12a43c000 corrupted
      magic     0x2a05b000 0x00000001 0x000000eb 0x00000000
      should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
      pthread   0x1e695e05d
      should be 0x1e695e080

    Fatal error 6: Aborted
    Abort trap: 6

with emacs28_desktop_load_init.el:

(setq desktop-path '("~/tmp/"))
(require 'desktop)
(desktop-read)

Emacs28 -Q doesn’t crash:

/Applications/Emacs-28.2.app/Contents/MacOS/Emacs --load=emacs28_desktop_load_init.el
    Fatal error 11: Segmentation fault
    Abort trap: 6

/Applications/Emacs-28.2.app/Contents/MacOS/Emacs -Q --load=emacs28_desktop_load_init.el
    ### no crash, desktop-read works

Weirder and weirder …

I tried to come up with a simpler desktop to trigger the crash, but 8 frames with the *scratch* buffer, 4 iconified, are not enough to trigger it. 

OTOH, opening two empty files 1 and 2 with 4 frames for each one and two frames of each file iconified triggers the crash in Emacs29 without the ‘-Q’, so only with my init-file involved.

Gerd, did you test with the .emacs.desktop files I attached to the bug report? My environment configures desktop-save to save iconified frames which standard Emacs doesn’t do. I have only seen crashes where there were more than 3 or 4 iconified frames in the .emacs.desktop.


[-- Attachment #2: Type: text/html, Size: 13024 bytes --]

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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 14:11       ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-10 14:27         ` Eli Zaretskii
@ 2023-09-10 15:07         ` Gerd Möllmann
  2023-09-10 15:37           ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10 15:07 UTC (permalink / raw)
  To: 65843; +Cc: eliz, tanzer

Christian Tanzer via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> On 09.09.2023, at 18:40, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>>> From: Christian Tanzer <tanzer@gg32.com>
>>> Date: Sat, 9 Sep 2023 18:36:07 +0100
>>> Cc: 65843@debbugs.gnu.org
>>> 
>>>> On 09.09.2023, at 17:49, Eli Zaretskii <eliz@gnu.org> wrote:
>>>> 
>>>> Thanks, can you run Emacs 29 under a debugger and show a backtrace
>>>> when it crashes?
>>> 
>>> Unfortunately, I don’t have a C development environment setup on my little MacBook (and haven’t used gdb for more than 20 years besides).
>> 
>> Backtrace from LLDB will be also helpful.  Without a crash backtrace,
>> we will have to wait until someone can reproduce the crashes on a
>> system where a debugger _is_ available.
>
> It took me a while to get lldb to run emacs (missing get-task-value entitlement), and then:
> running under lldb, emacs doesn’t crash, but it also doesn’t open any
> frames:

Could you please tell which LLDB this is

      lldb --version

and how you installed it?  The missing entitlement is strange.

>> lldb /Applications/Emacs-28.2.app/Contents/MacOS/Emacs
>>   (lldb) target create "/Applications/Emacs-28.2.app/Contents/MacOS/Emacs"
>>   Current executable set to
>>   '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64).
>>   (lldb) run
>>   Process 22971 launched: '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64)
>>   Process 22971 exited with status = 0 (0x00000000) 
>>   (lldb) ^D

This looks correct to me.  Let's first see what's up with this lldb.








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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 14:59     ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-10 15:37       ` Gerd Möllmann
  2023-09-10 15:40         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
                           ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10 15:37 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: Alan Third, 65843

Christian Tanzer <tanzer@gg32.com> writes:

> Weirder and weirder …

Wait a moment...  I just got this

[emacs-29] gerd@Mini 2023-09-10 17:24 
~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
objc[88769]: autorelease pool page 0x11b4a5000 corrupted
  magic     0x00000000 0x00000000 0x00000000 0x00000000
  should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
  pthread   0x201892080
  should be 0x201892080

Fatal error 6: Aborted

It doesn't seem to happen everytime, and to make things weirder,
I didn't get it to abort under lldb.

Guess I'll build an emacs-29 with all checking bells and whistles now.

I come back to you when I find something out.






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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 15:07         ` Gerd Möllmann
@ 2023-09-10 15:37           ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-10 16:04             ` Gerd Möllmann
  0 siblings, 1 reply; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-10 15:37 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 65843, eliz

[-- Attachment #1: Type: text/plain, Size: 2092 bytes --]


> On 10.09.2023, at 16:08, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> Christian Tanzer via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
> 
>>> On 09.09.2023, at 18:40, Eli Zaretskii <eliz@gnu.org> wrote:
>>> 
>>>> From: Christian Tanzer <tanzer@gg32.com>
>>>> Date: Sat, 9 Sep 2023 18:36:07 +0100
>>>> Cc: 65843@debbugs.gnu.org
>>>> 
>>>>> On 09.09.2023, at 17:49, Eli Zaretskii <eliz@gnu.org> wrote:
>>>>> 
>>>>> Thanks, can you run Emacs 29 under a debugger and show a backtrace
>>>>> when it crashes?
>>>> 
>>>> Unfortunately, I don’t have a C development environment setup on my little MacBook (and haven’t used gdb for more than 20 years besides).
>>> 
>>> Backtrace from LLDB will be also helpful.  Without a crash backtrace,
>>> we will have to wait until someone can reproduce the crashes on a
>>> system where a debugger _is_ available.
>> 
>> It took me a while to get lldb to run emacs (missing get-task-value entitlement), and then:
>> running under lldb, emacs doesn’t crash, but it also doesn’t open any
>> frames:
> 
> Could you please tell which LLDB this is
> 
>      lldb --version
> 
> and how you installed it?  The missing entitlement is strange.

lldb --version
lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)

I didn’t install lldb itself, but I assume it was installed together with the Xcode command line tools.

The entitlement seems to be a frequent issue but it is very hard to find in DuckDuckGo.

> 
>>> lldb /Applications/Emacs-28.2.app/Contents/MacOS/Emacs
>>>  (lldb) target create "/Applications/Emacs-28.2.app/Contents/MacOS/Emacs"
>>>  Current executable set to
>>>  '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64).
>>>  (lldb) run
>>>  Process 22971 launched: '/Applications/Emacs-28.2.app/Contents/MacOS/Emacs' (arm64)
>>>  Process 22971 exited with status = 0 (0x00000000) 
>>>  (lldb) ^D
> 
> This looks correct to me. 

Except for Emacs exiting without doing anything?

[-- Attachment #2: Type: text/html, Size: 5769 bytes --]

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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 15:37       ` Gerd Möllmann
@ 2023-09-10 15:40         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-10 17:09         ` Gerd Möllmann
  2023-09-10 17:09         ` Alan Third
  2 siblings, 0 replies; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-10 15:40 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: Alan Third, 65843

On 10.09.2023, at 16:37, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> Christian Tanzer <tanzer@gg32.com> writes:
> 
>> Weirder and weirder …
> 
> Wait a moment...  I just got this
> 
> [emacs-29] gerd@Mini 2023-09-10 17:24 
> ~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
> objc[88769]: autorelease pool page 0x11b4a5000 corrupted
>  magic     0x00000000 0x00000000 0x00000000 0x00000000
>  should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
>  pthread   0x201892080
>  should be 0x201892080
> 
> Fatal error 6: Aborted
> 
> It doesn't seem to happen everytime, and to make things weirder,
> I didn't get it to abort under lldb.

Welcome to the club. It seems to be a real Heisenbug.

> Guess I'll build an emacs-29 with all checking bells and whistles now.
> 
> I come back to you when I find something out.

I’ll keep my fingers crossed. 






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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 15:37           ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-10 16:04             ` Gerd Möllmann
  0 siblings, 0 replies; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10 16:04 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: 65843, eliz

Christian Tanzer <tanzer@gg32.com> writes:

> lldb --version
>
>  lldb-1205.0.27.3
>
>  Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
>
> I didn’t install lldb itself, but I assume it was installed together
> with the Xcode command line tools.

That's good, indeed.  (You could also get the Xcode command line tooks
with

  xcode-select --install

but I guess that's not necessary, unless you need them for something
else.

> Except for Emacs exiting without doing anything?

Yeah.  That's strange.  Emacs is starting normally, here.  Some frames
open, some of them are iconified ...





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 15:37       ` Gerd Möllmann
  2023-09-10 15:40         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-10 17:09         ` Gerd Möllmann
  2023-09-10 17:38           ` Gerd Möllmann
  2023-09-10 17:09         ` Alan Third
  2 siblings, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10 17:09 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: Alan Third, 65843

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Christian Tanzer <tanzer@gg32.com> writes:
>
>> Weirder and weirder …
>
> Wait a moment...  I just got this
>
> [emacs-29] gerd@Mini 2023-09-10 17:24 
> ~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
> objc[88769]: autorelease pool page 0x11b4a5000 corrupted
>   magic     0x00000000 0x00000000 0x00000000 0x00000000
>   should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
>   pthread   0x201892080
>   should be 0x201892080
>
> Fatal error 6: Aborted
>
> It doesn't seem to happen everytime, and to make things weirder,
> I didn't get it to abort under lldb.
>
> Guess I'll build an emacs-29 with all checking bells and whistles now.
>
> I come back to you when I find something out.

That's gonna be a bit more difficult than I thought.  With ASAN,

  CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer

the abort does not happen when run 100 times, like so

#! /usr/bin/env zsh

for i in {1..100}; do
    ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' --eval '(kill-emacs)'
done

I'll have to let that sink in a bit, to get an idea how to preceed.





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 15:37       ` Gerd Möllmann
  2023-09-10 15:40         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-10 17:09         ` Gerd Möllmann
@ 2023-09-10 17:09         ` Alan Third
  2023-09-10 18:40           ` Gerd Möllmann
  2 siblings, 1 reply; 27+ messages in thread
From: Alan Third @ 2023-09-10 17:09 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 65843, Christian Tanzer

On Sun, Sep 10, 2023 at 05:37:17PM +0200, Gerd Möllmann wrote:
> Christian Tanzer <tanzer@gg32.com> writes:
> 
> > Weirder and weirder …
> 
> Wait a moment...  I just got this
> 
> [emacs-29] gerd@Mini 2023-09-10 17:24 
> ~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
> objc[88769]: autorelease pool page 0x11b4a5000 corrupted
>   magic     0x00000000 0x00000000 0x00000000 0x00000000
>   should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
>   pthread   0x201892080
>   should be 0x201892080
> 
> Fatal error 6: Aborted

I've a vague memory that I've seen something like this before and it
was a runaway loop corrupting the heap...
-- 
Alan Third





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 17:09         ` Gerd Möllmann
@ 2023-09-10 17:38           ` Gerd Möllmann
  0 siblings, 0 replies; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10 17:38 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: Alan Third, 65843

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Christian Tanzer <tanzer@gg32.com> writes:
>>
>>> Weirder and weirder …
>>
>> Wait a moment...  I just got this
>>
>> [emacs-29] gerd@Mini 2023-09-10 17:24 
>> ~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
>> objc[88769]: autorelease pool page 0x11b4a5000 corrupted
>>   magic     0x00000000 0x00000000 0x00000000 0x00000000
>>   should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
>>   pthread   0x201892080
>>   should be 0x201892080
>>
>> Fatal error 6: Aborted
>>
>> It doesn't seem to happen everytime, and to make things weirder,
>> I didn't get it to abort under lldb.
>>
>> Guess I'll build an emacs-29 with all checking bells and whistles now.
>>
>> I come back to you when I find something out.
>
> That's gonna be a bit more difficult than I thought.  With ASAN,
>
>   CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
>
> the abort does not happen when run 100 times, like so
>
> #! /usr/bin/env zsh
>
> for i in {1..100}; do
>     ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' --eval '(kill-emacs)'
> done
>
> I'll have to let that sink in a bit, to get an idea how to preceed.

Cool: If a build with ASAN, but with -O2 and leave out
omit-frame-pointer, the abort happens, with enough tries, but ASAN isn't
triggered.  So, I guess it's not something in Emacs' code.






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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 17:09         ` Alan Third
@ 2023-09-10 18:40           ` Gerd Möllmann
  2023-09-10 19:54             ` Alan Third
  0 siblings, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-10 18:40 UTC (permalink / raw)
  To: Alan Third; +Cc: 65843, Christian Tanzer

Alan Third <alan@idiocy.org> writes:

> On Sun, Sep 10, 2023 at 05:37:17PM +0200, Gerd Möllmann wrote:
>> Christian Tanzer <tanzer@gg32.com> writes:
>> 
>> > Weirder and weirder …
>> 
>> Wait a moment...  I just got this
>> 
>> [emacs-29] gerd@Mini 2023-09-10 17:24 
>> ~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
>> objc[88769]: autorelease pool page 0x11b4a5000 corrupted
>>   magic     0x00000000 0x00000000 0x00000000 0x00000000
>>   should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
>>   pthread   0x201892080
>>   should be 0x201892080
>> 
>> Fatal error 6: Aborted
>
> I've a vague memory that I've seen something like this before and it
> was a runaway loop corrupting the heap...

Sometimes one just has to be lucky enough :-).
This is with the "-g -O2" build.

Does this tell you anything?

Process 70647 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1ec70)
    frame #0: 0x00000001a6475c20 libobjc.A.dylib`objc_msgSend + 32
libobjc.A.dylib`objc_msgSend:
->  0x1a6475c20 <+32>: ldr    x10, [x16, #0x10]
    0x1a6475c24 <+36>: lsr    x11, x10, #48
    0x1a6475c28 <+40>: and    x10, x10, #0xffffffffffff
    0x1a6475c2c <+44>: and    w12, w1, w11

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1ec70)
    frame #0: 0x00000001a6475c20 libobjc.A.dylib`objc_msgSend + 32
  * frame #1: 0x00000001aa2f4420 AppKit`-[NSWindow _reallyDoOrderWindowOutRelativeTo:] + 608
    frame #2: 0x00000001aa2f4728 AppKit`-[NSWindow _reallyDoOrderWindow:] + 80
    frame #3: 0x00000001aa2fd5f0 AppKit`-[NSWindow(NSWindow_Theme) _finishMinimizeToDock] + 188
    frame #4: 0x00000001a9c42f84 AppKit`_NSCGSDockMessageReceive + 460
    frame #5: 0x00000001b01646a8 HIToolbox`DockCallback(unsigned int, unsigned int, void*, void*) + 1528
    frame #6: 0x00000001ac0793f0 HIServices`_DCXTransactionComplete + 56
    frame #7: 0x00000001ac07938c HIServices`_XTransactionComplete + 60
    frame #8: 0x00000001ac06a52c HIServices`mshMIGPerform + 204
    frame #9: 0x00000001a68eebcc CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
    frame #10: 0x00000001a68eeaec CoreFoundation`__CFRunLoopDoSource1 + 520
    frame #11: 0x00000001a68ed4cc CoreFoundation`__CFRunLoopRun + 2240
    frame #12: 0x00000001a68ec4b8 CoreFoundation`CFRunLoopRunSpecific + 612
    frame #13: 0x00000001ac07930c HIServices`waitForTransaction + 196
    frame #14: 0x00000001aa2f5aa8 AppKit`minimizeItems + 120
    frame #15: 0x00000001aa2fcce4 AppKit`-[NSWindow(NSWindow_Theme) _regularMinimizeToDock] + 60
    frame #16: 0x00000001aa2fcd24 AppKit`-[NSWindow(NSWindow_Theme) _minimizeToDockBypassingWindowManager] + 36
    frame #17: 0x00000001aa478f3c AppKit`__75-[NSWMWindowCoordinator clientWindowManager:windowMiniaturizationResponse:]_block_invoke + 424
    frame #18: 0x00000001aa47959c AppKit`___NSMainRunLoopPerformBlockInModes_block_invoke + 44
    frame #19: 0x00000001a68ee1d4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
    frame #20: 0x00000001a68ee0e8 CoreFoundation`__CFRunLoopDoBlocks + 364
    frame #21: 0x00000001a68ecf38 CoreFoundation`__CFRunLoopRun + 812
    frame #22: 0x00000001a68ec4b8 CoreFoundation`CFRunLoopRunSpecific + 612
    frame #23: 0x00000001b013edf0 HIToolbox`RunCurrentEventLoopInMode + 292
    frame #24: 0x00000001b013eaa8 HIToolbox`ReceiveNextEventCommon + 260
    frame #25: 0x00000001b013e984 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 76
    frame #26: 0x00000001a9b1397c AppKit`_DPSNextEvent + 636
    frame #27: 0x00000001a9b12b18 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
    frame #28: 0x000000010052e0d4 emacs`ns_send_appdefined(value=-1) at nsterm.m:4569:24 [opt]
    frame #29: 0x000000010053e8e4 emacs`-[EmacsView resizeWithOldSuperviewSize:](self=<unavailable>, _cmd=<unavailable>, oldSize=<unavailable>) at nsterm.m:7799:3 [opt]
    frame #30: 0x00000001a9b5b05c AppKit`-[NSView resizeSubviewsWithOldSize:] + 360
    frame #31: 0x00000001a9b3f53c AppKit`-[NSView setFrameSize:] + 1136
    frame #32: 0x00000001a9b59670 AppKit`-[NSWindow _oldPlaceWindow:fromServer:] + 612
    frame #33: 0x00000001a9b586f8 AppKit`-[NSWindow _setFrameCommon:display:fromServer:] + 1832
    frame #34: 0x00000001005488b4 emacs`-[EmacsWindow setFrame:display:](self=<unavailable>, _cmd=<unavailable>, windowFrame=<unavailable>, displayViews=<unavailable>) at nsterm.m:9722:3 [opt]
    frame #35: 0x0000000100548a90 emacs`-[EmacsWindow setFrame:display:animate:](self=<unavailable>, _cmd=<unavailable>, windowFrame=<unavailable>, displayViews=<unavailable>, performAnimation=<unavailable>) at nsterm.m:9733:3 [opt]
    frame #36: 0x00000001a9bf7bd4 AppKit`-[NSThemeFrame _growWindowReshapeContentAndToolbarView:withOldToolbarFrameSize:animate:] + 928
    frame #37: 0x00000001a9bf7664 AppKit`-[NSThemeFrame _reshapeContentAndToolbarView:withOldToolbarFrameSize:resizeWindow:animate:] + 200
    frame #38: 0x00000001a9bdd11c AppKit`-[NSThemeFrame _showHideToolbar:resizeWindow:animate:] + 196
    frame #39: 0x00000001a9bcf0cc AppKit`-[NSWindow _showToolbar:animate:] + 140
    frame #40: 0x00000001a9bcf00c AppKit`-[NSToolbar _show:animate:] + 80
    frame #41: 0x00000001a9bcef98 AppKit`-[NSToolbar _toggleShown:animate:] + 88
    frame #42: 0x00000001a9bcc798 AppKit`-[NSWindow setToolbar:] + 396
    frame #43: 0x0000000100546154 emacs`-[EmacsWindow createToolbar:](self=0x00000001065cb500, _cmd=<unavailable>, f=0x0000000122dd3ff0) at nsterm.m:9206:3 [opt]
    frame #44: 0x000000010053fedc emacs`-[EmacsView initFrameFromEmacs:](self=0x000000010859d880, _cmd=<unavailable>, f=0x0000000122dd3ff0) at nsterm.m:7945:3 [opt]
    frame #45: 0x0000000100564764 emacs`Fx_create_frame(parms=0x0000000106b98723) at nsfns.m:1485:3 [opt]
    frame #46: 0x00000001003baea8 emacs`funcall_subr(subr=0x00000001006d1000, numargs=<unavailable>, args=<unavailable>) at eval.c:3034:15 [opt]
    frame #47: 0x0000000100466be0 emacs`exec_byte_code(fun=<unavailable>, args_template=<unavailable>, nargs=<unavailable>, args=<unavailable>) at bytecode.c:809:14 [opt]
    frame #48: 0x00000001003bbca8 emacs`funcall_lambda [inlined] fetch_and_exec_byte_code(fun=0x0000000107218df5, args_template=257, nargs=1, args=0x0000000108604de8) at eval.c:3081:10 [opt]
    frame #49: 0x00000001003bbc7c emacs`funcall_lambda(fun=<unavailable>, nargs=<unavailable>, arg_vector=<unavailable>) at eval.c:3153:9 [opt]
    frame #50: 0x00000001003ba9fc emacs`funcall_general(fun=<unavailable>, numargs=<unavailable>, args=<unavailable>) at lisp.h:0:10 [opt] [artificial]
    frame #51: 0x00000001003b0eec emacs`Ffuncall(nargs=<unavailable>, args=<unavailable>) at eval.c:2995:21 [opt]
    frame #52: 0x00000001003b800c emacs`Fapply(nargs=2, args=0x0000000108604de0) at eval.c:0 [opt]
    frame #53: 0x00000001003bac84 emacs`funcall_subr(subr=0x00000001006c5180, numargs=<unavailable>, args=<unavailable>) at eval.c:3059:9 [opt]
    frame #54: 0x0000000100466be0 emacs`exec_byte_code(fun=<unavailable>, args_template=<unavailable>, nargs=<unavailable>, args=<unavailable>) at bytecode.c:809:14 [opt]
    frame #55: 0x00000001003bbca8 emacs`funcall_lambda [inlined] fetch_and_exec_byte_code(fun=0x000000011744dbc5, args_template=512, nargs=1, args=0x000000016fdfdf60) at eval.c:3081:10 [opt]
    frame #56: 0x00000001003bbc7c emacs`funcall_lambda(fun=<unavailable>, nargs=<unavailable>, arg_vector=<unavailable>) at eval.c:3153:9 [opt]
    frame #57: 0x00000001003b79f0 emacs`apply_lambda(fun=<unavailable>, args=<unavailable>, count=<unavailable>) at eval.c:3103:9 [opt]
    frame #58: 0x00000001003a9800 emacs`eval_sub(form=<unavailable>) at eval.c:2545:12 [opt]
    frame #59: 0x00000001003b7414 emacs`Feval(form=0x0000000106b26753, lexical=<unavailable>) at eval.c:2361:28 [opt]
    frame #60: 0x00000001003bad84 emacs`funcall_subr(subr=0x00000001006c5120, numargs=<unavailable>, args=<unavailable>) at eval.c:3036:15 [opt]
    frame #61: 0x0000000100466be0 emacs`exec_byte_code(fun=<unavailable>, args_template=<unavailable>, nargs=<unavailable>, args=<unavailable>) at bytecode.c:809:14 [opt]
    frame #62: 0x00000001003bbca8 emacs`funcall_lambda [inlined] fetch_and_exec_byte_code(fun=0x000000010700eecd, args_template=0, nargs=0, args=0x000000016fdfe700) at eval.c:3081:10 [opt]
    frame #63: 0x00000001003bbc7c emacs`funcall_lambda(fun=<unavailable>, nargs=<unavailable>, arg_vector=<unavailable>) at eval.c:3153:9 [opt]
    frame #64: 0x00000001003b79f0 emacs`apply_lambda(fun=<unavailable>, args=<unavailable>, count=<unavailable>) at eval.c:3103:9 [opt]
    frame #65: 0x00000001003a9800 emacs`eval_sub(form=<unavailable>) at eval.c:2545:12 [opt]
    frame #66: 0x00000001003b7414 emacs`Feval(form=0x00000001077ea123, lexical=<unavailable>) at eval.c:2361:28 [opt]
    frame #67: 0x000000010028c5f0 emacs`top_level_2 at keyboard.c:1142:10 [opt] [artificial]
    frame #68: 0x00000001003b3718 emacs`internal_condition_case(bfun=(emacs`top_level_2 at keyboard.c:1141), handlers=<unavailable>, hfun=(emacs`cmd_error at keyboard.c:936)) at eval.c:1474:25 [opt]
    frame #69: 0x000000010028c568 emacs`top_level_1(ignore=0x0000000000000000) at keyboard.c:1150:5 [opt]
    frame #70: 0x00000001003b20d0 emacs`internal_catch(tag=0x000000000000eee0, func=(emacs`top_level_1 at keyboard.c:1147), arg=0x0000000000000000) at eval.c:1197:25 [opt]
    frame #71: 0x000000010025e12c emacs`command_loop at keyboard.c:1110:2 [opt]
    frame #72: 0x000000010025de18 emacs`recursive_edit_1 at keyboard.c:720:9 [opt]
    frame #73: 0x000000010025e620 emacs`Frecursive_edit at keyboard.c:803:3 [opt]
    frame #74: 0x000000010025bb74 emacs`main(argc=<unavailable>, argv=<unavailable>) at emacs.c:2521:3 [opt]
    frame #75: 0x00000001a64b7f28 dyld`start + 2236


(lldb) command script import ~/emacs/29/etc/emacs_lldb.py
Emacs debugging support has been installed.
(lldb) xbacktrace
(unsigned char *) data = 0x000000010064bc60 "x-create-frame"
(unsigned char *) data = 0x00000001078da060 "x-create-frame-with-faces"
PVEC_COMPILED
(unsigned char *) data = 0x000000010062e7c0 "apply"
(unsigned char *) data = 0x00000001078da16d "frame-creation-function"
(unsigned char *) data = 0x00000001078da3ca "make-frame"
(unsigned char *) data = 0x00000001078ea70d "make-frame-on-display"
(unsigned char *) data = 0x0000000117c261b0 "frameset--restore-frame"
(unsigned char *) data = 0x000000010793e6bc "frameset-restore"
(unsigned char *) data = 0x0000000117c2ab10 "desktop-restore-frameset"
(unsigned char *) data = 0x0000000107859f5b "desktop-read"
(unsigned char *) data = 0x00000001006316e0 "eval"
(unsigned char *) data = 0x00000001078aefb9 "command-line-1"
(unsigned char *) data = 0x00000001078b0910 "command-line"
(unsigned char *) data = 0x00000001078b1860 "normal-top-level"





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 18:40           ` Gerd Möllmann
@ 2023-09-10 19:54             ` Alan Third
  2023-09-11  4:07               ` Gerd Möllmann
  0 siblings, 1 reply; 27+ messages in thread
From: Alan Third @ 2023-09-10 19:54 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 65843, Christian Tanzer

On Sun, Sep 10, 2023 at 08:40:49PM +0200, Gerd Möllmann wrote:
> Alan Third <alan@idiocy.org> writes:
> 
> > On Sun, Sep 10, 2023 at 05:37:17PM +0200, Gerd Möllmann wrote:
> >> Christian Tanzer <tanzer@gg32.com> writes:
> >> 
> >> > Weirder and weirder …
> >> 
> >> Wait a moment...  I just got this
> >> 
> >> [emacs-29] gerd@Mini 2023-09-10 17:24 
> >> ~/emacs/29/src/ > ~/emacs/29/src/emacs -Q --eval '(desktop-read "~/bug-sowieso")' 
> >> objc[88769]: autorelease pool page 0x11b4a5000 corrupted
> >>   magic     0x00000000 0x00000000 0x00000000 0x00000000
> >>   should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
> >>   pthread   0x201892080
> >>   should be 0x201892080
> >> 
> >> Fatal error 6: Aborted
> >
> > I've a vague memory that I've seen something like this before and it
> > was a runaway loop corrupting the heap...
> 
> Sometimes one just has to be lucky enough :-).
> This is with the "-g -O2" build.
> 
> Does this tell you anything?

Is this the same error as above, with the corrupt autorelease pool?

>     frame #27: 0x00000001a9b12b18 AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
>     frame #28: 0x000000010052e0d4 emacs`ns_send_appdefined(value=-1) at nsterm.m:4569:24 [opt]

This is an interesting little bit of code with a comment saying it's
been added to cover for what sounds like a bug in macOS 10.10...
Perhaps it's worth removing it and seeing if that helps.

The code's around nsterm.m line 4569, and the whole #ifdef'd section
should be removed.

I still suspect that if we have a corrupt autorelease pool, the
problem will be somewhere entirely different...
-- 
Alan Third





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-10 19:54             ` Alan Third
@ 2023-09-11  4:07               ` Gerd Möllmann
  2023-09-11  4:50                 ` Gerd Möllmann
  0 siblings, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-11  4:07 UTC (permalink / raw)
  To: Alan Third; +Cc: 65843, Christian Tanzer

Alan Third <alan@idiocy.org> writes:

> Is this the same error as above, with the corrupt autorelease pool?

Probably not, one being an ABRT, and one a SEGV.  Or maybe they are,
if the underlying cause is the same.

It's all pretty strange.  Maybe it's a timing thing?  I mean, ignoring
the possibility of an optimization bug for a moment, the fact that
optimization flags that make Emacs slower make the bug disappear.  Or
the fact that it takes a "random" number of runs to make it happen.  And
that it doesn't happen at all on my old Macbook, which is 2x or so
slower than my M1 Mac mini.  I wouldn't be surprised if Christian had an
even faster CPU, so that he sees the bug more reliably.

Out of curiosity, Christian, what CPU do you have?

>>     frame #27: 0x00000001a9b12b18 AppKit`-[NSApplication(NSEvent)
>> _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
>>     frame #28: 0x000000010052e0d4 emacs`ns_send_appdefined(value=-1) at nsterm.m:4569:24 [opt]
>
> This is an interesting little bit of code with a comment saying it's
> been added to cover for what sounds like a bug in macOS 10.10...
> Perhaps it's worth removing it and seeing if that helps.
>
> The code's around nsterm.m line 4569, and the whole #ifdef'd section
> should be removed.
>

Thanks, I'll try that.

diff --git a/src/nsterm.m b/src/nsterm.m
index c809c0b824a..2cb508b5328 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4560,6 +4560,7 @@ Function modeled after x_draw_glyph_string_box ().
      the [NXApp run] main loop after having processed all events queued at
      this moment.  */
 
+#if 0
 #ifdef NS_IMPL_COCOA
   if (! send_appdefined)
     {
@@ -4572,6 +4573,7 @@ in certain situations (rapid incoming events).
                                             dequeue:NO];
       if (! appev) send_appdefined = YES;
     }
+#endif
 #endif
 
   if (send_appdefined)

> I still suspect that if we have a corrupt autorelease pool, the
> problem will be somewhere entirely different...

Yeah.  Strange thing is that ASAN doesn't kick in.  Hm.  Maybe Apple has
something for debugging such situations?  I guess it's worth googling.





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11  4:07               ` Gerd Möllmann
@ 2023-09-11  4:50                 ` Gerd Möllmann
  2023-09-11  7:55                   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-11  4:50 UTC (permalink / raw)
  To: Alan Third; +Cc: 65843, Christian Tanzer

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Thanks, I'll try that.
>
> diff --git a/src/nsterm.m b/src/nsterm.m
> index c809c0b824a..2cb508b5328 100644
> --- a/src/nsterm.m
> +++ b/src/nsterm.m
> @@ -4560,6 +4560,7 @@ Function modeled after x_draw_glyph_string_box ().
>       the [NXApp run] main loop after having processed all events queued at
>       this moment.  */
>  
> +#if 0
>  #ifdef NS_IMPL_COCOA
>    if (! send_appdefined)
>      {
> @@ -4572,6 +4573,7 @@ in certain situations (rapid incoming events).
>                                              dequeue:NO];
>        if (! appev) send_appdefined = YES;
>      }
> +#endif
>  #endif
>  
>    if (send_appdefined)
>

500 runs without a crash, I'd say that counts as fixed :-).

Thanks, Alan!






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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11  4:50                 ` Gerd Möllmann
@ 2023-09-11  7:55                   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-11  8:06                     ` Gerd Möllmann
  0 siblings, 1 reply; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-11  7:55 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: Alan Third, 65843

On 11.09.2023, at 05:50, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> 
>> Thanks, I'll try that.
>> 
>> diff --git a/src/nsterm.m b/src/nsterm.m
>> index c809c0b824a..2cb508b5328 100644
>> --- a/src/nsterm.m
>> +++ b/src/nsterm.m
>> @@ -4560,6 +4560,7 @@ Function modeled after x_draw_glyph_string_box ().
>>      the [NXApp run] main loop after having processed all events queued at
>>      this moment.  */
>> 
>> +#if 0
>> #ifdef NS_IMPL_COCOA
>>   if (! send_appdefined)
>>     {
>> @@ -4572,6 +4573,7 @@ in certain situations (rapid incoming events).
>>                                             dequeue:NO];
>>       if (! appev) send_appdefined = YES;
>>     }
>> +#endif
>> #endif
>> 
>>   if (send_appdefined)
>> 
> 
> 500 runs without a crash, I'd say that counts as fixed :-).

Thanks, Gerd and Alan.

That was fast!

If you guys ever come to Portugal, give me a call. The beer’s on me.





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11  7:55                   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-11  8:06                     ` Gerd Möllmann
  2023-09-11 16:25                       ` Alan Third
  0 siblings, 1 reply; 27+ messages in thread
From: Gerd Möllmann @ 2023-09-11  8:06 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: Alan Third, 65843

Christian Tanzer <tanzer@gg32.com> writes:

> On 11.09.2023, at 05:50, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
>> 
>> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>> 
>>> Thanks, I'll try that.
>>> 
>>> diff --git a/src/nsterm.m b/src/nsterm.m
>>> index c809c0b824a..2cb508b5328 100644
>>> --- a/src/nsterm.m
>>> +++ b/src/nsterm.m
>>> @@ -4560,6 +4560,7 @@ Function modeled after x_draw_glyph_string_box ().
>>>      the [NXApp run] main loop after having processed all events queued at
>>>      this moment.  */
>>> 
>>> +#if 0
>>> #ifdef NS_IMPL_COCOA
>>>   if (! send_appdefined)
>>>     {
>>> @@ -4572,6 +4573,7 @@ in certain situations (rapid incoming events).
>>>                                             dequeue:NO];
>>>       if (! appev) send_appdefined = YES;
>>>     }
>>> +#endif
>>> #endif
>>> 
>>>   if (send_appdefined)
>>> 
>> 
>> 500 runs without a crash, I'd say that counts as fixed :-).
>
> Thanks, Gerd and Alan.

It's Alan.  I've just given him food :-).

> That was fast!
>
> If you guys ever come to Portugal, give me a call. The beer’s on me.

👍





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11  8:06                     ` Gerd Möllmann
@ 2023-09-11 16:25                       ` Alan Third
  2023-09-11 17:16                         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 27+ messages in thread
From: Alan Third @ 2023-09-11 16:25 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 65843, Christian Tanzer

On Mon, Sep 11, 2023 at 10:06:44AM +0200, Gerd Möllmann wrote:
> Christian Tanzer <tanzer@gg32.com> writes:
> >> 
> >> 500 runs without a crash, I'd say that counts as fixed :-).
> >
> > Thanks, Gerd and Alan.
> 
> It's Alan.  I've just given him food :-).
> 
> > That was fast!
> >
> > If you guys ever come to Portugal, give me a call. The beer’s on me.
> 
> 👍

OK, I've pushed this change to master.

Christian, would you mind making sure it fixes the issue on your
machine too?
-- 
Alan Third





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11 16:25                       ` Alan Third
@ 2023-09-11 17:16                         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-11 18:26                           ` Alan Third
  0 siblings, 1 reply; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-11 17:16 UTC (permalink / raw)
  To: Alan Third; +Cc: Gerd Möllmann, 65843

On 11.09.2023, at 17:25, Alan Third <alan@idiocy.org> wrote:
> 
> On Mon, Sep 11, 2023 at 10:06:44AM +0200, Gerd Möllmann wrote:
>> Christian Tanzer <tanzer@gg32.com> writes:
>>>> 
>>>> 500 runs without a crash, I'd say that counts as fixed :-).
>>> 
>>> Thanks, Gerd and Alan.
>> 
>> It's Alan.  I've just given him food :-).
>> 
>>> That was fast!
>>> 
>>> If you guys ever come to Portugal, give me a call. The beer’s on me.
>> 
>> 👍
> 
> OK, I've pushed this change to master.
> 
> Christian, would you mind making sure it fixes the issue on your
> machine too?

Unfortunately, I currently only have a small-disked MacBook with no compilation environment.

I’ll have to wait for the Emacs 29.2 …

In the mean time, I might have an idea how to mitigate the issue.

Thanks again !





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11 17:16                         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-09-11 18:26                           ` Alan Third
  2023-09-12 17:43                             ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 27+ messages in thread
From: Alan Third @ 2023-09-11 18:26 UTC (permalink / raw)
  To: Christian Tanzer; +Cc: Gerd Möllmann, 65843-done

On Mon, Sep 11, 2023 at 06:16:19PM +0100, Christian Tanzer wrote:
> On 11.09.2023, at 17:25, Alan Third <alan@idiocy.org> wrote:
> > 
> > On Mon, Sep 11, 2023 at 10:06:44AM +0200, Gerd Möllmann wrote:
> >> Christian Tanzer <tanzer@gg32.com> writes:
> >>>> 
> >>>> 500 runs without a crash, I'd say that counts as fixed :-).
> >>> 
> >>> Thanks, Gerd and Alan.
> >> 
> >> It's Alan.  I've just given him food :-).
> >> 
> >>> That was fast!
> >>> 
> >>> If you guys ever come to Portugal, give me a call. The beer’s on me.
> >> 
> >> 👍
> > 
> > OK, I've pushed this change to master.
> > 
> > Christian, would you mind making sure it fixes the issue on your
> > machine too?
> 
> Unfortunately, I currently only have a small-disked MacBook with no compilation environment.
> 
> I’ll have to wait for the Emacs 29.2 …
> 
> In the mean time, I might have an idea how to mitigate the issue.
> 
> Thanks again !

OK, thanks. I'll just close this now then.
-- 
Alan Third





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

* bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS)
  2023-09-11 18:26                           ` Alan Third
@ 2023-09-12 17:43                             ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 27+ messages in thread
From: Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-12 17:43 UTC (permalink / raw)
  To: Alan Third; +Cc: Gerd Möllmann, 65843-done

[-- Attachment #1: Type: text/plain, Size: 1668 bytes --]

On 11.09.2023, at 20:45, Alan Third <alan@idiocy.org> wrote:

> On Mon, Sep 11, 2023 at 06:16:19PM +0100, Christian Tanzer wrote:
> ...
> In the mean time, I might have an idea how to mitigate the issue.

Yup. That worked.

I defined one hook added to desktop-save-hook and another one added to
desktop-after-read-hook. The idea is to have no iconified frames in
the .emacs.desktop, so ::

+ the hook running before desktop-save makes all iconified frames
  visible and sets a frame-parameter to mark the frame is iconified

    (defun lse-frame:desktop-before-save:deiconify-frames ()
      "desktop-save-hook: de-iconify all frames that are iconified"
      (dolist (frame (frame-list))
        (when (eq (frame-parameter frame 'visibility) 'icon)
          (set-frame-parameter frame 'lse-iconified t)
          (make-frame-visible frame)
        )
      )
    )

+ the hook running after desktop-read iconifies all frames marked by
  the desktop-save-hook

    (defun lse-frame:desktop-after-read:iconify-frames ()
      "desktop-after-read-hook: iconify all frames that were de-iconified
    before desktop-save"
      (dolist (frame (frame-list))
        (when (frame-parameter frame 'lse-iconified)
          (set-frame-parameter frame 'lse-iconified nil)
          (iconify-frame frame)
        )
      )
    )

A fringe benefit of this is that position and size of iconified frames
are preserved better.

An .emacs.desktop that crashed will work after being changed from
`(visibility . icon)` to `(visibility . t) (lse-iconified . t)`.

So I can upgrade from Emacs 27 to Emacs 28.2.

Emacs 29.1 is still out because of bug=65840.

Cheers,

--
Christian Tanzer

[-- Attachment #2: Type: text/html, Size: 3413 bytes --]

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

end of thread, other threads:[~2023-09-12 17:43 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-09 16:35 bug#65843: 28.2; Too many iconified frames in .emacs.desktop -> crash (macOS) Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-09 16:49 ` Eli Zaretskii
2023-09-09 17:36   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-09 17:39     ` Eli Zaretskii
2023-09-10 14:11       ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 14:27         ` Eli Zaretskii
2023-09-10 15:07         ` Gerd Möllmann
2023-09-10 15:37           ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 16:04             ` Gerd Möllmann
2023-09-09 19:53 ` Alan Third
2023-09-10  4:20   ` Gerd Möllmann
2023-09-10 14:59     ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 15:37       ` Gerd Möllmann
2023-09-10 15:40         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 17:09         ` Gerd Möllmann
2023-09-10 17:38           ` Gerd Möllmann
2023-09-10 17:09         ` Alan Third
2023-09-10 18:40           ` Gerd Möllmann
2023-09-10 19:54             ` Alan Third
2023-09-11  4:07               ` Gerd Möllmann
2023-09-11  4:50                 ` Gerd Möllmann
2023-09-11  7:55                   ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11  8:06                     ` Gerd Möllmann
2023-09-11 16:25                       ` Alan Third
2023-09-11 17:16                         ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11 18:26                           ` Alan Third
2023-09-12 17:43                             ` Christian Tanzer via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).