Although Emacs (24.3.93.1) runs fine if launched from the Finder, if the terminal version is launched:
/Applications/Emacs.app/Contents/MacOS/Emacs -nw
Emacs crashes with:
Fatal error 11: Segmentation fault[1] 51512 abort /Applications/Emacs.app/Contents/MacOS/Emacs -nw
.
It seems the issue is caused by a single line in init.el,
(set-face-attribute 'default nil :font "Menlo-16")
If that line is commented out, the terminal version of Emacs will start fine too.
To pinpoint the cause of the crash took me several hours (diminishing my init.el half by half).
I am aware that in any case Emacs will inherit whatever font and font size is specified in the terminal app (basically, that line is not meaningful in the cli.)
- Generally speaking, is there a better way to debug a crashing Emacs? Perhaps using some kind of cli debugger that would print a more descriptive message?
- Why is that line crashing Emacs via cli, but not if launched from the Finder?
(condition-case err (set-face-attribute 'default nil :font "Menlo-16") (error (message "Whoops!")))
still I have the same crash with same error message. No additional elisp-originating messages.GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org
from emacsformacosx.com, and Emacs does not crash. So, it must be a bug in later versions. I shall file a bug report.M-x report-emacs-bug
. Emacs developers will then lead you through what you can do to help debug the problem.