Subject: Re: bug#34762: Acknowledgement (26.1.92; objc[27300]: Invalid or prematurely-freed autorelease pool 0x1040021e0.)

From: Alan Third <[email-masked]>
Date: Mon, 18 Mar 2019 12:09:26 +0000

On Fri, Mar 15, 2019 at 08:55:49PM +0000, Caroptions Caroptions wrote:
> The bug reproduced on any compiled emacs.
> 
> 26.1.92 has it, latest master branch has it... Do not understand why
> nobody else hit it as yet ..
> 
> I think the problem somehow related to NSAutoreleasePool and
> pthreads : https://kenji.sx/posts/nsautoreleasepooldebian

Hi, thanks for reporting this. I didn’t get the previous email for
some reason, so I missed it.

This is an odd one. I don’t think it has anything to do with pthreads,
but I don’t really understand what’s going on. My best guess is that
somehow the autorelease pools are being drained out of order. I don’t
know why using tramp would cause that to happen.

One solution would be to remove the pool from ns_update_menubar
completely, but I assume it’s there for a good reason.
-- 
Alan Third