Subject: bug#68940: 29.2; Random crashes in face for char / font

From: Robert Vojta <[email-masked]>
Date: Thu, 08 Feb 2024 10:00:11 +0100

> I feel with you :-). There have been, and still are, strange things
> happening with GUI Emacs on macOS. Although, I think it has improved a
> lot over the last year or two.

Thanks, I really thought that I'm mad while seeing all these random
crashes & backtraces ;)

> - Maybe configuring with --enable-checking can find something? That
>   enables a number of asserts in the code, among them things that ASAN
>   can't find.

Crashing with:

../../emacs/src/lisp.h:1314: Emacs fatal error: assertion failed:
FIXNUMP (a)

It always crashes. Sometimes with ^ & SIGABRT, sometimes w/o ^ &
SIGSEGV. 

> - If it's a font thing, Font Book could be used to validate the font in
>   question. Select the font in Font Book and use File > Validate
>   Selection.

I've tried:

  - Delete all my custom fonts -> crashing
  - Add back PragmataPro Mono, validate it, no issues -> crashing

>   expected. Maybe it's worth commenting out the calls and see if that
>   makes a difference, phenomenologically. That's only a shot in the

I've checked out d6c7092ff0713087f38b9492d53be0177af67514, configured
it with:

  CFLAGS="-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT -O0 -g3"
  configure --with-ns --with-modules --with-x-toolkit=no
    --enable-checking

Playing w/ "redisplay ();" in the "layoutSublayersOfLayer:", line 8732.

  - Kept - instant crash, 10/10 launches
  - Commented out - no crash, 10/10 launches

Shot in the dark, but it seems that it's somehow related to all this.

--- 

- I run the full HW diagnostics over night. Everything seems to be okay.

- Will try the new LLVM, yes, I'm using the one (15) from Apple now.

- Still figuring out the minimal reproducible init.el. Feeling like Don
Quixote now, comment out, no crash, aha, comment another line out,
crash, huh, revert, another combination, ...