Subject: bug#51608: 27.2; crash on Apple Sillicon

From: Daniel Martín <[email-masked]>
Date: Sat, 06 Nov 2021 15:59:10 +0100

Alan Glasser <[email-masked]> writes:

> The application is Universal, i.e. for both Intel and Apple Silicon.
> I’ve discussed this with Apple Support.  Only Intel-only software can
> be opened with Rosetta.

Yes, but the version from emacsformacosx.com is not a single universal
binary.  The Emacs shortcut is actually a Ruby script that choses the
binary for your architecture at runtime.

The key thing in the stack trace you posted is that the operating system
ran the _Intel_ version of Emacs, instead of the Apple Silicon one:

Process:               Emacs-x86_64-10_14 [7048]
Path:
/Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_14
Code Type:             X86-64 (Translated)

[...]

Thread 1:: com.apple.rosetta.exceptionserver

[...]

(Note "the x86_64" reference and the Rosetta exception.)

For some reason, the Intel version of Emacs crashes when opened with
Rosetta.  This may be a bug in Emacs or in Rosetta, and we'd need
someone to build a debug version of Emacs with symbols and attach a
debugger to investigate.

The Apple Silicon version should work fine, to the best of my knowledge.
That's why I suggested to _uncheck_ the "Open using Rosetta" checkbox,
to force the operating system to always run the Apple Silicon version of
Emacs.

To make things work irrespectively of the status of the "Open using
Rosetta" checkbox, there is commit
https://github.com/caldwell/build-emacs/commit/0c8cb9545c607d2a368a10a23a4d637d6cb7267e
The latest nightlies from emacsformacosx.com should include that fix,
and the packager plans to backport it to Emacs 27.2 soon.

Hope this helps.