Subject: Re: bug#32812: 27.0.50; macOS Mojave GNU Emacs crash after 5-10 minutes or so

From: Alan Third <[email-masked]>
Date: Mon, 24 Sep 2018 14:11:33 +0100

On Mon, Sep 24, 2018 at 12:39:22PM +0100, Zack Piper wrote:
> (Final attempt at sending, TLS was being enforced for my outgoing emails,
> sorry Alan for the spam!)

I think I actually did receive all the emails. No big deal, though.

> > This patch doesn’t help, I finally reproduced the crash with it in
> > place.
> 
> Oh, damn.

I think I’ve got it this time. I haven’t managed to reproduce the
crash, but I may just have been lucky.

> I truly wish I could help somewhat, if you need anything additional from me
> let me know.

That’s OK, just testing the patches is helpful.

-- 
Alan Third
>From 356f20b5d8b5809100102797c51f1b54cc8a908e Mon Sep 17 00:00:00 2001
From: Alan Third <[email-masked]>
Date: Mon, 24 Sep 2018 14:04:54 +0100
Subject: [PATCH] Fix crash on flush to display (bug#32812)

* src/nsterm.m (ns_flush_display): Block input to prevent Emacs IO
processing inside AppKit code.
---
 src/nsterm.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/nsterm.m b/src/nsterm.m
index b36d847eb3..4c03d35c69 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1252,7 +1252,9 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
    dirty by setNeedsDisplayInRect (in ns_focus), then this will call
    draw_rect: which will "expose" those areas.  */
 {
+  block_input ();
   [FRAME_NS_VIEW (f) displayIfNeeded];
+  unblock_input ();
 }

-- 
2.18.0