all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 64147@debbugs.gnu.org
Cc: me@eshelyaron.com
Subject: bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS
Date: Mon, 19 Jun 2023 00:23:03 +0200	[thread overview]
Message-ID: <m1cz1sv29k.fsf@yahoo.es> (raw)
In-Reply-To: <m18rchgg7v.fsf@eshelyaron.com> (Eshel Yaron via's message of "Sun, 18 Jun 2023 14:30:44 +0300")

merge 64147 59794
thanks

Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:

> Looking deeper into this, I see this issue has already been reported in
> Bug#59794.
>
> There's a workaround that avoids this crash on the release branch, but
> it was deliberately kept out of the master branch in hope that a better
> solution would come up (see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59794#41).

In ns_free_frame_resources, the frame's window is closed, but the view
is not removed from the hierarchy, meaning that it could be called by
AppKit.  That is problematic, because the frame's output_data is
nullified just a few lines later.

Does the following patch (on top of master) solve the problem?

diff --git a/src/nsterm.m b/src/nsterm.m
index 3e089cc1ff1..2c0c90e70e1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1624,7 +1624,7 @@ Hide the window (X11 semantics)
     [f->output_data.ns->miniimage release];
 
   [[view window] close];
-  [view release];
+  [view removeFromSuperview];
 
   xfree (f->output_data.ns);
   f->output_data.ns = NULL;





  reply	other threads:[~2023-06-18 22:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18  7:41 bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 11:30 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 22:23   ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-06-19  4:15     ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-19 16:21       ` Eli Zaretskii
2023-06-20 12:53         ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-21 13:38           ` Eli Zaretskii
2023-06-21 15:58             ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1cz1sv29k.fsf@yahoo.es \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64147@debbugs.gnu.org \
    --cc=mardani29@yahoo.es \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.