* bug#23924: 25.1.50; Emacs NSInternalInconsistencyException on macos Sierra developer beta 2
@ 2016-07-11 13:13 Bob Halley
2016-07-13 21:03 ` bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924) Alan Third
0 siblings, 1 reply; 6+ messages in thread
From: Bob Halley @ 2016-07-11 13:13 UTC (permalink / raw)
To: Alan Third; +Cc: 23924
If I disable the invocation of nextEventMatchingMask:untilDate:inMode:dequeue at nsterm.m:3950, the problem stops. And indeed, this is the method that is called in the traceback that is causing the assertion to fire. Since this appears to be a workaround for events getting eaten, however, this doesn't seem to be a good fix.
Is it a bad thing to just always set send_appdefined=YES? The code appears to be trying to suppress appdefined events in some cases, but it's not clear to me what happens if we stop trying to send only one. Naively I'd think "why not, so the run loop gets stopped twice, it's a little extra work" but I don't know this code and am not familiar with the macOS API :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924)
2016-07-11 13:13 bug#23924: 25.1.50; Emacs NSInternalInconsistencyException on macos Sierra developer beta 2 Bob Halley
@ 2016-07-13 21:03 ` Alan Third
2016-07-13 23:08 ` Bob Halley
0 siblings, 1 reply; 6+ messages in thread
From: Alan Third @ 2016-07-13 21:03 UTC (permalink / raw)
To: Bob Halley; +Cc: 23924
* 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
--
Hi Bob, can you try applying this patch? The fix was originally put in
place for bug#18993 which seems to be specific to OS X 10.10 (or at
least, I can't replicate it here in 10.11) so I've limited the fix to
that specific version and completely removed it for everything else.
Hopefully it's not going to break everything, but it seems OK here.
--
Alan Third
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924)
2016-07-13 21:03 ` bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924) Alan Third
@ 2016-07-13 23:08 ` Bob Halley
2016-07-17 14:15 ` Alan Third
0 siblings, 1 reply; 6+ messages in thread
From: Bob Halley @ 2016-07-13 23:08 UTC (permalink / raw)
To: Alan Third; +Cc: 23924
Seems to work for me! No troubles!
/Bob
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924)
2016-07-13 23:08 ` Bob Halley
@ 2016-07-17 14:15 ` Alan Third
2016-07-20 18:35 ` Bob Halley
0 siblings, 1 reply; 6+ messages in thread
From: Alan Third @ 2016-07-17 14:15 UTC (permalink / raw)
To: Bob Halley; +Cc: 23924
On Wed, Jul 13, 2016 at 04:08:12PM -0700, Bob Halley wrote:
> Seems to work for me! No troubles!
I was hoping someone using OS X 10.10 might have chimed in, but it's
not looking likely, so unless anyone objects I'll commit this to
master in a day or two.
It may be neccessary to commit it to Emacs 25 as it the bug breaks
Emacs on the next version of OS X, which should be out later this
year.
--
Alan Third
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924)
2016-07-17 14:15 ` Alan Third
@ 2016-07-20 18:35 ` Bob Halley
2016-07-20 19:31 ` Alan Third
0 siblings, 1 reply; 6+ messages in thread
From: Bob Halley @ 2016-07-20 18:35 UTC (permalink / raw)
To: Alan Third; +Cc: 23924
I have a concern about this patch now, as this morning my emacs, running with it, simply froze and was unresponsive to any input. This sounds like the description of 18993.
I didn't have any trouble when I made emacs just always send an appdefined event instead of trying to figure out whether it might have one sent already. Is this known to be bad somehow?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924)
2016-07-20 18:35 ` Bob Halley
@ 2016-07-20 19:31 ` Alan Third
0 siblings, 0 replies; 6+ messages in thread
From: Alan Third @ 2016-07-20 19:31 UTC (permalink / raw)
To: Bob Halley; +Cc: 23924
On Wed, Jul 20, 2016 at 11:35:33AM -0700, Bob Halley wrote:
> I have a concern about this patch now, as this morning my emacs,
> running with it, simply froze and was unresponsive to any input.
> This sounds like the description of 18993.
I guess it’s back to the drawing board. :(
> I didn't have any trouble when I made emacs just always send an
> appdefined event instead of trying to figure out whether it might
> have one sent already. Is this known to be bad somehow?
Well, it seems to me that it could delay processing of input events in
certain circumstances. It maybe wouldn’t be a big deal, but I don’t
know for certain.
--
Alan Third
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-07-20 19:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <FD3A3DF6-F8E6-41B9-BAE9-61D99C64941D@gmail.com>
2016-07-18 13:54 ` bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924) Alan Third
2016-07-11 13:13 bug#23924: 25.1.50; Emacs NSInternalInconsistencyException on macos Sierra developer beta 2 Bob Halley
2016-07-13 21:03 ` bug#23924: [PATCH] Only check for AppDefined events in OS X 10.10 (bug#23924) Alan Third
2016-07-13 23:08 ` Bob Halley
2016-07-17 14:15 ` Alan Third
2016-07-20 18:35 ` Bob Halley
2016-07-20 19:31 ` Alan Third
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).