[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32812: 27.0.50; macOS Mojave GNU Emacs crash after 5-10 minutes or s
bug#32812: 27.0.50; macOS Mojave GNU Emacs crash after 5-10 minutes or so
Mon, 24 Sep 2018 12:39:22 +0100
(Final attempt at sending, TLS was being enforced for my outgoing
emails, sorry Alan for the spam!)
On 24 Sep 2018, at 11:17, Alan Third wrote:
On Sun, Sep 23, 2018 at 04:21:13PM +0100, Zack Piper wrote:
(Replacing my post in #31904 with this since they're separate
Sorry, I somehow missed that previous email.
No worries at all!
I've applied a slightly modified (i.e. updated) version of Alan's
(attached) to fix an issue concerning the buffer and mode-line not
rendered. The patch works great, everything is now rendered.
Now I notice that after 5-10 minutes (or even before), Emacs crashes
objc: Invalid or prematurely-freed autorelease pool
This started occurring since upgrading to macOS Mojave, so possibly
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
apply OK to master, or without too much work anyway.
It simply wraps the call to displayIfNeeded in a new pool:
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];
Thanks for testing the patch and raising this issue. There’s not
a lot of feedback so far and I think we’re going to have to commit
patch soon given that Mojave is out today.
You're very welcome, and thanks for providing the additional patch!
This patch doesn’t help, I finally reproduced the crash with it in
I truly wish I could help somewhat, if you need anything additional from
me let me know.
I've never really meddled Objective C before, so I'd likely not be able
to help much.
Obviously I'm more than happy to test any patches you throw at me! :-)
I did look at the autorelease pool thing and tried to see where it would
fit in, to no avail.
Let me know if you need anything.