Subject: bug#23924: 25.1.50; Emacs NSInternalInconsistencyException on macos Sierra developer beta 2

From: Bob Halley <[email-masked]>
Date: Mon, 11 Jul 2016 06:13:59 -0700

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 :)