emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#23924 - crashes on next OS X release


From: Alan Third
Subject: Re: Bug#23924 - crashes on next OS X release
Date: Mon, 18 Jul 2016 20:03:46 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Jul 18, 2016 at 09:16:09AM -0700, John Wiegley wrote:
> >>>>> "EZ" == Eli Zaretskii <address@hidden> writes:
> 
> EZ> If you are confident that it won't do any trouble, and that 10.10, and
> EZ> only that version, needs this fix, feel free to push to emacs-25.
> 
> Before you do, can you show us the patch here so that I can have a sense of
> what it changes?  I've been running emacs-25 crash-free on 10.11 for many
> months now.

I’m not that confident as I couldn’t find anything about the bug in
question except what was in the bug report and comment in the code. I
tried removing the fix and can’t reproduce the original problem on
10.11. It’s possible it’s actually been fixed in later releases of
10.10 too.

We’ve had two reports of crashes on 10.12 which my patch resolves.

I haven’t yet found anyone running 10.10 who can test it.

The original bug is 18993.

* src/nsterm.m (ns_send_appdefined): Limit bugfix for bug#18993 to OS X
10.10.
---
 src/nsterm.m | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index a6160ed..a7e2649 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3942,16 +3942,21 @@ overwriting cursor (usually when cursor on a tab) */
        this moment.  */
 
 #ifdef NS_IMPL_COCOA
-  if (! send_appdefined)
-    {
-      /* OSX 10.10.1 swallows the AppDefined event we are sending ourselves
-         in certain situations (rapid incoming events).
-         So check if we have one, if not add one.  */
-      NSEvent *appev = [NSApp nextEventMatchingMask:NSApplicationDefinedMask
-                                          untilDate:[NSDate distantPast]
-                                             inMode:NSDefaultRunLoopMode
-                                            dequeue:NO];
-      if (! appev) send_appdefined = YES;
+  if ([[NSProcessInfo processInfo] 
respondsToSelector:@selector(operatingSystemVersion)])
+    {
+      NSOperatingSystemVersion v = [[NSProcessInfo processInfo] 
operatingSystemVersion];
+
+      if (! send_appdefined && v.majorVersion == 10 && v.minorVersion == 10)
+        {
+          /* OSX 10.10.1 swallows the AppDefined event we are sending ourselves
+             in certain situations (rapid incoming events).
+             So check if we have one, if not add one.  */
+          NSEvent *appev = [NSApp 
nextEventMatchingMask:NSApplicationDefinedMask
+                                              untilDate:[NSDate distantPast]
+                                                 inMode:NSDefaultRunLoopMode
+                                                dequeue:NO];
+          if (! appev) send_appdefined = YES;
+        }
     }
 #endif
 
-- 
2.7.4


-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]