[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS
From: |
Daniel Martín |
Subject: |
bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS |
Date: |
Mon, 19 Jun 2023 00:23:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) |
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;
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Eshel Yaron, 2023/06/18
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Eshel Yaron, 2023/06/18
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS,
Daniel Martín <=
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Eshel Yaron, 2023/06/19
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Eli Zaretskii, 2023/06/19
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Daniel Martín, 2023/06/20
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Eli Zaretskii, 2023/06/21
- bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS, Daniel Martín, 2023/06/21