GNU bug report logs - #58857
28.2; Emacs on macOS seg faults when deleting fullscreen frame

Previous Next

Package: emacs;

Reported by: Kevin Lin <kkylin <at> alum.mit.edu>

Date: Sat, 29 Oct 2022 04:13:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kevin Lin <kkylin <at> alum.mit.edu>
Cc: 58857 <at> debbugs.gnu.org
Subject: bug#58857: 28.2; Emacs on macOS seg faults when deleting fullscreen frame
Date: Sat, 29 Oct 2022 09:39:17 +0300
> From: Kevin Lin <kkylin <at> alum.mit.edu>
> Date: Fri, 28 Oct 2022 10:59:16 -0700
> 
> Using stock Emacs 28.2 from https://emacsformacosx.com/:

This distribution is done by someone outside of the Emacs project.  I
therefore suggest that you first report the problem to that person.

> 1) $ /Applications/Emacs.app/Contents/MacOS/Emacs -Q
> 
> 2) open a second frame by, e.g., C-X-5-2
> 
> 3) make it fullscreen, e.g., by clicking the green title button
> 
> 4) delete the fullscreened frame by, e.g., C-X-5-0
> 
> I don't know enough about ObjC or NS to isolate the issue in the ObjC source, but the following work-around works for me:
> 
> (defun frame-turn-off-fullscreen (theframe)
>   (if (eq 'fullboth
> 	  (cdr (assq 'fullscreen
> 		     (frame-parameters theframe))))
>       (set-frame-parameter theframe 'fullscreen nil)))
> 
> (if (boundp 'ns-use-native-fullscreen)
>     (add-to-list 'delete-frame-functions 'frame-turn-off-fullscreen))
> 
> I haven't tried this with Emacs in gdb, but do have macOS-generated crash logs I can send along upon request.
> 
> Also, I'm running this on macOS 13 (Ventura), but this has happened to me since macOS 10.13 (High Sierra) with Emacs 27 (possibly even earlier).  Reporting it only now because the work-around above has worked for me and I forgot about it.

In general, we don't expect any Emacs 28 releases, so it would be of
great help to us if you could try Emacs 29 (from the master branch of
the Emacs Git repository) and see if the problem still exists there.
That's assuming the person who prepares these binaries concludes that
the problem is in the upstream code, not related to the particular way
these binaries are built.

Thanks.




This bug report was last modified 2 years and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.