all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#57267: 28.1; emacs crashes when loading too many images
@ 2022-08-18  0:38 james
  2022-08-18  6:30 ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: james @ 2022-08-18  0:38 UTC (permalink / raw)
  To: 57267

I wrote a small library to add thumbnails to dired here:
https://github.com/jojojames/media-thumbnail

When scrolling through images at a fast rate. (I hold down the key to go to the next line for example.),
emacs eventually crashes.

The behavior can also be seen with image-dired though I didn't test an emacs -Q for it.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Image_002dDired.html

I can reproduce more reliably with my library due to its rapid fire calls to create-image (maybe?).

# Emacs -Q

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)

;; $ git clone https://github.com/jojojames/media-thumbnail

;; (load "/Users/james/.emacs.d/packages/emacs_28/straight/repos/media-thumbnail/media-thumbnail.el")
(load "where-media-thumbnail-is-located/media-thumbnail.el")

(require 'media-thumbnail)
(add-hook 'dired-mode-hook 'media-thumbnail-dired-mode)

M-x dired # directory with a lot of images to scroll through
C-n until emacs crashes.


- # of images in directory can range in the hundreds.
- happens consistently when scrolling through hundreds of images, though not every time




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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-18  0:38 bug#57267: 28.1; emacs crashes when loading too many images james
@ 2022-08-18  6:30 ` Eli Zaretskii
  2022-08-18 18:49   ` james
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-08-18  6:30 UTC (permalink / raw)
  To: james; +Cc: 57267

> From: james@jojojames.com
> Date: Wed, 17 Aug 2022 20:38:27 -0400
> 
> I wrote a small library to add thumbnails to dired here:
> https://github.com/jojojames/media-thumbnail
> 
> When scrolling through images at a fast rate. (I hold down the key to go to the next line for example.),
> emacs eventually crashes.

Please compile Emacs with debug information and without optimizations,
then run it under a debugger, and when it crashes, please post the
full backtrace from the debugger, including the Lisp backtrace
(produced by GDB automatically if you source the .gdbinit file that
comes with Emacs).

Also, you didn't post the information about your build that is
normally collected by "M-x report-emacs-bug"; please post that, it's
important for the analysis of the possible reasons.

Thanks.





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-18  6:30 ` Eli Zaretskii
@ 2022-08-18 18:49   ` james
  2022-08-18 19:03     ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: james @ 2022-08-18 18:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57267

------------------------------------------------------------------------------
$ brew install gdb

Codesigning gdb: https://sourceware.org/gdb/wiki/PermissionsDarwin

------------------------------------------------------------------------------
emacs/ $ ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type \
    CFLAGS='-O0 -g3'
------------------------------------------------------------------------------

emacs/ $ make bootstrap && make install

------------------------------------------------------------------------------
# First run seems to hang...
(gdb) r
Starting program: /Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs
[New Thread 0x1d03 of process 27192]
[New Thread 0x2003 of process 27192]


------------------------------------------------------------------------------

# Second run

src/ $ gdb ../nextstep/Emacs.app/Contents/MacOS/Emacs
GNU gdb (GDB) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin20.6.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../nextstep/Emacs.app/Contents/MacOS/Emacs...
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 1 at 0x1001c1300: terminate_due_to_signal. (2 locations)
(gdb) r
Starting program: /Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs
[New Thread 0x1c03 of process 27457]
[New Thread 0x1f03 of process 27457]
[New Thread 0x2003 of process 27457]
warning: unhandled dyld version (17)
[New Thread 0x1c0f of process 27457]
[New Thread 0x2103 of process 27457]
[New Thread 0x2203 of process 27457]
[New Thread 0x2a03 of process 27457]
[New Thread 0x2b03 of process 27457]
[New Thread 0x2c03 of process 27457]
[New Thread 0x5303 of process 27457]
[New Thread 0x5403 of process 27457]
[New Thread 0x1f47 of process 27457]
[New Thread 0x2d03 of process 27457]
[New Thread 0x5103 of process 27457]
[New Thread 0x5447 of process 27457]
[New Thread 0x1c13 of process 27457]
[New Thread 0x1f8b of process 27457]
[New Thread 0x2207 of process 27457]
[New Thread 0x2e07 of process 27457]
[New Thread 0x5107 of process 27457]
[New Thread 0x523b of process 27457]
[New Thread 0x2d07 of process 27457]
[New Thread 0x2e47 of process 27457]
[New Thread 0x510b of process 27457]
[New Thread 0x53fb of process 27457]
[New Thread 0x22d3 of process 27457]
[New Thread 0x547b of process 27457]
[New Thread 0x4d03 of process 27457]
[New Thread 0x4e03 of process 27457]
[New Thread 0x50c3 of process 27457]
[New Thread 0x544b of process 27457]
[New Thread 0x5383 of process 27457]
[New Thread 0x4e07 of process 27457]
[New Thread 0x535b of process 27457]
[New Thread 0x5477 of process 27457]
[New Thread 0x520b of process 27457]
[New Thread 0x1c1f of process 27457]
[New Thread 0x2a07 of process 27457]
[New Thread 0x4dc3 of process 27457]
[New Thread 0x4e0b of process 27457]
[New Thread 0x535f of process 27457]
[New Thread 0x504f of process 27457]

Thread 42 received signal SIGBUS, Bus error.
[Switching to Thread 0x504f of process 27457]
0x000000046b064710 in ?? ()
(gdb) bt full
#0  0x000000046b064710 in ?? ()
No symbol table info available.
#1  0x00007fff31a448da in ?? ()
No symbol table info available.
#2  0x0000000000000000 in ?? ()
No symbol table info available.

Thread 42 received signal SIGBUS, Bus error.
<function called from gdb>
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(backtrace_top) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)

(gdb) xbacktrace
[New Thread 0x4f2b of process 27457]
[New Thread 0x5363 of process 27457]
[New Thread 0x2e4b of process 27457]

Thread 42 received signal SIGBUS, Bus error.
<function called from gdb>
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(backtrace_top) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)

------------------------------------------------------------------------------

In GNU Emacs 29.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.70 Version 11.6.7 (Build 20G630))
 of 2022-08-18 built on jojobook.local
Repository revision: 3e042c80ce708b2d27da8ff62f19a5706f6d7fc6
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6.7

Configured using:
 'configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CFLAGS=-O0 -g3''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB

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

Major mode: Lisp Interaction

Minor modes in effect:
  recentf-mode: t
  savehist-mode: t
  elisp-slime-nav-mode: t
  display-line-numbers-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-company-mode: t
  company-mode: t
  global-hungry-delete-mode: t
  hungry-delete-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  vertico-mode: t
  marginalia-mode: t
  pixel-scroll-precision-mode: t
  general-override-mode: t
  override-global-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  straight-live-modifications-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  hs-minor-mode: t

Load-path shadows:
/Users/james/.emacs.d/packages/emacs_29/straight/build/ivy/elpa hides /Users/james/.emacs.d/packages/emacs_29/straight/build/lispy/elpa
/Users/james/.emacs.d/packages/emacs_29/straight/build/so-long/so-long hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/so-long
/Users/james/.emacs.d/packages/emacs_29/straight/build/jsonrpc/jsonrpc hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/jsonrpc
/Users/james/.emacs.d/packages/emacs_29/straight/build/transient/transient hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/transient
/Users/james/.emacs.d/packages/emacs_29/straight/build/xref/xref hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/xref
/Users/james/.emacs.d/packages/emacs_29/straight/build/project/project hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/project
/Users/james/.emacs.d/packages/emacs_29/straight/build/flymake/flymake hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/flymake
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-exp hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-exp
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-emacs-lisp hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/oc hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/oc
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-css hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-css
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-lob hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-lob
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-irc hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-irc
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-forth hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-forth
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-macs hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-macs
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-version hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-version
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-scheme hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-scheme
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-C hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-C
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-capture hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-capture
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-ref hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-ref
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-clojure hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-clojure
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-mouse hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-mouse
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-ctags hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-ctags
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-entities hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-entities
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-archive hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-archive
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-screen hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-screen
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-bibtex hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-bibtex
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-haskell hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-haskell
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-loaddefs hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-loaddefs
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-table hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-table
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-eww hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-eww
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-man hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-man
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-org hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-org
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-num hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-num
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-plot hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-plot
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-rmail hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-rmail
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-awk hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-awk
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-groovy hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-groovy
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-octave hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-octave
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-faces hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-faces
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/oc-biblatex hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/oc-biblatex
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-colview hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-colview
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-R hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-R
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-refile hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-refile
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-timer hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-timer
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-mobile hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-mobile
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-fortran hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-fortran
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-shell hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-shell
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-perl hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-perl
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-sqlite hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-sqlite
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/oc-basic hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/oc-basic
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-sed hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-sed
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-list hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-list
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-ruby hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-ruby
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-eval hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-eval
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-habit hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-habit
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-clock hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-clock
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-goto hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-goto
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-html hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-html
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-src hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-src
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-lisp hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-lisp
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-eshell hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-eshell
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-ditaa hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-ditaa
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-pcomplete hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-pcomplete
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-lint hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-lint
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-latex hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-latex
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-sass hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-sass
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-tangle hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-tangle
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-calc hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-calc
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-java hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-java
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-icalendar hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-icalendar
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-mhe hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-mhe
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-attach-git hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-attach-git
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-md hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-md
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-beamer hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-beamer
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-element hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-element
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/oc-natbib hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/oc-natbib
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-protocol hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-protocol
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-gnuplot hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-tempo hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-tempo
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-latex hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-latex
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-w3m hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-w3m
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-id hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-id
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-man hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-man
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-doi hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-doi
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-feed hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-feed
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-julia hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-julia
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-lua hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-lua
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-table hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-table
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-ocaml hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-ocaml
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/oc-csl hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/oc-csl
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-gnus hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-gnus
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-indent hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-indent
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-lilypond hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-lilypond
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-matlab hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-matlab
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-datetree hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-datetree
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-docview hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-docview
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-python hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-python
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-makefile hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-makefile
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-duration hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-duration
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-agenda hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-agenda
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-dot hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-dot
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-js hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-js
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-publish hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-publish
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-inlinetask hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-inlinetask
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-org hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-org
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-keys hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-keys
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-core hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-core
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-compat hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-compat
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-odt hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-odt
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-info hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-info
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-plantuml hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-plantuml
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-eshell hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-eshell
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-ascii hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-ascii
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-koma-letter hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-koma-letter
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-maxima hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-maxima
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ol-bbdb hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ol-bbdb
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-macro hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-macro
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-sql hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-sql
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-attach hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-attach
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-processing hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-processing
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ox-texinfo hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-texinfo
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-crypt hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-crypt
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-footnote hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-footnote
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/org-install hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/org-install
/Users/james/.emacs.d/packages/emacs_29/straight/build/org/ob-comint hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ob-comint
/Users/james/.emacs.d/packages/emacs_29/straight/build/let-alist/let-alist hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist
/Users/james/.emacs.d/packages/emacs_29/straight/build/map/map hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/map
/Users/james/.emacs.d/packages/emacs_29/straight/build/eldoc/eldoc hides /Users/james/Code/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eldoc

Features:
(shadow sort mail-extr recentf tree-widget wid-edit emacsbug message
yank-media puny ls-lisp matcha-dired dired dired-loaddefs rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils vertico-directory savehist company-tng
time-date exec-path-from-shell elisp-slime-nav display-line-numbers
company-quickhelp pos-tip jn-dropbox jn-lang php-mode-autoloads
web-mode-autoloads add-node-modules-path-autoloads tide-autoloads
flycheck-autoloads let-alist-autoloads typescript-mode-autoloads
prettier-js-autoloads rjsx-mode-autoloads xref-js2-autoloads
js2-mode-autoloads dtrt-indent-autoloads clang-format-autoloads
godoctor-autoloads company-go-autoloads go-guru-autoloads
go-mode-autoloads flymake-ktlint-autoloads kotlin-mode-autoloads
alchemist-autoloads pkg-info-autoloads epl-autoloads
elixir-mode-autoloads erlang-autoloads lua-mode-autoloads
cargo-autoloads rust-mode-autoloads csharp-mode-autoloads
haskell-mode-autoloads scala-mode-autoloads groovy-mode-autoloads
jn-lisp elisp-refs-autoloads macrostep-autoloads
elisp-slime-nav-autoloads cider-autoloads sesman-autoloads
queue-autoloads parseedn-autoloads map-autoloads parseclj-autoloads
clojure-mode-autoloads flymake-racket-autoloads geiser-autoloads
sly-autoloads jn-completion yasnippet yasnippet-autoloads
company-quickhelp-autoloads pos-tip-autoloads company-keywords
company-etags company-gtags company-files company-capf company-cmake
company-semantic company-template company-dabbrev-code company-dabbrev
company-yasnippet company-bbdb company company-autoloads jn-evil
evil-org-autoloads evil-numbers-autoloads evil-commentary-autoloads
evil-surround-autoloads evil-visualstar-autoloads evil-matchit-autoloads
evil-collection-autoloads annalist-autoloads warnings calc-macs rect
evil-digraphs evil-vars jn-editing comment-or-uncomment-sexp-autoloads
super-save-autoloads rainbow-mode-autoloads vlf-autoloads
so-long-autoloads expand-region-autoloads hideshow hungry-delete
hungry-delete-autoloads ws-butler-autoloads lispyville-autoloads
evil-autoloads goto-chg-autoloads lispy hydra lv pcase delsel
lispy-inline avy noutline outline icons etags fileloop generator xref
project edebug debug backtrace help-fns radix-tree lispy-tags mode-local
find-func lispy-autoloads zoutline-autoloads hydra-autoloads
lv-autoloads swiper-autoloads ivy-autoloads iedit-autoloads objc-bracket
smartparens-config smartparens-text smartparens-c smartparens thingatpt
dash smartparens-autoloads jn-project fzf-native-make-slab
fzf-native-make-default-slab fzf-native-module fzf-native
fzf-native-autoloads fuz-bin-dyn fuz-bin fuz-bin-autoloads flx-rs-core
flx-rs flx-rs-autoloads fussy flx fussy-autoloads flx-autoloads
dired-sidebar-autoloads dired-subtree-autoloads
dired-hacks-utils-autoloads projectile-autoloads
embark-consult-autoloads embark-autoloads consult-tramp-autoloads
consult-autoloads vertico vertico-autoloads orderless-autoloads
marginalia marginalia-autoloads jn-misc media-thumbnail-autoloads
org-contrib org-contrib-autoloads csv-mode-autoloads shackle-autoloads
sudo-edit-autoloads deadgrep-autoloads spinner-autoloads
protobuf-mode-autoloads cmake-mode-autoloads restclient-autoloads
vimrc-mode-autoloads powershell-autoloads json-mode-autoloads rx
json-snatcher-autoloads yaml-mode-autoloads markdown-mode-autoloads
pass-autoloads f-autoloads password-store-otp-autoloads
password-store-autoloads multi-term-autoloads jn-git vc-defer-autoloads
hg-histedit-autoloads vc-hgcmd-autoloads advice magit-autoloads
magit-section-autoloads git-commit-autoloads with-editor-autoloads
jn-platform reveal-in-osx-finder-autoloads pbcopy-autoloads async
exec-path-from-shell-autoloads jn-defaults pixel-scroll cua-base ring
jn-theme solarized-light-theme solarized solarized-faces color
spacemacs-theme-autoloads solarized-theme-autoloads
doom-themes-autoloads highlight-symbol-autoloads xterm-color-autoloads
rainbow-delimiters-autoloads jn-dependencies vscode-icon
vscode-icon-autoloads eglot-autoloads flymake-autoloads
project-autoloads xref-autoloads eldoc-autoloads jsonrpc-autoloads
flymake-diagnostic-at-point-autoloads help-at-pt cus-load
editorconfig-autoloads vterm-autoloads prjf prjf-autoloads matcha-elisp
matcha-macrostep matcha-me matcha matcha-base matcha-autoloads transient
format-spec edmacro kmacro compat transient-autoloads compat-autoloads
ace-window-autoloads avy-autoloads smart-jump-autoloads
dumb-jump-autoloads popup-autoloads dash-autoloads s-autoloads
async-autoloads diminish diminish-autoloads general general-autoloads
finder-inf jn-core early-init use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core use-package-autoloads bind-key-autoloads
straight-autoloads info cl-extra help-mode straight package browse-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile cconv url-vars cl-loaddefs cl-lib
rmc 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 nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads kqueue
cocoa ns lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 293004 331596)
 (symbols 48 24305 501)
 (strings 32 70546 59933)
 (string-bytes 1 2911674)
 (vectors 16 38541)
 (vector-slots 8 907403 447843)
 (floats 8 461 1002)
 (intervals 56 3368 255)
 (buffers 992 11))

------------------------------------------------------------------------------

Crash/hang takes a lot longer to reproduce (need to scroll thousands of images) in gdb.

Not sure if I correctly added the debug symbols to the build, doesn't seem like it from the trace.


> On Aug 18, 2022, at 2:30 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: james@jojojames.com
>> Date: Wed, 17 Aug 2022 20:38:27 -0400
>> 
>> I wrote a small library to add thumbnails to dired here:
>> https://github.com/jojojames/media-thumbnail
>> 
>> When scrolling through images at a fast rate. (I hold down the key to go to the next line for example.),
>> emacs eventually crashes.
> 
> Please compile Emacs with debug information and without optimizations,
> then run it under a debugger, and when it crashes, please post the
> full backtrace from the debugger, including the Lisp backtrace
> (produced by GDB automatically if you source the .gdbinit file that
> comes with Emacs).
> 
> Also, you didn't post the information about your build that is
> normally collected by "M-x report-emacs-bug"; please post that, it's
> important for the analysis of the possible reasons.
> 
> Thanks.






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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-18 18:49   ` james
@ 2022-08-18 19:03     ` Eli Zaretskii
  2022-08-18 20:14       ` james
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-08-18 19:03 UTC (permalink / raw)
  To: james; +Cc: 57267

> From: james@jojojames.com
> Date: Thu, 18 Aug 2022 14:49:10 -0400
> Cc: 57267@debbugs.gnu.org
> 
> ------------------------------------------------------------------------------
> $ brew install gdb

Ouch, macOS!  You may need to use lldb, then, not GDB.  And that will
make the job of finding the problem harder.

> Crash/hang takes a lot longer to reproduce (need to scroll thousands of images) in gdb.
> 
> Not sure if I correctly added the debug symbols to the build, doesn't seem like it from the trace.

No, there are no symbols (or at least GDB couldn't find them).  But I
don't think you were in the right thread when you did that.  The Emacs
main thread is always thread 1, not 42 or some other number.  So
always say "thread 1" before "bt full".

Did the SIGBUS thing happen when you did the image-scrolling thing
that causes crashes?





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-18 19:03     ` Eli Zaretskii
@ 2022-08-18 20:14       ` james
  2022-08-19  5:55         ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: james @ 2022-08-18 20:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57267

------------------------------------------------------------------------------
Unrelated to the crash but...
Not sure why this happens, but emacs 29 throws this error upon start up.
Any tips on debugging this?
Error (use-package): evil/:catch: Symbol’s value as variable is void: ‹\213 (It’s one full letter, not actually “\213”)
Error (use-package): evil-surround/:catch: Symbol’s value as variable is void: ‹\213
------------------------------------------------------------------------------

(gdb) r
Starting program: /Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs
[New Thread 0x4f0f of process 27639]
[New Thread 0x2e53 of process 27639]
[New Thread 0x2b0b of process 27639]
warning: unhandled dyld version (17)
[New Thread 0x200b of process 27639]
[New Thread 0x2a3f of process 27639]
[New Thread 0x4f1b of process 27639]
[New Thread 0x1f27 of process 27639]
[New Thread 0x21ab of process 27639]
[New Thread 0x2aa3 of process 27639]
[New Thread 0x2c4b of process 27639]
[New Thread 0x2e5f of process 27639]
[New Thread 0x510b of process 27639]
[New Thread 0x4f37 of process 27639]
[New Thread 0x2d4f of process 27639]
[New Thread 0x4f7f of process 27639]
[New Thread 0x2d47 of process 27639]
[New Thread 0x5127 of process 27639]
[New Thread 0x516b of process 27639]
[New Thread 0x2d4b of process 27639]
[New Thread 0x4fa3 of process 27639]
[New Thread 0x2e3f of process 27639]
[New Thread 0x2c7b of process 27639]
[New Thread 0x2e43 of process 27639]
[New Thread 0x4fa7 of process 27639]
[New Thread 0x5113 of process 27639]
[New Thread 0x2c7f of process 27639]
[New Thread 0x2da3 of process 27639]
[New Thread 0x2e47 of process 27639]
[New Thread 0x4fcb of process 27639]
[New Thread 0x2ae3 of process 27639]
[New Thread 0x2e1f of process 27639]
[New Thread 0x2d47 of process 27639]
[New Thread 0x22d7 of process 27639]
[New Thread 0x4b03 of process 27639]
[New Thread 0x4c03 of process 27639]
[New Thread 0x4fdf of process 27639]
[New Thread 0x22a7 of process 27639]
[New Thread 0x2e23 of process 27639]
[New Thread 0x516b of process 27639]
[New Thread 0x1c6f of process 27639]
[New Thread 0x2a6b of process 27639]
[New Thread 0x1c27 of process 27639]
[New Thread 0x2f33 of process 27639]
[New Thread 0x4c6b of process 27639]
[New Thread 0x22ab of process 27639]
[New Thread 0x2a6f of process 27639]
[New Thread 0x2d4b of process 27639]
[New Thread 0x4fd3 of process 27639]
[New Thread 0x519f of process 27639]
[New Thread 0x1ca7 of process 27639]
[New Thread 0x4fd7 of process 27639]
[New Thread 0x2d83 of process 27639]
[New Thread 0x4b33 of process 27639]
[New Thread 0x4fb3 of process 27639]
[New Thread 0x512f of process 27639]
[New Thread 0x510f of process 27639]
[New Thread 0x1c03 of process 27639]
[New Thread 0x2db7 of process 27639]
[New Thread 0x22af of process 27639]
[New Thread 0x2a73 of process 27639]
[New Thread 0x2f37 of process 27639]
[New Thread 0x4ba7 of process 27639]
[New Thread 0x4c0f of process 27639]
[New Thread 0x1c07 of process 27639]
[New Thread 0x2dbb of process 27639]
[New Thread 0x2f3b of process 27639]
[New Thread 0x4c83 of process 27639]
[New Thread 0x4f5f of process 27639]
[New Thread 0x22b3 of process 27639]
[New Thread 0x2f3f of process 27639]
[New Thread 0x4bfb of process 27639]
[New Thread 0x4c27 of process 27639]
[New Thread 0x511b of process 27639]
[New Thread 0x2e9f of process 27639]
[New Thread 0x4f07 of process 27639]

Thread 75 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4f07 of process 27639]
0x00007fff28412029 in ?? ()
(gdb) thread 1
Thread ID 1 has terminated.
(gdb) bt full
#0  0x00007fff28412029 in ?? ()
No symbol table info available.
#1  0x000070000f517eb0 in ?? ()
No symbol table info available.
#2  0x00007fff31a43806 in ?? ()
No symbol table info available.
#3  0x000070000f517eb0 in ?? ()
No symbol table info available.
#4  0x00007fff202c000e in ?? ()
No symbol table info available.
#5  0x000000022cf81d50 in ?? ()
No symbol table info available.
#6  0x000000023c3cfc00 in ?? ()
No symbol table info available.
#7  0x000070000f517f80 in ?? ()
No symbol table info available.
#8  0x0000000000000001 in ?? ()
No symbol table info available.
#9  0x00007ffeefbf5e50 in ?? ()
No symbol table info available.
#10 0x000000022cfb6a70 in ?? ()
No symbol table info available.
#11 0x000070000f517ee0 in ?? ()
No symbol table info available.
#12 0x00007fff31a4376a in ?? ()
No symbol table info available.
#13 0x000000022cf91130 in ?? ()
No symbol table info available.
#14 0x00000001629b3800 in ?? ()
No symbol table info available.
#15 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 75 received signal SIGBUS, Bus error.
<function called from gdb>
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(backtrace_top) will be abandoned.
When the function is done executing, GDB will silently stop.

------------------------------------------------------------------------------

src/ $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs
Emacs debugging support has been installed.
(lldb) target create "../nextstep/Emacs.app/Contents/MacOS/Emacs"
Current executable set to '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64).
(lldb) r
Process 35748 launched: '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64)
2022-08-18 15:52:02.166968-0400 Emacs[35748:16508700] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=35748
2022-08-18 15:52:02.167149-0400 Emacs[35748:16508700] SecTaskCopyDebugDescription: Emacs[35748]/0#-1 LF=0
2022-08-18 15:52:03.643896-0400 Emacs[35748:16508700] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=35748
2022-08-18 15:52:03.644124-0400 Emacs[35748:16508700] SecTaskCopyDebugDescription: Emacs[35748]/0#-1 LF=0
2022-08-18 15:52:04.193721-0400 Emacs[35748:16508700] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=35748
2022-08-18 15:52:04.193931-0400 Emacs[35748:16508700] SecTaskCopyDebugDescription: Emacs[35748]/0#-1 LF=0
2022-08-18 15:52:08.383398-0400 Emacs[35748:16508700] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
2022-08-18 15:52:17.500613-0400 Emacs[35748:16508700] MTLIOAccelDevice bad MetalPluginClassName property (null)
2022-08-18 15:52:17.506912-0400 Emacs[35748:16508700] +[MTLIOAccelDevice registerDevices]: Zero Metal services found
2022-08-18 15:52:17.558383-0400 Emacs[35748:16508700] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x171657b3f
2022-08-18 15:52:17.597771-0400 Emacs[35748:16508700] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x171657b3f
2022-08-18 15:52:17.627444-0400 Emacs[35748:16508700] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x171657b3f
2022-08-18 15:52:17.750842-0400 Emacs[35748:16508700] flock failed to lock list file (/var/folders/wc/dtprc6t537s91rl6jj0m98040000gn/C//org.gnu.Emacs/com.apple.metal/31001/libraries.list): errno = 35
2022-08-18 15:52:17.751481-0400 Emacs[35748:16508700] flock failed to lock list file (/var/folders/wc/dtprc6t537s91rl6jj0m98040000gn/C//org.gnu.Emacs/com.apple.metal/31001/libraries1.list): errno = 35
2022-08-18 15:52:17.753735-0400 Emacs[35748:16508700] flock failed to lock list file (/var/folders/wc/dtprc6t537s91rl6jj0m98040000gn/C//org.gnu.Emacs/com.apple.metal/16777237_1116167/functions.list): errno = 35
2022-08-18 15:52:17.753803-0400 Emacs[35748:16508700] flock failed to lock list file (/var/folders/wc/dtprc6t537s91rl6jj0m98040000gn/C//org.gnu.Emacs/com.apple.metal/16777237_1116167/functions1.list): errno = 35
2022-08-18 15:52:23.495066-0400 Emacs[35748:16508700] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x171657b3f
2022-08-18 16:03:26.079022-0400 Emacs[35748:16508700] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x171657b3f
2022-08-18 16:03:26.845499-0400 Emacs[35748:16508700] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x171657b3f #### THIS REPEATS many times, cutting this off.
Process 35748 stopped
* thread #44, stop reason = EXC_BAD_ACCESS (code=2, address=0x718b828a0)
    frame #0: 0x0000000718b828a0
->  0x718b828a0: addb   %al, (%rax)
    0x718b828a2: addb   %al, (%rax)
    0x718b828a4: addb   %al, (%rax)
    0x718b828a6: addb   %al, (%rax)
Target 0: (Emacs) stopped.
(lldb)

------------------------------------------------------------------------------

(lldb) bt
* thread #44, stop reason = EXC_BAD_ACCESS (code=2, address=0x718b828a0)
  * frame #0: 0x0000000718b828a0
    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
(lldb)

------------------------------------------------------------------------------

(lldb) thread select 1
* thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
libsystem_kernel.dylib`__ulock_wait:
->  0x7fff204709de <+10>: jae    0x7fff204709e8            ; <+20>
    0x7fff204709e0 <+12>: movq   %rax, %rdi
    0x7fff204709e3 <+15>: jmp    0x7fff2046fac9            ; cerror_nocancel
    0x7fff204709e8 <+20>: retq
(lldb) bt
* thread #1, queue = 'com.apple.main-thread'
  * frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
    frame #1: 0x00007fff204a5f60 libsystem_pthread.dylib`_pthread_join + 362
    frame #2: 0x00007fff31a4287c AppleVPA`___lldb_unnamed_symbol456$$AppleVPA + 132
    frame #3: 0x00007fff31a3abde AppleVPA`___lldb_unnamed_symbol279$$AppleVPA + 72
    frame #4: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
    frame #5: 0x00007fff2053e583 CoreFoundation`__RELEASE_OBJECTS_IN_THE_ARRAY__ + 118
    frame #6: 0x00007fff2053e4c6 CoreFoundation`-[__NSArrayM dealloc] + 279
    frame #7: 0x00007fff2c082f12 MediaToolbox`___lldb_unnamed_symbol186$$MediaToolbox + 270
    frame #8: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
    frame #9: 0x00007fff28b7ce57 ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 1229
    frame #10: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
    frame #11: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
    frame #12: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
    frame #13: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
    frame #14: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
    frame #15: 0x00007fff250e82d0 CoreGraphics`imageProvider_retain_data + 77
    frame #16: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
    frame #17: 0x00007fff250e826b CoreGraphics`provider_for_destination_retain_data + 17
    frame #18: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
    frame #19: 0x00007fff250e80f6 CoreGraphics`CGAccessSessionCreate + 98
    frame #20: 0x00007fff250e9e57 CoreGraphics`get_access_session + 44
    frame #21: 0x00007fff250e954c CoreGraphics`img_raw_read + 1302
    frame #22: 0x00007fff251440f9 CoreGraphics`img_interpolate_read + 753
    frame #23: 0x00007fff250e75bc CoreGraphics`img_data_lock + 6164
    frame #24: 0x00007fff250e22f0 CoreGraphics`CGSImageDataLock + 1230
    frame #25: 0x00007fff250e1de9 CoreGraphics`RIPImageDataInitializeShared + 164
    frame #26: 0x00007fff250e1aaa CoreGraphics`RIPImageCacheGetRetained + 750
    frame #27: 0x00007fff250e1574 CoreGraphics`ripc_AcquireRIPImageData + 384
    frame #28: 0x00007fff250e02a1 CoreGraphics`ripc_DrawImage + 1180
    frame #29: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
    frame #30: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
    frame #31: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
    frame #32: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
    frame #33: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
    frame #34: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
    frame #35: 0x000000010049358c Emacs`ns_dumpglyphs_image(s=0x00007ffeefbfa220, r=(origin = (x = 10, y = 222), size = (width = 700, height = 507))) at nsterm.m:3952:7
    frame #36: 0x000000010048f75e Emacs`ns_draw_glyph_string(s=0x00007ffeefbfa220) at nsterm.m:4349:7
    frame #37: 0x0000000100092b81 Emacs`draw_glyphs(w=0x0000000106152630, x=672, row=0x000000010424f700, area=TEXT_AREA, start=0, end=20, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5
    frame #38: 0x000000010008f72d Emacs`gui_write_glyphs(w=0x0000000106152630, updated_row=0x000000010424f700, start=0x0000000103cc9a00, updated_area=TEXT_AREA, len=20) at xdisp.c:32509:7
    frame #39: 0x0000000100019566 Emacs`update_text_area(w=0x0000000106152630, updated_row=0x000000010424f700, vpos=1, partial_p=0x00007ffeefbfaa4e) at dispnew.c:3981:2
    frame #40: 0x000000010001726d Emacs`update_window_line(w=0x0000000106152630, vpos=1, mouse_face_overwritten_p=0x00007ffeefbfab12) at dispnew.c:4239:11
    frame #41: 0x0000000100009bc6 Emacs`update_window(w=0x0000000106152630, force_p=true) at dispnew.c:3719:19
    frame #42: 0x000000010000a212 Emacs`update_window_tree(w=0x0000000106152630, force_p=true) at dispnew.c:3444:14
    frame #43: 0x0000000100009278 Emacs`update_frame(f=0x0000000106153630, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3279:18
    frame #44: 0x000000010006dd0f Emacs`redisplay_internal at xdisp.c:17096:14
    frame #45: 0x00000001000763e9 Emacs`redisplay at xdisp.c:16103:3
    frame #46: 0x00000001001cf700 Emacs`read_char(commandflag=1, map=(EMACS_INT) $1 = 7654866048, prev_event=(struct Lisp_Symbol *) $4 = 0x0000000100bb11e0, used_mouse_menu=0x00007ffeefbfe58f, end_time=0x0000000000000000) at keyboard.c:2643:6
    frame #47: 0x00000001001cae45 Emacs`read_key_sequence(keybuf=(EMACS_INT) $6 = 110, prompt=(struct Lisp_Symbol *) $9 = 0x0000000100bb11e0, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10045:12
    frame #48: 0x00000001001c890e Emacs`command_loop_1 at keyboard.c:1384:15
    frame #49: 0x0000000100314451 Emacs`internal_condition_case(bfun=(Emacs`command_loop_1 at keyboard.c:1277), handlers=(struct Lisp_Symbol *) $12 = 0x0000000100bb1270, hfun=(Emacs`cmd_error at keyboard.c:935)) at eval.c:1497:25
    frame #50: 0x00000001001c8203 Emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $15 = 0x0000000100bb1270) at keyboard.c:1132:11
    frame #51: 0x00000001003134e6 Emacs`internal_catch(tag=(struct Lisp_Symbol *) $18 = 0x0000000100bbfbe0, func=(Emacs`command_loop_2 at keyboard.c:1128), arg=(struct Lisp_Symbol *) $21 = 0x0000000100bb1270) at eval.c:1220:25
    frame #52: 0x00000001001c7175 Emacs`command_loop at keyboard.c:1110:2
    frame #53: 0x00000001001c6f60 Emacs`recursive_edit_1 at keyboard.c:719:9
    frame #54: 0x00000001001c75a4 Emacs`Frecursive_edit at keyboard.c:802:3
    frame #55: 0x00000001001c3a2b Emacs`main(argc=1, argv=0x00007ffeefbff2e8) at emacs.c:2517:3
    frame #56: 0x00007fff204bff3d libdyld.dylib`start + 1
    frame #57: 0x00007fff204bff3d libdyld.dylib`start + 1
(lldb)

------------------------------------------------------------------------------


(lldb) bt all
* thread #1, queue = 'com.apple.main-thread'
  * frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
    frame #1: 0x00007fff204a5f60 libsystem_pthread.dylib`_pthread_join + 362
    frame #2: 0x00007fff31a4287c AppleVPA`___lldb_unnamed_symbol456$$AppleVPA + 132
    frame #3: 0x00007fff31a3abde AppleVPA`___lldb_unnamed_symbol279$$AppleVPA + 72
    frame #4: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
    frame #5: 0x00007fff2053e583 CoreFoundation`__RELEASE_OBJECTS_IN_THE_ARRAY__ + 118
    frame #6: 0x00007fff2053e4c6 CoreFoundation`-[__NSArrayM dealloc] + 279
    frame #7: 0x00007fff2c082f12 MediaToolbox`___lldb_unnamed_symbol186$$MediaToolbox + 270
    frame #8: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
    frame #9: 0x00007fff28b7ce57 ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 1229
    frame #10: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
    frame #11: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
    frame #12: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
    frame #13: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
    frame #14: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
    frame #15: 0x00007fff250e82d0 CoreGraphics`imageProvider_retain_data + 77
    frame #16: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
    frame #17: 0x00007fff250e826b CoreGraphics`provider_for_destination_retain_data + 17
    frame #18: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
    frame #19: 0x00007fff250e80f6 CoreGraphics`CGAccessSessionCreate + 98
    frame #20: 0x00007fff250e9e57 CoreGraphics`get_access_session + 44
    frame #21: 0x00007fff250e954c CoreGraphics`img_raw_read + 1302
    frame #22: 0x00007fff251440f9 CoreGraphics`img_interpolate_read + 753
    frame #23: 0x00007fff250e75bc CoreGraphics`img_data_lock + 6164
    frame #24: 0x00007fff250e22f0 CoreGraphics`CGSImageDataLock + 1230
    frame #25: 0x00007fff250e1de9 CoreGraphics`RIPImageDataInitializeShared + 164
    frame #26: 0x00007fff250e1aaa CoreGraphics`RIPImageCacheGetRetained + 750
    frame #27: 0x00007fff250e1574 CoreGraphics`ripc_AcquireRIPImageData + 384
    frame #28: 0x00007fff250e02a1 CoreGraphics`ripc_DrawImage + 1180
    frame #29: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
    frame #30: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
    frame #31: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
    frame #32: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
    frame #33: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
    frame #34: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
    frame #35: 0x000000010049358c Emacs`ns_dumpglyphs_image(s=0x00007ffeefbfa220, r=(origin = (x = 10, y = 222), size = (width = 700, height = 507))) at nsterm.m:3952:7
    frame #36: 0x000000010048f75e Emacs`ns_draw_glyph_string(s=0x00007ffeefbfa220) at nsterm.m:4349:7
    frame #37: 0x0000000100092b81 Emacs`draw_glyphs(w=0x0000000106152630, x=672, row=0x000000010424f700, area=TEXT_AREA, start=0, end=20, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5
    frame #38: 0x000000010008f72d Emacs`gui_write_glyphs(w=0x0000000106152630, updated_row=0x000000010424f700, start=0x0000000103cc9a00, updated_area=TEXT_AREA, len=20) at xdisp.c:32509:7
    frame #39: 0x0000000100019566 Emacs`update_text_area(w=0x0000000106152630, updated_row=0x000000010424f700, vpos=1, partial_p=0x00007ffeefbfaa4e) at dispnew.c:3981:2
    frame #40: 0x000000010001726d Emacs`update_window_line(w=0x0000000106152630, vpos=1, mouse_face_overwritten_p=0x00007ffeefbfab12) at dispnew.c:4239:11
    frame #41: 0x0000000100009bc6 Emacs`update_window(w=0x0000000106152630, force_p=true) at dispnew.c:3719:19
    frame #42: 0x000000010000a212 Emacs`update_window_tree(w=0x0000000106152630, force_p=true) at dispnew.c:3444:14
    frame #43: 0x0000000100009278 Emacs`update_frame(f=0x0000000106153630, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3279:18
    frame #44: 0x000000010006dd0f Emacs`redisplay_internal at xdisp.c:17096:14
    frame #45: 0x00000001000763e9 Emacs`redisplay at xdisp.c:16103:3
    frame #46: 0x00000001001cf700 Emacs`read_char(commandflag=1, map=(EMACS_INT) $23 = 7654866048, prev_event=(struct Lisp_Symbol *) $26 = 0x0000000100bb11e0, used_mouse_menu=0x00007ffeefbfe58f, end_time=0x0000000000000000) at keyboard.c:2643:6
    frame #47: 0x00000001001cae45 Emacs`read_key_sequence(keybuf=(EMACS_INT) $28 = 110, prompt=(struct Lisp_Symbol *) $31 = 0x0000000100bb11e0, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10045:12
    frame #48: 0x00000001001c890e Emacs`command_loop_1 at keyboard.c:1384:15
    frame #49: 0x0000000100314451 Emacs`internal_condition_case(bfun=(Emacs`command_loop_1 at keyboard.c:1277), handlers=(struct Lisp_Symbol *) $34 = 0x0000000100bb1270, hfun=(Emacs`cmd_error at keyboard.c:935)) at eval.c:1497:25
    frame #50: 0x00000001001c8203 Emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $37 = 0x0000000100bb1270) at keyboard.c:1132:11
    frame #51: 0x00000001003134e6 Emacs`internal_catch(tag=(struct Lisp_Symbol *) $40 = 0x0000000100bbfbe0, func=(Emacs`command_loop_2 at keyboard.c:1128), arg=(struct Lisp_Symbol *) $43 = 0x0000000100bb1270) at eval.c:1220:25
    frame #52: 0x00000001001c7175 Emacs`command_loop at keyboard.c:1110:2
    frame #53: 0x00000001001c6f60 Emacs`recursive_edit_1 at keyboard.c:719:9
    frame #54: 0x00000001001c75a4 Emacs`Frecursive_edit at keyboard.c:802:3
    frame #55: 0x00000001001c3a2b Emacs`main(argc=1, argv=0x00007ffeefbff2e8) at emacs.c:2517:3
    frame #56: 0x00007fff204bff3d libdyld.dylib`start + 1
    frame #57: 0x00007fff204bff3d libdyld.dylib`start + 1
  thread #4, name = 'gmain'
    frame #0: 0x00007fff20477646 libsystem_kernel.dylib`__select + 10
    frame #1: 0x000000010211c56b libglib-2.0.0.dylib`g_poll + 505
    frame #2: 0x000000010210fc2a libglib-2.0.0.dylib`g_main_context_iterate + 340
    frame #3: 0x000000010210fcd8 libglib-2.0.0.dylib`g_main_context_iteration + 55
    frame #4: 0x0000000102110e35 libglib-2.0.0.dylib`glib_worker_main + 30
    frame #5: 0x0000000102132ff2 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #6: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #7
    frame #0: 0x00007fff20473d52 libsystem_kernel.dylib`__pselect + 10
    frame #1: 0x00007fff20473c6f libsystem_kernel.dylib`pselect$DARWIN_EXTSN + 42
    frame #2: 0x0000000100472c7b Emacs`-[EmacsApp fd_handler:](self=0x000000010318e610, _cmd="fd_handler:", unused=0x0000000000000000) at nsterm.m:6303:20
    frame #3: 0x00007fff21325447 Foundation`__NSThread__start__ + 1068
    frame #4: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #5: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #9, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff2046f2aa libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff2046f61c libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff2059cecf CoreFoundation`__CFRunLoopServiceMachPort + 316
    frame #3: 0x00007fff2059b5af CoreFoundation`__CFRunLoopRun + 1328
    frame #4: 0x00007fff2059a9bc CoreFoundation`CFRunLoopRunSpecific + 563
    frame #5: 0x00007fff22f29bba AppKit`_NSEventThread + 124
    frame #6: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #32
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #36
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #37
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #38
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #40
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #41
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #42
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #43
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #44
    frame #0: 0x0000000718b828a0
    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
(lldb)

------------------------------------------------------------------------------
(lldb) xbacktrace
(unsigned char *) data = 0x0000000100540c8e "redisplay_internal (C function)"
(lldb)
——————————————————————————————————————

It can take quite a while to reproduce this, I was scrolling for over 5 minutes with the build on master+lldb.

> Did the SIGBUS thing happen when you did the image-scrolling thing
> that causes crashes?

I believe so, but not sure.


> On Aug 18, 2022, at 3:03 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: james@jojojames.com
>> Date: Thu, 18 Aug 2022 14:49:10 -0400
>> Cc: 57267@debbugs.gnu.org
>> 
>> ------------------------------------------------------------------------------
>> $ brew install gdb
> 
> Ouch, macOS!  You may need to use lldb, then, not GDB.  And that will
> make the job of finding the problem harder.
> 
>> Crash/hang takes a lot longer to reproduce (need to scroll thousands of images) in gdb.
>> 
>> Not sure if I correctly added the debug symbols to the build, doesn't seem like it from the trace.
> 
> No, there are no symbols (or at least GDB couldn't find them).  But I
> don't think you were in the right thread when you did that.  The Emacs
> main thread is always thread 1, not 42 or some other number.  So
> always say "thread 1" before "bt full".
> 
> Did the SIGBUS thing happen when you did the image-scrolling thing
> that causes crashes?






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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-18 20:14       ` james
@ 2022-08-19  5:55         ` Eli Zaretskii
  2022-08-19  6:01           ` james
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-08-19  5:55 UTC (permalink / raw)
  To: james; +Cc: 57267

> From: james@jojojames.com
> Date: Thu, 18 Aug 2022 16:14:26 -0400
> Cc: 57267@debbugs.gnu.org
> 
> Process 35748 stopped
> * thread #44, stop reason = EXC_BAD_ACCESS (code=2, address=0x718b828a0)
>     frame #0: 0x0000000718b828a0
> ->  0x718b828a0: addb   %al, (%rax)
>     0x718b828a2: addb   %al, (%rax)
>     0x718b828a4: addb   %al, (%rax)
>     0x718b828a6: addb   %al, (%rax)
> Target 0: (Emacs) stopped.
> (lldb)

Thread 44 doesn't look like our thread.  If it stopped due to
EXC_BAD_ACCESS, then I don't know what to say about this.

Thread 1, which is the main Lisp thread, seems to be inside the Apple
library that handles JPEG images:

> (lldb) thread select 1
> * thread #1, queue = 'com.apple.main-thread'
>     frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
> libsystem_kernel.dylib`__ulock_wait:
> ->  0x7fff204709de <+10>: jae    0x7fff204709e8            ; <+20>
>     0x7fff204709e0 <+12>: movq   %rax, %rdi
>     0x7fff204709e3 <+15>: jmp    0x7fff2046fac9            ; cerror_nocancel
>     0x7fff204709e8 <+20>: retq
> (lldb) bt
> * thread #1, queue = 'com.apple.main-thread'
>   * frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
>     frame #1: 0x00007fff204a5f60 libsystem_pthread.dylib`_pthread_join + 362
>     frame #2: 0x00007fff31a4287c AppleVPA`___lldb_unnamed_symbol456$$AppleVPA + 132
>     frame #3: 0x00007fff31a3abde AppleVPA`___lldb_unnamed_symbol279$$AppleVPA + 72
>     frame #4: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
>     frame #5: 0x00007fff2053e583 CoreFoundation`__RELEASE_OBJECTS_IN_THE_ARRAY__ + 118
>     frame #6: 0x00007fff2053e4c6 CoreFoundation`-[__NSArrayM dealloc] + 279
>     frame #7: 0x00007fff2c082f12 MediaToolbox`___lldb_unnamed_symbol186$$MediaToolbox + 270
>     frame #8: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
>     frame #9: 0x00007fff28b7ce57 ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 1229
>     frame #10: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
>     frame #11: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
>     frame #12: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
>     frame #13: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
>     frame #14: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
>     frame #15: 0x00007fff250e82d0 CoreGraphics`imageProvider_retain_data + 77
>     frame #16: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
>     frame #17: 0x00007fff250e826b CoreGraphics`provider_for_destination_retain_data + 17
>     frame #18: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
>     frame #19: 0x00007fff250e80f6 CoreGraphics`CGAccessSessionCreate + 98
>     frame #20: 0x00007fff250e9e57 CoreGraphics`get_access_session + 44
>     frame #21: 0x00007fff250e954c CoreGraphics`img_raw_read + 1302
>     frame #22: 0x00007fff251440f9 CoreGraphics`img_interpolate_read + 753
>     frame #23: 0x00007fff250e75bc CoreGraphics`img_data_lock + 6164
>     frame #24: 0x00007fff250e22f0 CoreGraphics`CGSImageDataLock + 1230
>     frame #25: 0x00007fff250e1de9 CoreGraphics`RIPImageDataInitializeShared + 164
>     frame #26: 0x00007fff250e1aaa CoreGraphics`RIPImageCacheGetRetained + 750
>     frame #27: 0x00007fff250e1574 CoreGraphics`ripc_AcquireRIPImageData + 384
>     frame #28: 0x00007fff250e02a1 CoreGraphics`ripc_DrawImage + 1180
>     frame #29: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
>     frame #30: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
>     frame #31: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
>     frame #32: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
>     frame #33: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
>     frame #34: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
>     frame #35: 0x000000010049358c Emacs`ns_dumpglyphs_image(s=0x00007ffeefbfa220, r=(origin = (x = 10, y = 222), size = (width = 700, height = 507))) at nsterm.m:3952:7
>     frame #36: 0x000000010048f75e Emacs`ns_draw_glyph_string(s=0x00007ffeefbfa220) at nsterm.m:4349:7
>     frame #37: 0x0000000100092b81 Emacs`draw_glyphs(w=0x0000000106152630, x=672, row=0x000000010424f700, area=TEXT_AREA, start=0, end=20, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5

So again, I don't see what that has to do with Emacs.

OTOH, redisplay works on macOS very differently from other platforms,
so maybe we are somehow causing this?





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-19  5:55         ` Eli Zaretskii
@ 2022-08-19  6:01           ` james
  2022-08-19  7:18             ` Gerd Möllmann
  0 siblings, 1 reply; 17+ messages in thread
From: james @ 2022-08-19  6:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57267

Here’s another trace, not sure if it would help or not.

Process 52957 stopped
* thread #113, stop reason = EXC_BAD_ACCESS (code=2, address=0x18abe96d0)
    frame #0: 0x000000018abe96d0
Target 0: (Emacs) stopped.
(lldb) bt
* thread #113, stop reason = EXC_BAD_ACCESS (code=2, address=0x18abe96d0)
  * frame #0: 0x000000018abe96d0
    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
(lldb) thread select 1
* thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff202cd0f8 libsystem_malloc.dylib`small_malloc_from_free_list + 531
libsystem_malloc.dylib`small_malloc_from_free_list:
->  0x7fff202cd0f8 <+531>: leaq   0x604d16b1(%rip), %rax    ; malloc_entropy
    0x7fff202cd0ff <+538>: movzwl 0x1(%rax), %eax
    0x7fff202cd103 <+542>: cmpl   %eax, %r8d
    0x7fff202cd106 <+545>: jne    0x7fff202cd147            ; <+610>
(lldb) bt all
* thread #1, queue = 'com.apple.main-thread'
  * frame #0: 0x00007fff202cd0f8 libsystem_malloc.dylib`small_malloc_from_free_list + 531
    frame #1: 0x00007fff202cc877 libsystem_malloc.dylib`small_malloc_should_clear + 259
    frame #2: 0x00007fff202cc692 libsystem_malloc.dylib`szone_malloc_should_clear + 109
    frame #3: 0x00007fff202e5f3b libsystem_malloc.dylib`_malloc_zone_malloc + 118
    frame #4: 0x00007fff2051ff87 CoreFoundation`_CFRuntimeCreateInstance + 587
    frame #5: 0x00007fff2bc86720 VideoToolbox`___lldb_unnamed_symbol1153$$VideoToolbox + 60
    frame #6: 0x00007fff2bc7c331 VideoToolbox`___lldb_unnamed_symbol1119$$VideoToolbox + 5933
    frame #7: 0x00007fff2bc7ab8b VideoToolbox`___lldb_unnamed_symbol1118$$VideoToolbox + 296
    frame #8: 0x00007fff2bc515b7 VideoToolbox`___lldb_unnamed_symbol778$$VideoToolbox + 663
    frame #9: 0x00007fff2bbd5ee3 VideoToolbox`___lldb_unnamed_symbol120$$VideoToolbox + 11943
    frame #10: 0x00007fff2bbb1a6e VideoToolbox`VTPixelTransferSessionTransferImage + 1259
    frame #11: 0x00007fff2c4e30b9 MediaToolbox`___lldb_unnamed_symbol11295$$MediaToolbox + 4079
    frame #12: 0x00007fff2c0515b9 MediaToolbox`FigPhotoScaleAndRotateSessionTransformForSize + 247
    frame #13: 0x00007fff2c3afdea MediaToolbox`___lldb_unnamed_symbol7966$$MediaToolbox + 2665
    frame #14: 0x00007fff2c3acb81 MediaToolbox`___lldb_unnamed_symbol7929$$MediaToolbox + 74
    frame #15: 0x00007fff2c060c88 MediaToolbox`FigPhotoDecompressionContainerCreateImageForIndex + 81
    frame #16: 0x00007fff28b7ccac ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 802
    frame #17: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
    frame #18: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
    frame #19: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
    frame #20: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
    frame #21: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
    frame #22: 0x00007fff250e076b CoreGraphics`CGImageCreateSubsampledImage + 594
    frame #23: 0x00007fff250e0000 CoreGraphics`ripc_DrawImage + 507
    frame #24: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
    frame #25: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
    frame #26: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
    frame #27: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
    frame #28: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
    frame #29: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
    frame #30: 0x000000010049358c Emacs`ns_dumpglyphs_image(s=0x00007ffeefbfa140, r=(origin = (x = 10, y = 586), size = (width = 1296, height = 143))) at nsterm.m:3952:7
    frame #31: 0x000000010048f75e Emacs`ns_draw_glyph_string(s=0x00007ffeefbfa140) at nsterm.m:4349:7
    frame #32: 0x0000000100092b81 Emacs`draw_glyphs(w=0x000000011f05c210, x=1142, row=0x000000014b818a00, area=TEXT_AREA, start=0, end=75, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5
    frame #33: 0x000000010008f72d Emacs`gui_write_glyphs(w=0x000000011f05c210, updated_row=0x000000014b818a00, start=0x00000001c4182400, updated_area=TEXT_AREA, len=75) at xdisp.c:32509:7
    frame #34: 0x0000000100019566 Emacs`update_text_area(w=0x000000011f05c210, updated_row=0x000000014b818a00, vpos=2, partial_p=0x00007ffeefbfaa4e) at dispnew.c:3981:2
    frame #35: 0x000000010001726d Emacs`update_window_line(w=0x000000011f05c210, vpos=2, mouse_face_overwritten_p=0x00007ffeefbfab12) at dispnew.c:4239:11
    frame #36: 0x0000000100009bc6 Emacs`update_window(w=0x000000011f05c210, force_p=true) at dispnew.c:3719:19
    frame #37: 0x000000010000a212 Emacs`update_window_tree(w=0x000000011f05c210, force_p=true) at dispnew.c:3444:14
    frame #38: 0x0000000100009278 Emacs`update_frame(f=0x000000011f05ba30, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3279:18
    frame #39: 0x000000010006dd0f Emacs`redisplay_internal at xdisp.c:17096:14
    frame #40: 0x00000001000763e9 Emacs`redisplay at xdisp.c:16103:3
    frame #41: 0x00000001001cf700 Emacs`read_char(commandflag=1, map=(EMACS_INT) $57 = 12384940296, prev_event=(struct Lisp_Symbol *) $60 = 0x0000000100bb11e0, used_mouse_menu=0x00007ffeefbfe58f, end_time=0x0000000000000000) at keyboard.c:2643:6
    frame #42: 0x00000001001cae45 Emacs`read_key_sequence(keybuf=(struct Lisp_Cons *) $62 = 0x00000000000001b0, prompt=(struct Lisp_Symbol *) $65 = 0x0000000100bb11e0, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10045:12
    frame #43: 0x00000001001c890e Emacs`command_loop_1 at keyboard.c:1384:15
    frame #44: 0x0000000100314451 Emacs`internal_condition_case(bfun=(Emacs`command_loop_1 at keyboard.c:1277), handlers=(struct Lisp_Symbol *) $68 = 0x0000000100bb1270, hfun=(Emacs`cmd_error at keyboard.c:935)) at eval.c:1497:25
    frame #45: 0x00000001001c8203 Emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $71 = 0x0000000100bb1270) at keyboard.c:1132:11
    frame #46: 0x00000001003134e6 Emacs`internal_catch(tag=(struct Lisp_Symbol *) $74 = 0x0000000100bbfbe0, func=(Emacs`command_loop_2 at keyboard.c:1128), arg=(struct Lisp_Symbol *) $77 = 0x0000000100bb1270) at eval.c:1220:25
    frame #47: 0x00000001001c7175 Emacs`command_loop at keyboard.c:1110:2
    frame #48: 0x00000001001c6f60 Emacs`recursive_edit_1 at keyboard.c:719:9
    frame #49: 0x00000001001c75a4 Emacs`Frecursive_edit at keyboard.c:802:3
    frame #50: 0x00000001001c3a2b Emacs`main(argc=1, argv=0x00007ffeefbff2e8) at emacs.c:2517:3
    frame #51: 0x00007fff204bff3d libdyld.dylib`start + 1
    frame #52: 0x00007fff204bff3d libdyld.dylib`start + 1
  thread #4, name = 'gmain'
    frame #0: 0x00007fff20477646 libsystem_kernel.dylib`__select + 10
    frame #1: 0x000000010211c56b libglib-2.0.0.dylib`g_poll + 505
    frame #2: 0x000000010210fc2a libglib-2.0.0.dylib`g_main_context_iterate + 340
    frame #3: 0x000000010210fcd8 libglib-2.0.0.dylib`g_main_context_iteration + 55
    frame #4: 0x0000000102110e35 libglib-2.0.0.dylib`glib_worker_main + 30
    frame #5: 0x0000000102132ff2 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #6: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #8
    frame #0: 0x00007fff20473d52 libsystem_kernel.dylib`__pselect + 10
    frame #1: 0x00007fff20473c6f libsystem_kernel.dylib`pselect$DARWIN_EXTSN + 42
    frame #2: 0x0000000100472c7b Emacs`-[EmacsApp fd_handler:](self=0x000000011e876440, _cmd="fd_handler:", unused=0x0000000000000000) at nsterm.m:6303:20
    frame #3: 0x00007fff21325447 Foundation`__NSThread__start__ + 1068
    frame #4: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #5: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #10, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff2046f2aa libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff2046f61c libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff2059cecf CoreFoundation`__CFRunLoopServiceMachPort + 316
    frame #3: 0x00007fff2059b5af CoreFoundation`__CFRunLoopRun + 1328
    frame #4: 0x00007fff2059a9bc CoreFoundation`CFRunLoopRunSpecific + 563
    frame #5: 0x00007fff22f29bba AppKit`_NSEventThread + 124
    frame #6: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #98
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #104
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #105
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #108
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #109
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #110
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #111
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #112
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #113
    frame #0: 0x000000018abe96d0
    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
(lldb) xbacktrace
(unsigned char *) data = 0x0000000100540c8e "redisplay_internal (C function)"
(lldb)


> On Aug 19, 2022, at 1:55 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: james@jojojames.com
>> Date: Thu, 18 Aug 2022 16:14:26 -0400
>> Cc: 57267@debbugs.gnu.org
>> 
>> Process 35748 stopped
>> * thread #44, stop reason = EXC_BAD_ACCESS (code=2, address=0x718b828a0)
>>    frame #0: 0x0000000718b828a0
>> ->  0x718b828a0: addb   %al, (%rax)
>>    0x718b828a2: addb   %al, (%rax)
>>    0x718b828a4: addb   %al, (%rax)
>>    0x718b828a6: addb   %al, (%rax)
>> Target 0: (Emacs) stopped.
>> (lldb)
> 
> Thread 44 doesn't look like our thread.  If it stopped due to
> EXC_BAD_ACCESS, then I don't know what to say about this.
> 
> Thread 1, which is the main Lisp thread, seems to be inside the Apple
> library that handles JPEG images:
> 
>> (lldb) thread select 1
>> * thread #1, queue = 'com.apple.main-thread'
>>    frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
>> libsystem_kernel.dylib`__ulock_wait:
>> ->  0x7fff204709de <+10>: jae    0x7fff204709e8            ; <+20>
>>    0x7fff204709e0 <+12>: movq   %rax, %rdi
>>    0x7fff204709e3 <+15>: jmp    0x7fff2046fac9            ; cerror_nocancel
>>    0x7fff204709e8 <+20>: retq
>> (lldb) bt
>> * thread #1, queue = 'com.apple.main-thread'
>>  * frame #0: 0x00007fff204709de libsystem_kernel.dylib`__ulock_wait + 10
>>    frame #1: 0x00007fff204a5f60 libsystem_pthread.dylib`_pthread_join + 362
>>    frame #2: 0x00007fff31a4287c AppleVPA`___lldb_unnamed_symbol456$$AppleVPA + 132
>>    frame #3: 0x00007fff31a3abde AppleVPA`___lldb_unnamed_symbol279$$AppleVPA + 72
>>    frame #4: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
>>    frame #5: 0x00007fff2053e583 CoreFoundation`__RELEASE_OBJECTS_IN_THE_ARRAY__ + 118
>>    frame #6: 0x00007fff2053e4c6 CoreFoundation`-[__NSArrayM dealloc] + 279
>>    frame #7: 0x00007fff2c082f12 MediaToolbox`___lldb_unnamed_symbol186$$MediaToolbox + 270
>>    frame #8: 0x00007fff2066775a CoreFoundation`_CFRelease + 244
>>    frame #9: 0x00007fff28b7ce57 ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 1229
>>    frame #10: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
>>    frame #11: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
>>    frame #12: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
>>    frame #13: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
>>    frame #14: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
>>    frame #15: 0x00007fff250e82d0 CoreGraphics`imageProvider_retain_data + 77
>>    frame #16: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
>>    frame #17: 0x00007fff250e826b CoreGraphics`provider_for_destination_retain_data + 17
>>    frame #18: 0x00007fff250e8246 CoreGraphics`CGDataProviderRetainData + 75
>>    frame #19: 0x00007fff250e80f6 CoreGraphics`CGAccessSessionCreate + 98
>>    frame #20: 0x00007fff250e9e57 CoreGraphics`get_access_session + 44
>>    frame #21: 0x00007fff250e954c CoreGraphics`img_raw_read + 1302
>>    frame #22: 0x00007fff251440f9 CoreGraphics`img_interpolate_read + 753
>>    frame #23: 0x00007fff250e75bc CoreGraphics`img_data_lock + 6164
>>    frame #24: 0x00007fff250e22f0 CoreGraphics`CGSImageDataLock + 1230
>>    frame #25: 0x00007fff250e1de9 CoreGraphics`RIPImageDataInitializeShared + 164
>>    frame #26: 0x00007fff250e1aaa CoreGraphics`RIPImageCacheGetRetained + 750
>>    frame #27: 0x00007fff250e1574 CoreGraphics`ripc_AcquireRIPImageData + 384
>>    frame #28: 0x00007fff250e02a1 CoreGraphics`ripc_DrawImage + 1180
>>    frame #29: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
>>    frame #30: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
>>    frame #31: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
>>    frame #32: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
>>    frame #33: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
>>    frame #34: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
>>    frame #35: 0x000000010049358c Emacs`ns_dumpglyphs_image(s=0x00007ffeefbfa220, r=(origin = (x = 10, y = 222), size = (width = 700, height = 507))) at nsterm.m:3952:7
>>    frame #36: 0x000000010048f75e Emacs`ns_draw_glyph_string(s=0x00007ffeefbfa220) at nsterm.m:4349:7
>>    frame #37: 0x0000000100092b81 Emacs`draw_glyphs(w=0x0000000106152630, x=672, row=0x000000010424f700, area=TEXT_AREA, start=0, end=20, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5
> 
> So again, I don't see what that has to do with Emacs.
> 
> OTOH, redisplay works on macOS very differently from other platforms,
> so maybe we are somehow causing this?






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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-19  6:01           ` james
@ 2022-08-19  7:18             ` Gerd Möllmann
  2022-08-19  7:22               ` Gerd Möllmann
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Möllmann @ 2022-08-19  7:18 UTC (permalink / raw)
  To: james; +Cc: 57267, Eli Zaretskii

This could be heap corruption, I think.

Can you please build Emacs with ASAN?  Something like:

  git clean -xdf
  ./autogen.sh
  ./configure CFLAGS="-g -O0 -fsanitize=address -fno-omit-frame-pointer" \
              LDFLAGS="-fsanitize=address -fno-omit-frame-pointer"
  make

Everything above in the root of your Git worktree.

Then start Emacs like this:

  cd src
  lldb emacs
  run

and do what you did to make it crash.  If it's a heap corruption, and
ASAN can detect it, it will break into LLDB at that point.  Then please
print backtraces and so on, as Eli said.





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-19  7:18             ` Gerd Möllmann
@ 2022-08-19  7:22               ` Gerd Möllmann
  2022-08-19 14:18                 ` james
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Möllmann @ 2022-08-19  7:22 UTC (permalink / raw)
  To: james; +Cc: 57267, Eli Zaretskii

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

> This could be heap corruption, I think.
>
> Can you please build Emacs with ASAN?  Something like:
>
>   git clean -xdf

Sorry I forgot: before that, please also git pull, and show what Git
version you are using.

  git log --oneline -1 





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-19  7:22               ` Gerd Möllmann
@ 2022-08-19 14:18                 ` james
  2022-08-20  6:34                   ` Gerd Möllmann
  0 siblings, 1 reply; 17+ messages in thread
From: james @ 2022-08-19 14:18 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 57267, Eli Zaretskii

-------------------------------------------------------------------------------
$ git log --oneline -1
8f1d0295bc (HEAD -> master, origin/master, origin/HEAD) Speed up image-dired-display-image
(END)
-------------------------------------------------------------------------------
src/ $ lldb emacs
Emacs debugging support has been installed.
(lldb) target create "emacs"
Current executable set to '/Users/james/Code/emacs/src/emacs' (x86_64).
(lldb) r
Process 92880 launched: '/Users/james/Code/emacs/src/emacs' (x86_64)
2022-08-19 10:09:18.742470-0400 emacs[92880:17395371] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=92880
2022-08-19 10:09:18.742614-0400 emacs[92880:17395371] SecTaskCopyDebugDescription: emacs[92880]/0#-1 LF=0
2022-08-19 10:09:20.003006-0400 emacs[92880:17395371] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=92880
2022-08-19 10:09:20.003162-0400 emacs[92880:17395371] SecTaskCopyDebugDescription: emacs[92880]/0#-1 LF=0
2022-08-19 10:09:20.622858-0400 emacs[92880:17395371] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=92880
2022-08-19 10:09:20.622985-0400 emacs[92880:17395371] SecTaskCopyDebugDescription: emacs[92880]/0#-1 LF=0
2022-08-19 10:09:20.623744-0400 emacs[92880:17395371] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=92880
2022-08-19 10:09:20.623835-0400 emacs[92880:17395371] SecTaskCopyDebugDescription: emacs[92880]/0#-1 LF=0
2022-08-19 10:09:42.014642-0400 emacs[92880:17395371] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
2022-08-19 10:09:53.021061-0400 emacs[92880:17395371] MTLIOAccelDevice bad MetalPluginClassName property (null)
2022-08-19 10:09:53.024056-0400 emacs[92880:17395371] +[MTLIOAccelDevice registerDevices]: Zero Metal services found
2022-08-19 10:09:53.075267-0400 emacs[92880:17395371] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x12651cb3f
2022-08-19 10:09:53.126184-0400 emacs[92880:17395371] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x12651cb3f
2022-08-19 10:09:53.160436-0400 emacs[92880:17395371] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x12651cb3f
2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory)
2022-08-19 10:09:53.301916-0400 emacs[92880:17395371] Errors found! Invalidating cache...
2022-08-19 10:09:53.442872-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory)
2022-08-19 10:09:53.442902-0400 emacs[92880:17395371] Errors found! Invalidating cache...
2022-08-19 10:09:58.789535-0400 emacs[92880:17395371] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x12651cb3f
2022-08-19 10:09:59.866566-0400 emacs[92880:17395371] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x12651cb3f
2022-08-19 10:10:00.138473-0400 emacs[92880:17395371] VPA info: plugin is INTEL, AVD_id = 1080080, AVD_api.Create:0x12651cb3f
Process 92880 stopped
* thread #17, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
error: memory read failed for 0x0
Target 0: (emacs) stopped.
-------------------------------------------------------------------------------
(lldb) bt
* thread #17, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
-------------------------------------------------------------------------------
(lldb) thread select 1
* thread #1, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff2046fd76 libsystem_kernel.dylib`__mmap + 10
libsystem_kernel.dylib`__mmap:
->  0x7fff2046fd76 <+10>: jae    0x7fff2046fd80            ; <+20>
    0x7fff2046fd78 <+12>: movq   %rax, %rdi
    0x7fff2046fd7b <+15>: jmp    0x7fff2046fac9            ; cerror_nocancel
    0x7fff2046fd80 <+20>: retq
-------------------------------------------------------------------------------
(lldb) bt
* thread #1, queue = 'com.apple.main-thread'
  * frame #0: 0x00007fff2046fd76 libsystem_kernel.dylib`__mmap + 10
    frame #1: 0x0000000102f00609 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_mmap(void*, unsigned long, int, int, int, unsigned long long) + 25
    frame #2: 0x0000000102f03690 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl(unsigned long, unsigned long, bool, char const*) + 128
    frame #3: 0x0000000102eacea6 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >::PopulateFreeArray(__sanitizer::AllocatorStats*, unsigned long, __sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >::RegionInfo*, unsigned long) + 230
    frame #4: 0x0000000102eacd7d libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >::GetFromAllocator(__sanitizer::AllocatorStats*, unsigned long, unsigned int*, unsigned long) + 621
    frame #5: 0x0000000102eaca56 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> > >::Refill(__sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> > >::PerClass*, __sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >*, unsigned long) + 54
    frame #6: 0x0000000102eac709 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >, __sanitizer::LargeMmapAllocatorPtrArrayDynamic>::Allocate(__sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> > >*, unsigned long, unsigned long) + 489
    frame #7: 0x0000000102ea8320 libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType, bool) + 592
    frame #8: 0x0000000102ea80a9 libclang_rt.asan_osx_dynamic.dylib`__asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*) + 41
    frame #9: 0x0000000102ee93ff libclang_rt.asan_osx_dynamic.dylib`wrap_malloc + 255
    frame #10: 0x00007fff2843e5a6 Metal`-[MTLResourceList initWithCapacity:] + 143
    frame #11: 0x00007fff2843e4ad Metal`MTLResourceListPoolCreateResourceList + 118
    frame #12: 0x00007fff2843e2b9 Metal`MTLIOAccelCommandBufferStorageCreateExt + 365
    frame #13: 0x00007fff2843e09e Metal`MTLIOAccelCommandBufferStoragePoolCreateStorage + 102
    frame #14: 0x00007fff2843db2d Metal`-[MTLIOAccelCommandBuffer initWithQueue:retainedReferences:synchronousDebugMode:] + 148
    frame #15: 0x00007fff6522af75 AppleIntelICLGraphicsMTLDriver`-[MTLIGAccelCommandBuffer initWithQueue:retainedReferences:synchronousDebugMode:] + 54
    frame #16: 0x00007fff6522adc0 AppleIntelICLGraphicsMTLDriver`-[MTLIGAccelCommandBuffer initWithQueue:retainedReferences:] + 56
    frame #17: 0x00007fff651e8829 AppleIntelICLGraphicsMTLDriver`-[MTLIGAccelCommandQueue commandBuffer] + 45
    frame #18: 0x00007fff2bc7db7c VideoToolbox`___lldb_unnamed_symbol1120$$VideoToolbox + 2281
    frame #19: 0x00007fff2bbb3e81 VideoToolbox`VTMetalTransferSessionTransferImageSync + 297
    frame #20: 0x00007fff2bbd5f07 VideoToolbox`___lldb_unnamed_symbol120$$VideoToolbox + 11979
    frame #21: 0x00007fff2bbb1a6e VideoToolbox`VTPixelTransferSessionTransferImage + 1259
    frame #22: 0x00007fff2c4e30b9 MediaToolbox`___lldb_unnamed_symbol11295$$MediaToolbox + 4079
    frame #23: 0x00007fff2c4e38ac MediaToolbox`___lldb_unnamed_symbol11295$$MediaToolbox + 6114
    frame #24: 0x00007fff2c0515b9 MediaToolbox`FigPhotoScaleAndRotateSessionTransformForSize + 247
    frame #25: 0x00007fff2c3afdea MediaToolbox`___lldb_unnamed_symbol7966$$MediaToolbox + 2665
    frame #26: 0x00007fff2c3acb81 MediaToolbox`___lldb_unnamed_symbol7929$$MediaToolbox + 74
    frame #27: 0x00007fff2c060c88 MediaToolbox`FigPhotoDecompressionContainerCreateImageForIndex + 81
    frame #28: 0x00007fff28b7ccac ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 802
    frame #29: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
    frame #30: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
    frame #31: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
    frame #32: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
    frame #33: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
    frame #34: 0x00007fff250e076b CoreGraphics`CGImageCreateSubsampledImage + 594
    frame #35: 0x00007fff250e0000 CoreGraphics`ripc_DrawImage + 507
    frame #36: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
    frame #37: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
    frame #38: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
    frame #39: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
    frame #40: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
    frame #41: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
    frame #42: 0x0000000100a1a9ce emacs`ns_dumpglyphs_image(s=0x00007ffeefbf5a60, r=(origin = (x = 10, y = 566), size = (width = 700, height = 163))) at nsterm.m:3952:7
    frame #43: 0x0000000100a08bf9 emacs`ns_draw_glyph_string(s=0x00007ffeefbf5a60) at nsterm.m:4349:7
    frame #44: 0x000000010019cf87 emacs`draw_glyphs(w=0x0000621002048520, x=348, row=0x000062a00001e600, area=TEXT_AREA, start=0, end=26, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5
    frame #45: 0x0000000100193680 emacs`gui_write_glyphs(w=0x0000621002048520, updated_row=0x000062a00001e600, start=0x000062600036f100, updated_area=TEXT_AREA, len=26) at xdisp.c:32509:7
    frame #46: 0x0000000100048563 emacs`update_text_area(w=0x0000621002048520, updated_row=0x000062a00001e600, vpos=4, partial_p=0x00007ffeefbf8000) at dispnew.c:3981:2
    frame #47: 0x000000010003e371 emacs`update_window_line(w=0x0000621002048520, vpos=4, mouse_face_overwritten_p=0x00007ffeefbf83a0) at dispnew.c:4239:11
    frame #48: 0x0000000100013e1d emacs`update_window(w=0x0000621002048520, force_p=true) at dispnew.c:3719:19
    frame #49: 0x00000001000154dc emacs`update_window_tree(w=0x0000621002048520, force_p=true) at dispnew.c:3444:14
    frame #50: 0x0000000100012156 emacs`update_frame(f=0x0000621002046130, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3279:18
    frame #51: 0x0000000100122312 emacs`redisplay_internal at xdisp.c:17096:14
    frame #52: 0x0000000100135fd9 emacs`redisplay at xdisp.c:16103:3
    frame #53: 0x00000001004a9efe emacs`read_char(commandflag=1, map=(EMACS_INT) $1 = 27092655099956, prev_event=(struct Lisp_Symbol *) $4 = 0x000000010125d880, used_mouse_menu=0x00007ffeefbfd340, end_time=0x0000000000000000) at keyboard.c:2643:6
    frame #54: 0x00000001004a1b04 emacs`read_key_sequence(keybuf=(struct Lisp_Symbol *) $7 = 0x000000010125d880, prompt=(struct Lisp_Symbol *) $10 = 0x000000010125d880, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10045:12
    frame #55: 0x000000010049bf96 emacs`command_loop_1 at keyboard.c:1384:15
    frame #56: 0x0000000100713bc9 emacs`internal_condition_case(bfun=(emacs`command_loop_1 at keyboard.c:1277), handlers=(struct Lisp_Symbol *) $13 = 0x000000010125d910, hfun=(emacs`cmd_error at keyboard.c:935)) at eval.c:1497:25
    frame #57: 0x000000010049b013 emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $16 = 0x000000010125d910) at keyboard.c:1132:11
    frame #58: 0x0000000100712009 emacs`internal_catch(tag=(struct Lisp_Symbol *) $19 = 0x000000010126c280, func=(emacs`command_loop_2 at keyboard.c:1128), arg=(struct Lisp_Symbol *) $22 = 0x000000010125d910) at eval.c:1220:25
    frame #59: 0x000000010049919f emacs`command_loop at keyboard.c:1110:2
    frame #60: 0x0000000100498c8e emacs`recursive_edit_1 at keyboard.c:719:9
    frame #61: 0x0000000100499b33 emacs`Frecursive_edit at keyboard.c:802:3
    frame #62: 0x00000001004918be emacs`main(argc=1, argv=0x00007ffeefbff310) at emacs.c:2517:3
    frame #63: 0x00007fff204bff3d libdyld.dylib`start + 1
-------------------------------------------------------------------------------
(lldb) bt all
* thread #1, queue = 'com.apple.main-thread'
  * frame #0: 0x00007fff2046fd76 libsystem_kernel.dylib`__mmap + 10
    frame #1: 0x0000000102f00609 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::internal_mmap(void*, unsigned long, int, int, int, unsigned long long) + 25
    frame #2: 0x0000000102f03690 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::MmapFixedImpl(unsigned long, unsigned long, bool, char const*) + 128
    frame #3: 0x0000000102eacea6 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >::PopulateFreeArray(__sanitizer::AllocatorStats*, unsigned long, __sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >::RegionInfo*, unsigned long) + 230
    frame #4: 0x0000000102eacd7d libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >::GetFromAllocator(__sanitizer::AllocatorStats*, unsigned long, unsigned int*, unsigned long) + 621
    frame #5: 0x0000000102eaca56 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> > >::Refill(__sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> > >::PerClass*, __sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >*, unsigned long) + 54
    frame #6: 0x0000000102eac709 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::CombinedAllocator<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> >, __sanitizer::LargeMmapAllocatorPtrArrayDynamic>::Allocate(__sanitizer::SizeClassAllocator64LocalCache<__sanitizer::SizeClassAllocator64<__asan::AP64<__sanitizer::LocalAddressSpaceView> > >*, unsigned long, unsigned long) + 489
    frame #7: 0x0000000102ea8320 libclang_rt.asan_osx_dynamic.dylib`__asan::Allocator::Allocate(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType, bool) + 592
    frame #8: 0x0000000102ea80a9 libclang_rt.asan_osx_dynamic.dylib`__asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*) + 41
    frame #9: 0x0000000102ee93ff libclang_rt.asan_osx_dynamic.dylib`wrap_malloc + 255
    frame #10: 0x00007fff2843e5a6 Metal`-[MTLResourceList initWithCapacity:] + 143
    frame #11: 0x00007fff2843e4ad Metal`MTLResourceListPoolCreateResourceList + 118
    frame #12: 0x00007fff2843e2b9 Metal`MTLIOAccelCommandBufferStorageCreateExt + 365
    frame #13: 0x00007fff2843e09e Metal`MTLIOAccelCommandBufferStoragePoolCreateStorage + 102
    frame #14: 0x00007fff2843db2d Metal`-[MTLIOAccelCommandBuffer initWithQueue:retainedReferences:synchronousDebugMode:] + 148
    frame #15: 0x00007fff6522af75 AppleIntelICLGraphicsMTLDriver`-[MTLIGAccelCommandBuffer initWithQueue:retainedReferences:synchronousDebugMode:] + 54
    frame #16: 0x00007fff6522adc0 AppleIntelICLGraphicsMTLDriver`-[MTLIGAccelCommandBuffer initWithQueue:retainedReferences:] + 56
    frame #17: 0x00007fff651e8829 AppleIntelICLGraphicsMTLDriver`-[MTLIGAccelCommandQueue commandBuffer] + 45
    frame #18: 0x00007fff2bc7db7c VideoToolbox`___lldb_unnamed_symbol1120$$VideoToolbox + 2281
    frame #19: 0x00007fff2bbb3e81 VideoToolbox`VTMetalTransferSessionTransferImageSync + 297
    frame #20: 0x00007fff2bbd5f07 VideoToolbox`___lldb_unnamed_symbol120$$VideoToolbox + 11979
    frame #21: 0x00007fff2bbb1a6e VideoToolbox`VTPixelTransferSessionTransferImage + 1259
    frame #22: 0x00007fff2c4e30b9 MediaToolbox`___lldb_unnamed_symbol11295$$MediaToolbox + 4079
    frame #23: 0x00007fff2c4e38ac MediaToolbox`___lldb_unnamed_symbol11295$$MediaToolbox + 6114
    frame #24: 0x00007fff2c0515b9 MediaToolbox`FigPhotoScaleAndRotateSessionTransformForSize + 247
    frame #25: 0x00007fff2c3afdea MediaToolbox`___lldb_unnamed_symbol7966$$MediaToolbox + 2665
    frame #26: 0x00007fff2c3acb81 MediaToolbox`___lldb_unnamed_symbol7929$$MediaToolbox + 74
    frame #27: 0x00007fff2c060c88 MediaToolbox`FigPhotoDecompressionContainerCreateImageForIndex + 81
    frame #28: 0x00007fff28b7ccac ImageIO`AppleJPEGReadPlugin::copyIOSurfaceCallback(InfoRec*, CGImageProvider*, __CFDictionary const*) + 802
    frame #29: 0x00007fff28b7d570 ImageIO`AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, __CFDictionary const*) + 154
    frame #30: 0x00007fff28b0f679 ImageIO`AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1955
    frame #31: 0x00007fff28b0e998 ImageIO`IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100
    frame #32: 0x00007fff28b2c527 ImageIO`IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 663
    frame #33: 0x00007fff28b0e8d0 ImageIO`IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 680
    frame #34: 0x00007fff250e076b CoreGraphics`CGImageCreateSubsampledImage + 594
    frame #35: 0x00007fff250e0000 CoreGraphics`ripc_DrawImage + 507
    frame #36: 0x00007fff250df4f7 CoreGraphics`CGContextDrawImageWithOptions + 454
    frame #37: 0x00007fff22f119c5 AppKit`__74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 902
    frame #38: 0x00007fff22f114fa AppKit`-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
    frame #39: 0x00007fff233b1dbc AppKit`__71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 967
    frame #40: 0x00007fff22eea8b9 AppKit`-[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
    frame #41: 0x00007fff22f10ec1 AppKit`-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1359
    frame #42: 0x0000000100a1a9ce emacs`ns_dumpglyphs_image(s=0x00007ffeefbf5a60, r=(origin = (x = 10, y = 566), size = (width = 700, height = 163))) at nsterm.m:3952:7
    frame #43: 0x0000000100a08bf9 emacs`ns_draw_glyph_string(s=0x00007ffeefbf5a60) at nsterm.m:4349:7
    frame #44: 0x000000010019cf87 emacs`draw_glyphs(w=0x0000621002048520, x=348, row=0x000062a00001e600, area=TEXT_AREA, start=0, end=26, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:30449:5
    frame #45: 0x0000000100193680 emacs`gui_write_glyphs(w=0x0000621002048520, updated_row=0x000062a00001e600, start=0x000062600036f100, updated_area=TEXT_AREA, len=26) at xdisp.c:32509:7
    frame #46: 0x0000000100048563 emacs`update_text_area(w=0x0000621002048520, updated_row=0x000062a00001e600, vpos=4, partial_p=0x00007ffeefbf8000) at dispnew.c:3981:2
    frame #47: 0x000000010003e371 emacs`update_window_line(w=0x0000621002048520, vpos=4, mouse_face_overwritten_p=0x00007ffeefbf83a0) at dispnew.c:4239:11
    frame #48: 0x0000000100013e1d emacs`update_window(w=0x0000621002048520, force_p=true) at dispnew.c:3719:19
    frame #49: 0x00000001000154dc emacs`update_window_tree(w=0x0000621002048520, force_p=true) at dispnew.c:3444:14
    frame #50: 0x0000000100012156 emacs`update_frame(f=0x0000621002046130, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3279:18
    frame #51: 0x0000000100122312 emacs`redisplay_internal at xdisp.c:17096:14
    frame #52: 0x0000000100135fd9 emacs`redisplay at xdisp.c:16103:3
    frame #53: 0x00000001004a9efe emacs`read_char(commandflag=1, map=(EMACS_INT) $24 = 27092655099956, prev_event=(struct Lisp_Symbol *) $27 = 0x000000010125d880, used_mouse_menu=0x00007ffeefbfd340, end_time=0x0000000000000000) at keyboard.c:2643:6
    frame #54: 0x00000001004a1b04 emacs`read_key_sequence(keybuf=(struct Lisp_Symbol *) $30 = 0x000000010125d880, prompt=(struct Lisp_Symbol *) $33 = 0x000000010125d880, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10045:12
    frame #55: 0x000000010049bf96 emacs`command_loop_1 at keyboard.c:1384:15
    frame #56: 0x0000000100713bc9 emacs`internal_condition_case(bfun=(emacs`command_loop_1 at keyboard.c:1277), handlers=(struct Lisp_Symbol *) $36 = 0x000000010125d910, hfun=(emacs`cmd_error at keyboard.c:935)) at eval.c:1497:25
    frame #57: 0x000000010049b013 emacs`command_loop_2(handlers=(struct Lisp_Symbol *) $39 = 0x000000010125d910) at keyboard.c:1132:11
    frame #58: 0x0000000100712009 emacs`internal_catch(tag=(struct Lisp_Symbol *) $42 = 0x000000010126c280, func=(emacs`command_loop_2 at keyboard.c:1128), arg=(struct Lisp_Symbol *) $45 = 0x000000010125d910) at eval.c:1220:25
    frame #59: 0x000000010049919f emacs`command_loop at keyboard.c:1110:2
    frame #60: 0x0000000100498c8e emacs`recursive_edit_1 at keyboard.c:719:9
    frame #61: 0x0000000100499b33 emacs`Frecursive_edit at keyboard.c:802:3
    frame #62: 0x00000001004918be emacs`main(argc=1, argv=0x00007ffeefbff310) at emacs.c:2517:3
    frame #63: 0x00007fff204bff3d libdyld.dylib`start + 1
  thread #4, name = 'gmain'
    frame #0: 0x00007fff20477646 libsystem_kernel.dylib`__select + 10
    frame #1: 0x00000001029f056b libglib-2.0.0.dylib`g_poll + 505
    frame #2: 0x00000001029e3c2a libglib-2.0.0.dylib`g_main_context_iterate + 340
    frame #3: 0x00000001029e3cd8 libglib-2.0.0.dylib`g_main_context_iteration + 55
    frame #4: 0x00000001029e4e35 libglib-2.0.0.dylib`glib_worker_main + 30
    frame #5: 0x0000000102a06ff2 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #6: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #5
    frame #0: 0x00007fff20473d52 libsystem_kernel.dylib`__pselect + 10
    frame #1: 0x00007fff20473c6f libsystem_kernel.dylib`pselect$DARWIN_EXTSN + 42
    frame #2: 0x00000001009b2be5 emacs`-[EmacsApp fd_handler:](self=0x0000612000024640, _cmd="fd_handler:", unused=0x0000000000000000) at nsterm.m:6303:20
    frame #3: 0x00007fff21325447 Foundation`__NSThread__start__ + 1068
    frame #4: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #5: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #6, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff2046f2aa libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff2046f61c libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff2059cecf CoreFoundation`__CFRunLoopServiceMachPort + 316
    frame #3: 0x00007fff2059b5af CoreFoundation`__CFRunLoopRun + 1328
    frame #4: 0x00007fff2059a9bc CoreFoundation`CFRunLoopRunSpecific + 563
    frame #5: 0x00007fff22f29bba AppKit`_NSEventThread + 124
    frame #6: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
  thread #8
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #10
    frame #0: 0x00007fff2047094e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff204a14c1 libsystem_pthread.dylib`_pthread_wqthread + 414
    frame #2: 0x00007fff204a042f libsystem_pthread.dylib`start_wqthread + 15
  thread #11
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #13
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #14
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #15
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #16
    frame #0: 0x00007fff204a0420 libsystem_pthread.dylib`start_wqthread
  thread #17
    frame #0: 0x0000000000000000
    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start + 15
(lldb)

-------------------------------------------------------------------------------

2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)

This time I had to use:

/Users/james/Code/emacs/src/emacs

instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which crashed on startup)

-------------------------------------------------------------------------------


> On Aug 19, 2022, at 3:22 AM, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> 
>> This could be heap corruption, I think.
>> 
>> Can you please build Emacs with ASAN?  Something like:
>> 
>>  git clean -xdf
> 
> Sorry I forgot: before that, please also git pull, and show what Git
> version you are using.
> 
>  git log --oneline -1 






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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-19 14:18                 ` james
@ 2022-08-20  6:34                   ` Gerd Möllmann
  2022-08-20 16:23                     ` james
  0 siblings, 1 reply; 17+ messages in thread
From: Gerd Möllmann @ 2022-08-20  6:34 UTC (permalink / raw)
  To: james; +Cc: 57267, Eli Zaretskii

james@jojojames.com writes:

>
> -------------------------------------------------------------------------------
> $ git log --oneline -1
> 8f1d0295bc (HEAD -> master, origin/master, origin/HEAD) Speed up image-dired-display-image
> (END)
> -------------------------------------------------------------------------------

Thanks.

> Process 92880 stopped
> * thread #17, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
>     frame #0: 0x0000000000000000
> error: memory read failed for 0x0
> Target 0: (emacs) stopped.

Too bad, that means ASAN didn't find a problem before the bad access happens.

> (lldb) bt
> * thread #1, queue = 'com.apple.main-thread'
...
>     frame #42: 0x0000000100a1a9ce emacs`ns_dumpglyphs_image(s=0x00007ffeefbf5a60, r=(origin = (x = 10, y = 566), size = (width = 700, h>     frame #50: 0x0000000100012156 emacs`update_frame(f=0x0000621002046130, force_p=true, inhibit_hairy_id_p=false) at dispnew.c:3279:18
>     frame #51: 0x0000000100122312 emacs`redisplay_internal at xdisp.c:17096:14
>     frame #52: 0x0000000100135fd9 emacs`redisplay at xdisp.c:16103:3

Emacs' thread (#1) is displaying an image when thread #17 crashes.

> (lldb) bt all
>   thread #4, name = 'gmain'
>     frame #0: 0x00007fff20477646 libsystem_kernel.dylib`__select + 10
>     frame #1: 0x00000001029f056b libglib-2.0.0.dylib`g_poll + 505

That's a select for some reason, doing nothing.

>   thread #5
>     frame #0: 0x00007fff20473d52 libsystem_kernel.dylib`__pselect + 10
>     frame #1: 0x00007fff20473c6f libsystem_kernel.dylib`pselect$DARWIN_EXTSN + 42
>     frame #2: 0x00000001009b2be5 emacs`-[EmacsApp
>     fd_handler:](self=0x0000612000024640, _cmd="fd_handler:",
>     unused=0x0000000000000000) > (lldb)

Also doing nothing.

>  thread #17
>    frame #0: 0x0000000000000000
>    frame #1: 0x00007fff31a448da AppleVPA`___lldb_unnamed_symbol479$$AppleVPA + 336
>    frame #2: 0x00007fff31a427ec AppleVPA`___lldb_unnamed_symbol455$$AppleVPA + 254
>    frame #3: 0x00007fff204a48fc libsystem_pthread.dylib`_pthread_start + 224
>    frame #4: 0x00007fff204a0443 libsystem_pthread.dylib`thread_start +
>    15

That's the culprit, but I have no real idea what this thread is for.
One of the few things I could find on the web is
https://www.zerodayinitiative.com/advisories/ZDI-20-1182/ (a zero-day
vulnerability) which indicates that AppleVPA has something to do with
JPEG parsing.

Could it be that one or more jpegs of yours is invalid in some way?
Maybe you could check this with the 'jpeginfo' utitlity.  I've never
used it myself, because I don't have a use for it, but from what I read,
it might be able to detect at least some error cases.  Maybe it's worth
trying.

Another idea might be to try and install an external jpeg library
(libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
seem to work on my M1 Mac, but maybe it does on your x86_64 system.

In any case, this doesn't look like a problem to me that is caused by
Emacs.

>
> -------------------------------------------------------------------------------
>
> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)
>
> This time I had to use:
>
> /Users/james/Code/emacs/src/emacs
>
> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which crashed on startup)
>

I don't quite understand.  I've seen to open errors in your log.  Are
you saying that these happen because you started Emacs from src this
time?  FWIW, I don't see differences when starting one or the other.





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-20  6:34                   ` Gerd Möllmann
@ 2022-08-20 16:23                     ` james
  2022-08-20 16:29                       ` james
  2022-08-21  5:30                       ` Gerd Möllmann
  0 siblings, 2 replies; 17+ messages in thread
From: james @ 2022-08-20 16:23 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 57267, Eli Zaretskii

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

> Could it be that one or more jpegs of yours is invalid in some way?
Maybe you could check this with the 'jpeginfo' utitlity.  I've never
used it myself, because I don't have a use for it, but from what I read,
it might be able to detect at least some error cases.  Maybe it's worth
trying.

Do you think that would lead to a crash every time? My crashes are very inconsistent.

> Another idea might be to try and install an external jpeg library
(libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
seem to work on my M1 Mac, but maybe it does on your x86_64 system.

Can you point me to some documentation for that?

> 
> -------------------------------------------------------------------------------
> 
> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)
> 
> This time I had to use:
> 
> /Users/james/Code/emacs/src/emacs
> 
> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which crashed on startup)
> 

I don't quite understand.  I've seen to open errors in your log.  Are
you saying that these happen because you started Emacs from src this
time?  FWIW, I don't see differences when starting one or the other.

> On Aug 20, 2022, at 2:34 AM, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> Could it be that one or more jpegs of yours is invalid in some way?
> Maybe you could check this with the 'jpeginfo' utitlity.  I've never
> used it myself, because I don't have a use for it, but from what I read,
> it might be able to detect at least some error cases.  Maybe it's worth
> trying.
> 
> Another idea might be to try and install an external jpeg library
> (libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
> seem to work on my M1 Mac, but maybe it does on your x86_64 system.
> 
> In any case, this doesn't look like a problem to me that is caused by
> Emacs.
> 
>> 
>> -------------------------------------------------------------------------------
>> 
>> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)
>> 
>> This time I had to use:
>> 
>> /Users/james/Code/emacs/src/emacs
>> 
>> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which crashed on startup)
>> 
> 
> I don't quite understand.  I've seen to open errors in your log.  Are
> you saying that these happen because you started Emacs from src this
> time?  FWIW, I don't see differences when starting one or the other.


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

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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-20 16:23                     ` james
@ 2022-08-20 16:29                       ` james
  2022-08-21  5:42                         ` Gerd Möllmann
  2022-08-21  5:30                       ` Gerd Möllmann
  1 sibling, 1 reply; 17+ messages in thread
From: james @ 2022-08-20 16:29 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 57267, Eli Zaretskii

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

> I don't quite understand.  I've seen to open errors in your log.  Are
you saying that these happen because you started Emacs from src this
time?  FWIW, I don't see differences when starting one or the other.

They were separate issues.

1. 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)

^ Just recently saw that in the logs after applying your suggestions.

2. Before (your suggestions), I did this to run emacs:

>> gdb/lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs

After, it crashed on startup every time, so I did instead:

>> gdb/llb emacs





This is what I get with the Emacs.app binary: (upon startup)

src/ $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs 
Emacs debugging support has been installed.
(lldb) target create "../nextstep/Emacs.app/Contents/MacOS/Emacs"
Current executable set to '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64).
(lldb) r
Process 5114 launched: '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64)
Warning: Lisp directory 'Contents/Resources/lisp': No such file or directory
=================================================================
==5114==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffeefbfe76e at pc 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp 0x7ffeefbfd178
WRITE of size 25 at 0x7ffeefbfe76e thread T0
    #0 0x102ee74d2 in __asan_memcpy+0x262 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2)
    #1 0x1008b3733 in doprnt doprnt.c:456
    #2 0x1008b5351 in esprintf doprnt.c:551
    #3 0x1007d2a43 in dir_warning lread.c:5385
    #4 0x1007d1b53 in load_path_check lread.c:5145
    #5 0x1007d1631 in init_lread lread.c:5338
    #6 0x1004911cd in main emacs.c:2151
    #7 0x7fff204bff3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)

Address 0x7ffeefbfe76e is located in stack of thread T0 at offset 718 in frame
    #0 0x1008b512f in esprintf doprnt.c:547

  This frame has 1 object(s):
    [32, 56) 'ap' (line 549) <== Memory access at offset 718 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in __asan_memcpy+0x262
Shadow bytes around the buggy address:
  0x1fffddf7fc90: 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 f3 f3 f3 f3
  0x1fffddf7fca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fcd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x1fffddf7fce0: ca ca ca ca 00 00 00 00 00 00 00 00 00[06]cb cb
  0x1fffddf7fcf0: cb cb cb cb f1 f1 f1 f1 00 00 00 00 f2 f2 f2 f2
  0x1fffddf7fd00: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fd10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fd20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffddf7fd30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
2022-08-20 12:28:55.164360-0400 Emacs[5114:17882118] =================================================================
2022-08-20 12:28:55.164418-0400 Emacs[5114:17882118] ==5114==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffeefbfe76e at pc 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp 0x7ffeefbfd178
2022-08-20 12:28:55.164429-0400 Emacs[5114:17882118] WRITE of size 25 at 0x7ffeefbfe76e thread T0
2022-08-20 12:28:55.164440-0400 Emacs[5114:17882118]     #0 0x102ee74d2 in __asan_memcpy+0x262 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2)
2022-08-20 12:28:55.164450-0400 Emacs[5114:17882118]     #1 0x1008b3733 in doprnt doprnt.c:456
2022-08-20 12:28:55.164461-0400 Emacs[5114:17882118]     #2 0x1008b5351 in esprintf doprnt.c:551
2022-08-20 12:28:55.164483-0400 Emacs[5114:17882118]     #3 0x1007d2a43 in dir_warning lread.c:5385
2022-08-20 12:28:55.164507-0400 Emacs[5114:17882118]     #4 0x1007d1b53 in load_path_check lread.c:5145
2022-08-20 12:28:55.164519-0400 Emacs[5114:17882118]     #5 0x1007d1631 in init_lread lread.c:5338
2022-08-20 12:28:55.164529-0400 Emacs[5114:17882118]     #6 0x1004911cd in main emacs.c:2151
2022-08-20 12:28:55.164538-0400 Emacs[5114:17882118]     #7 0x7fff204bff3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)
2022-08-20 12:28:55.164549-0400 Emacs[5114:17882118] 
2022-08-20 12:28:55.164556-0400 Emacs[5114:17882118] Address 0x7ffeefbfe76e is located in stack of thread T0 at offset 718 in frame
2022-08-20 12:28:55.164565-0400 Emacs[5114:17882118]     #0 0x1008b512f in esprintf doprnt.c:547
2022-08-20 12:28:55.164576-0400 Emacs[5114:17882118] 
2022-08-20 12:28:55.164583-0400 Emacs[5114:17882118]   This frame has 1 object(s):
2022-08-20 12:28:55.164593-0400 Emacs[5114:17882118]     [32, 56) 'ap' (line 549) <== Memory access at offset 718 overflows this variable
2022-08-20 12:28:55.164603-0400 Emacs[5114:17882118] HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
2022-08-20 12:28:55.164614-0400 Emacs[5114:17882118]       (longjmp and C++ exceptions *are* supported)
2022-08-20 12:28:55.164624-0400 Emacs[5114:17882118] SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in __asan_memcpy+0x262
2022-08-20 12:28:55.164635-0400 Emacs[5114:17882118] Shadow bytes around the buggy address:
2022-08-20 12:28:55.164644-0400 Emacs[5114:17882118]   0x1fffddf7fc90: 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 f3 f3 f3 f3
2022-08-20 12:28:55.164654-0400 Emacs[5114:17882118]   0x1fffddf7fca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164664-0400 Emacs[5114:17882118]   0x1fffddf7fcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164673-0400 Emacs[5114:17882118]   0x1fffddf7fcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164682-0400 Emacs[5114:17882118]   0x1fffddf7fcd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164693-0400 Emacs[5114:17882118] =>0x1fffddf7fce0: ca ca ca ca 00 00 00 00 00 00 00 00 00[06]cb cb
2022-08-20 12:28:55.164702-0400 Emacs[5114:17882118]   0x1fffddf7fcf0: cb cb cb cb f1 f1 f1 f1 00 00 00 00 f2 f2 f2 f2
2022-08-20 12:28:55.164721-0400 Emacs[5114:17882118]   0x1fffddf7fd00: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164731-0400 Emacs[5114:17882118]   0x1fffddf7fd10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164740-0400 Emacs[5114:17882118]   0x1fffddf7fd20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164750-0400 Emacs[5114:17882118]   0x1fffddf7fd30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2022-08-20 12:28:55.164759-0400 Emacs[5114:17882118] Shadow byte legend (one shadow byte represents 8 application bytes):
2022-08-20 12:28:55.164768-0400 Emacs[5114:17882118]   Addressable:           00
2022-08-20 12:28:55.164779-0400 Emacs[5114:17882118]   Partially addressable: 01 02 03 04 05 06 07
2022-08-20 12:28:55.164799-0400 Emacs[5114:17882118]   Heap left redzone:       fa
2022-08-20 12:28:55.164818-0400 Emacs[5114:17882118]   Freed heap region:       fd
2022-08-20 12:28:55.164839-0400 Emacs[5114:17882118]   Stack left redzone:      f1
2022-08-20 12:28:55.164848-0400 Emacs[5114:17882118]   Stack mid redzone:       f2
2022-08-20 12:28:55.164856-0400 Emacs[5114:17882118]   Stack right redzone:     f3
2022-08-20 12:28:55.164864-0400 Emacs[5114:17882118]   Stack after return:      f5
2022-08-20 12:28:55.164871-0400 Emacs[5114:17882118]   Stack use after scope:   f8
2022-08-20 12:28:55.164878-0400 Emacs[5114:17882118]   Global redzone:          f9
2022-08-20 12:28:55.164885-0400 Emacs[5114:17882118]   Global init order:       f6
2022-08-20 12:28:55.164892-0400 Emacs[5114:17882118]   Poisoned by user:        f7
2022-08-20 12:28:55.164900-0400 Emacs[5114:17882118]   Container overflow:      fc
2022-08-20 12:28:55.164904-0400 Emacs[5114:17882118]   Array cookie:            ac
2022-08-20 12:28:55.164909-0400 Emacs[5114:17882118]   Intra object redzone:    bb
2022-08-20 12:28:55.164932-0400 Emacs[5114:17882118]   ASan internal:           fe
2022-08-20 12:28:55.165373-0400 Emacs[5114:17882118]   Left alloca redzone:     ca
2022-08-20 12:28:55.165387-0400 Emacs[5114:17882118]   Right alloca redzone:    cb
2022-08-20 12:28:55.165397-0400 Emacs[5114:17882118]   Shadow gap:              cc
==5114==ABORTING
(lldb) AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report.
Process 5114 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = AddressSanitizer detected: dynamic-stack-buffer-overflow
    frame #0: 0x0000000102ef1dc0 libclang_rt.asan_osx_dynamic.dylib`__asan::AsanDie()
libclang_rt.asan_osx_dynamic.dylib`__asan::AsanDie:
->  0x102ef1dc0 <+0>: pushq  %rbp
    0x102ef1dc1 <+1>: movq   %rsp, %rbp
    0x102ef1dc4 <+4>: pushq  %rbx
    0x102ef1dc5 <+5>: pushq  %rax
Target 0: (Emacs) stopped.
(lldb)  


> On Aug 20, 2022, at 12:23 PM, james@jojojames.com wrote:
> 
> > Could it be that one or more jpegs of yours is invalid in some way?
> Maybe you could check this with the 'jpeginfo' utitlity.  I've never
> used it myself, because I don't have a use for it, but from what I read,
> it might be able to detect at least some error cases.  Maybe it's worth
> trying.
> 
> Do you think that would lead to a crash every time? My crashes are very inconsistent.
> 
> > Another idea might be to try and install an external jpeg library
> (libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
> seem to work on my M1 Mac, but maybe it does on your x86_64 system.
> 
> Can you point me to some documentation for that?
> 
>> 
>> -------------------------------------------------------------------------------
>> 
>> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)
>> 
>> This time I had to use:
>> 
>> /Users/james/Code/emacs/src/emacs
>> 
>> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which crashed on startup)
>> 
> 
> I don't quite understand.  I've seen to open errors in your log.  Are
> you saying that these happen because you started Emacs from src this
> time?  FWIW, I don't see differences when starting one or the other.
> 
>> On Aug 20, 2022, at 2:34 AM, Gerd Möllmann <gerd.moellmann@gmail.com <mailto:gerd.moellmann@gmail.com>> wrote:
>> 
>> Could it be that one or more jpegs of yours is invalid in some way?
>> Maybe you could check this with the 'jpeginfo' utitlity.  I've never
>> used it myself, because I don't have a use for it, but from what I read,
>> it might be able to detect at least some error cases.  Maybe it's worth
>> trying.
>> 
>> Another idea might be to try and install an external jpeg library
>> (libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
>> seem to work on my M1 Mac, but maybe it does on your x86_64 system.
>> 
>> In any case, this doesn't look like a problem to me that is caused by
>> Emacs.
>> 
>>> 
>>> -------------------------------------------------------------------------------
>>> 
>>> 2022-08-19 10:09:53.301888-0400 emacs[92880:17395371] fopen failed for data file: errno = 2 (No such file or directory) (hmnn?)
>>> 
>>> This time I had to use:
>>> 
>>> /Users/james/Code/emacs/src/emacs
>>> 
>>> instead of $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs (which crashed on startup)
>>> 
>> 
>> I don't quite understand.  I've seen to open errors in your log.  Are
>> you saying that these happen because you started Emacs from src this
>> time?  FWIW, I don't see differences when starting one or the other.
> 


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

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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-20 16:23                     ` james
  2022-08-20 16:29                       ` james
@ 2022-08-21  5:30                       ` Gerd Möllmann
  2022-08-21 21:21                         ` james
  1 sibling, 1 reply; 17+ messages in thread
From: Gerd Möllmann @ 2022-08-21  5:30 UTC (permalink / raw)
  To: james; +Cc: 57267, Eli Zaretskii

james@jojojames.com writes:

>
>> Could it be that one or more jpegs of yours is invalid in some way?
> Maybe you could check this with the 'jpeginfo' utitlity.  I've never
> used it myself, because I don't have a use for it, but from what I read,
> it might be able to detect at least some error cases.  Maybe it's worth
> trying.
>
> Do you think that would lead to a crash every time? My crashes are
> very inconsistent.

I can't really answer that question because, as a starter, I don't even
know what AppleVPA is doing when it crashes, and there's no way to find
out, AFAIK.  In general, with multi-threading, ASLR, and whatnot, things
tend to not behave consistently quite frequently, at least in my
experience.

I'd personally give jpeginfo a try.  It's cheap.  Just 'brew install'
it.

>> Another idea might be to try and install an external jpeg library
> (libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
> seem to work on my M1 Mac, but maybe it does on your x86_64 system.
>
> Can you point me to some documentation for that?

I can't find documentation for this.  I guess I only "know" about this
because I added it in 1998, according to the ChangeLog, which must be a
lie :-).

Anyways.  On my system, I just did 'brew install libjpeg' and then
'./configure'.  The file config.log showed that configure was trying to
use libjpeg, but didn't like it for some reason I don't remember.

BTW, Homebrew also has other jpeg libs ('brew search jpeg' and so on),
but I didn't try them all.  As I mentioned, I don't do much with images
myself.

Maybe it's also worth asking an help-gnu-emacs, if this doesn't work.
Or someone reading this knows more about this topic.





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-20 16:29                       ` james
@ 2022-08-21  5:42                         ` Gerd Möllmann
  0 siblings, 0 replies; 17+ messages in thread
From: Gerd Möllmann @ 2022-08-21  5:42 UTC (permalink / raw)
  To: james; +Cc: 57267, Eli Zaretskii

james@jojojames.com writes:

> This is what I get with the Emacs.app binary: (upon startup)
>
> src/ $ lldb ../nextstep/Emacs.app/Contents/MacOS/Emacs 
> Emacs debugging support has been installed.
> (lldb) target create "../nextstep/Emacs.app/Contents/MacOS/Emacs"
> Current executable set to '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64).
> (lldb) r
> Process 5114 launched: '/Users/james/Code/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64)
> Warning: Lisp directory 'Contents/Resources/lisp': No such file or
> directory

Ok, that's a relative path, so I think it expects to be started with
current directory being nextstep/Emacs.app.

> =================================================================
> ==5114==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffeefbfe76e at pc 0x000102ee74d3 bp 0x7ffeefbfd9b0 sp
> 0x7ffeefbfd178
> WRITE of size 25 at 0x7ffeefbfe76e thread T0
>     #0 0x102ee74d2 in __asan_memcpy+0x262 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2)
>     #1 0x1008b3733 in doprnt doprnt.c:456
>     #2 0x1008b5351 in esprintf doprnt.c:551
>     #3 0x1007d2a43 in dir_warning lread.c:5385
>     #4 0x1007d1b53 in load_path_check lread.c:5145
>     #5 0x1007d1631 in init_lread lread.c:5338
>     #6 0x1004911cd in main emacs.c:2151
>     #7 0x7fff204bff3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)
>
> Address 0x7ffeefbfe76e is located in stack of thread T0 at offset 718 in frame
>     #0 0x1008b512f in esprintf doprnt.c:547
>
>   This frame has 1 object(s):
>     [32, 56) 'ap' (line 549) <== Memory access at offset 718 overflows this variable
> HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
>       (longjmp and C++ exceptions *are* supported)
> SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x424d2) in __asan_memcpy+0x262
> Shadow bytes around the buggy address:
>   0x1fffddf7fc90: 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 f3 f3 f3 f3
>   0x1fffddf7fca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x1fffddf7fcb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x1fffddf7fcc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x1fffddf7fcd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> =>0x1fffddf7fce0: ca ca ca ca 00 00 00 00 00 00 00 00 00[06]cb cb
>   0x1fffddf7fcf0: cb cb cb cb f1 f1 f1 f1 00 00 00 00 f2 f2 f2 f2
>   0x1fffddf7fd00: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>   0x1fffddf7fd10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x1fffddf7fd20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x1fffddf7fd30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And that's how a real ASAN error looks like.  ASAN has detected a
buffer-overflow in doprnt.  I'll try to debug this later if I don't
forget.

Thanks for the report!





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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-21  5:30                       ` Gerd Möllmann
@ 2022-08-21 21:21                         ` james
  2022-08-23  5:09                           ` Gerd Möllmann
  0 siblings, 1 reply; 17+ messages in thread
From: james @ 2022-08-21 21:21 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 57267, Eli Zaretskii

> I'd personally give jpeginfo a try.  It's cheap.  Just 'brew install'
> it.

All the jpegs were valid.

> On Aug 21, 2022, at 1:30 AM, Gerd Möllmann <gerd.moellmann@gmail.com> wrote:
> 
> james@jojojames.com writes:
> 
>> 
>>> Could it be that one or more jpegs of yours is invalid in some way?
>> Maybe you could check this with the 'jpeginfo' utitlity.  I've never
>> used it myself, because I don't have a use for it, but from what I read,
>> it might be able to detect at least some error cases.  Maybe it's worth
>> trying.
>> 
>> Do you think that would lead to a crash every time? My crashes are
>> very inconsistent.
> 
> I can't really answer that question because, as a starter, I don't even
> know what AppleVPA is doing when it crashes, and there's no way to find
> out, AFAIK.  In general, with multi-threading, ASLR, and whatnot, things
> tend to not behave consistently quite frequently, at least in my
> experience.
> 
> I'd personally give jpeginfo a try.  It's cheap.  Just 'brew install'
> it.
> 
>>> Another idea might be to try and install an external jpeg library
>> (libjpeg I presume), and configure Emacs to use it.  Alas, this doesn't
>> seem to work on my M1 Mac, but maybe it does on your x86_64 system.
>> 
>> Can you point me to some documentation for that?
> 
> I can't find documentation for this.  I guess I only "know" about this
> because I added it in 1998, according to the ChangeLog, which must be a
> lie :-).
> 
> Anyways.  On my system, I just did 'brew install libjpeg' and then
> './configure'.  The file config.log showed that configure was trying to
> use libjpeg, but didn't like it for some reason I don't remember.
> 
> BTW, Homebrew also has other jpeg libs ('brew search jpeg' and so on),
> but I didn't try them all.  As I mentioned, I don't do much with images
> myself.
> 
> Maybe it's also worth asking an help-gnu-emacs, if this doesn't work.
> Or someone reading this knows more about this topic.






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

* bug#57267: 28.1; emacs crashes when loading too many images
  2022-08-21 21:21                         ` james
@ 2022-08-23  5:09                           ` Gerd Möllmann
  0 siblings, 0 replies; 17+ messages in thread
From: Gerd Möllmann @ 2022-08-23  5:09 UTC (permalink / raw)
  To: james; +Cc: 57267, Eli Zaretskii

james@jojojames.com writes:

>
>> I'd personally give jpeginfo a try.  It's cheap.  Just 'brew install'
>> it.
>
> All the jpegs were valid.

Thanks.





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

end of thread, other threads:[~2022-08-23  5:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18  0:38 bug#57267: 28.1; emacs crashes when loading too many images james
2022-08-18  6:30 ` Eli Zaretskii
2022-08-18 18:49   ` james
2022-08-18 19:03     ` Eli Zaretskii
2022-08-18 20:14       ` james
2022-08-19  5:55         ` Eli Zaretskii
2022-08-19  6:01           ` james
2022-08-19  7:18             ` Gerd Möllmann
2022-08-19  7:22               ` Gerd Möllmann
2022-08-19 14:18                 ` james
2022-08-20  6:34                   ` Gerd Möllmann
2022-08-20 16:23                     ` james
2022-08-20 16:29                       ` james
2022-08-21  5:42                         ` Gerd Möllmann
2022-08-21  5:30                       ` Gerd Möllmann
2022-08-21 21:21                         ` james
2022-08-23  5:09                           ` Gerd Möllmann

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

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

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