GNU bug report logs - #64147
30.0.50; Crash when deleting fullscreen frame on macOS

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Sun, 18 Jun 2023 07:42:02 UTC

Severity: normal

Merged with 59794

Found in versions 29.0.60, 30.0.50

Done: Daniel Martín <mardani29 <at> yahoo.es>

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: Eshel Yaron <me <at> eshelyaron.com>
Cc: 64147 <at> debbugs.gnu.org, mardani29 <at> yahoo.es
Subject: bug#64147: 30.0.50; Crash when deleting fullscreen frame on macOS
Date: Mon, 19 Jun 2023 19:21:35 +0300
> Cc: 64147 <at> debbugs.gnu.org
> Date: Mon, 19 Jun 2023 07:15:53 +0300
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Daniel Martín <mardani29 <at> yahoo.es> writes:
> 
> > 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;
> 
> Yes, this seems to solve it, thanks!

Great, so please install it (on the emacs-29 branch, if the problem
happens there as well).

Thanks.




This bug report was last modified 1 year and 337 days ago.

Previous Next


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