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