GNU bug report logs - #72496
31.0.50; macOS: freezes without beach ball

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Tue, 6 Aug 2024 13:41:02 UTC

Severity: normal

Merged with 74369

Found in versions 29.4, 31.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74369 <at> debbugs.gnu.org, adamkshannon <at> gmail.com, 72496 <at> debbugs.gnu.org
Subject: bug#72496: 31.0.50; macOS: freezes without beach ball
Date: Wed, 28 May 2025 06:41:10 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

FWIW, and for posterity, I am now using the patch below. This makes the
freezes without beach ball that I described literally impossible. 

1 file changed, 17 insertions(+), 1 deletion(-)
src/nsterm.m | 18 +++++++++++++++++-

modified   src/nsterm.m
@@ -6132,7 +6132,23 @@ - (void)sendEvent: (NSEvent *)theEvent
 
   NSTRACE_UNSILENCE();
 
-  [super sendEvent: theEvent];
+  [super sendEvent:theEvent];
+
+#ifdef NS_IMPL_COCOA
+  /* We have the problem that app-defined events get lost for an unknown
+     reason. When that happens, Emacs still processes NS events, and no
+     beach ball is displayed. But Emacs' own event loop does not gain
+     control again and it doesn't react to input anymore.  */
+  if ([NSApp modalWindow] != nil)
+    return;
+
+  static int count = 0;
+  if (++count == 10)
+    {
+      count = 0;
+      [self stop: self];
+    }
+#endif
 }
 
 






This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.