Subject: 24.5; OS X 10.11 delete-frame fullscreen frame causes segfault

From: Trey Ethan Harris <[email-masked]>
Date: Sat, 19 Mar 2016 16:39:36 +0000

To reproduce:

0. Run "Emacs.app/Contents/MacOS/Emacs -Q".
1. Create a second frame (with make-frame or other method)
2. Make the frame fullscreen using the green titlebar fullscreen button
3. Delete the new fullscreen frame using delete-frame or other method
(including clicking the red titlebar close button).

Expected result: Frame deleted, prior frame refocused, Emacs continues
running
Actual result: Frame deleted, then segmentation fault

I have done some additional differential diagnosis that may be helpful:

1. This only occurs with OS X El Capitan (10.11) and later—which
rewrote fullscreen support to support Split View, so I suspect the
new interaction is to blame.
2. I have tested other Cocoa builds of Emacs 24 such as emacsforosx, and
they
also exhibit this behavior. (I have not tested Emacs 25.)
3. I have had others, including non-Emacs users, reproduce the bug, in
one case on an otherwise clean install of OS X.

In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2015-04-10 on builder10-9.porkrind.org
Windowing system distributor `Apple', version 10.3.1404
Configured using:
 `configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp''

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