GNU bug report logs -
#32812
27.0.50; macOS Mojave GNU Emacs crash after 5-10 minutes or so
Previous Next
Reported by: "Zack Piper" <zack <at> apertron.com>
Date: Sun, 23 Sep 2018 17:10:02 UTC
Severity: normal
Found in version 27.0.50
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 32812 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Sep 23, 2018 at 04:21:13PM +0100, Zack Piper wrote:
> Hi!
>
> (Replacing my post in #31904 with this since they're separate issues(?))
Sorry, I somehow missed that previous email.
> I've applied a slightly modified (i.e. updated) version of Alan's patch from
> bug #31904
> (attached) to fix an issue concerning the buffer and mode-line not being
> rendered. The patch works great, everything is now rendered.
>
> Now I notice that after 5-10 minutes (or even before), Emacs crashes with
> the below:
>
> ```
> objc[82784]: Invalid or prematurely-freed autorelease pool 0x1030032e0.
> ```
>
> This started occurring since upgrading to macOS Mojave, so possibly there's
> a bug with Mojave or just some incompatibility, not really sure!
It’s a bit strange looking, and autorelease pools are something of a
mystery to me.
I have a suspicion, though, that just creating a new autorelease pool
may solve this. I’ve attached a patch. It’s for emacs-26, but should
apply OK to master, or without too much work anyway.
It simply wraps the call to displayIfNeeded in a new pool:
static void
ns_flush_display (struct frame *f)
/* Force the frame to redisplay. If areas have previously been marked
dirty by setNeedsDisplayInRect (in ns_focus), then this will call
draw_rect: which will "expose" those areas. */
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[FRAME_NS_VIEW (f) displayIfNeeded];
[pool release];
}
Thanks for testing the patch and raising this issue. There’s not been
a lot of feedback so far and I think we’re going to have to commit the
patch soon given that Mojave is out today.
--
Alan Third
[0001-Fix-crash-when-flushing-to-screen-bug-32812.patch (text/plain, attachment)]
This bug report was last modified 6 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.