unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: "Jan D." <jan.h.d@swipnet.se>
Cc: 18848@debbugs.gnu.org
Subject: bug#18848: hang is in [EmacsApp run] (24.4.51; Hang after toolbar use)
Date: Sat, 8 Nov 2014 12:06:53 -0500	[thread overview]
Message-ID: <6E925F6B-08EE-4852-9FDC-1FF42394FD96@gmail.com> (raw)
In-Reply-To: <2610EED0-EA68-4F0E-A939-F4712EE33A99@swipnet.se>

Your change does not help.
 I think it’s a Yosemite bug.  Below is a workaround.

--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4748,11 +4766,18 @@ ns_term_shutdown (int sig)
         [pool release];
         pool = [[NSAutoreleasePool alloc] init];

+       /* OSX 10.10.1 seems to swallow AppDefined events when
+          other events are put in the queue in rapid succession.
+          To prevent Emacs becoming unresponsive, we need to
+          set a reasonable timeout. */
         NSEvent *event =
           [self nextEventMatchingMask:NSAnyEventMask
-                            untilDate:[NSDate distantFuture]
+                            untilDate:[NSDate dateWithTimeIntervalSinceNow:0.5]
                                inMode:NSDefaultRunLoopMode
                               dequeue:YES];
+       if (event == nil) // timeout
+         { shouldKeepRunning = NO;}
+       else
         [self sendEvent:event];
         [self updateWindows];
     } while (shouldKeepRunning);


> On Nov 8, 2014, at 11:34 AM, Jan D. <jan.h.d@swipnet.se> wrote:
> 
> I can't reproduce this, but made some changes, please try it.
> 
> 	Jan D.
> 
>> 29 okt 2014 kl. 14:47 skrev David Reitter <david.reitter@gmail.com>:
>> 
>> This occurs in OS X 10.10 “Yosemite”, but not earlier.
>> 
>> events on the NS side are received and put into the emacs event queue.  
>> 
>> Attaching full call stack below for reference.
>> 
>> * frame #0: 0x00007fff909a952e libsystem_kernel.dylib`mach_msg_trap + 10
>>   frame #1: 0x00007fff909a869f libsystem_kernel.dylib`mach_msg + 55
>>   frame #2: 0x00007fff8598db14 CoreFoundation`__CFRunLoopServiceMachPort + 212
>>   frame #3: 0x00007fff8598cfdb CoreFoundation`__CFRunLoopRun + 1371
>>   frame #4: 0x00007fff8598c838 CoreFoundation`CFRunLoopRunSpecific + 296
>>   frame #5: 0x00007fff919f943f HIToolbox`RunCurrentEventLoopInMode + 235
>>   frame #6: 0x00007fff919f91ba HIToolbox`ReceiveNextEventCommon + 431
>>   frame #7: 0x00007fff919f8ffb HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
>>   frame #8: 0x00007fff89ca8821 AppKit`_DPSNextEvent + 964
>>   frame #9: 0x00007fff89ca7fd0 AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
>>   frame #10: 0x00000001002b2e8b Emacs`-[EmacsApp run](self=0x0000000101420b20, _cmd=0x00007fff8a607034) + 379 at nsterm.m:4497
>>   frame #11: 0x00000001002c4ce7 Emacs`ns_read_socket(terminal=0x0000000102823678, hold_quit=0x00007fff5fbfbfa0) + 855 at nsterm.m:3641
>>   frame #12: 0x0000000100145c6d Emacs`gobble_input + 173 at keyboard.c:6850
>>   frame #13: 0x000000010014be85 Emacs`get_input_pending(flags=3) + 117 at keyboard.c:6771
>>   frame #14: 0x0000000100150c5d Emacs`Finput_pending_p(check_timers=4345311338) + 173 at keyboard.c:9940
>>   frame #15: 0x0000000100201d44 Emacs`Ffuncall(nargs=2, args=0x00007fff5fbfc130) + 1044 at eval.c:2812
>>   frame #16: 0x000000010025be60 Emacs`exec_byte_code(bytestr=4298564145, vector=4298564181, maxdepth=28, args_template=3076, nargs=1, args=0x00007fff5fbfc838) + 3504 at bytecode.c:916
>>   frame #17: 0x0000000100202e84 Emacs`funcall_lambda(fun=4298564101, nargs=1, arg_vector=0x00007fff5fbfc830) + 500 at eval.c:2979
>>   frame #18: 0x0000000100201f6c Emacs`Ffuncall(nargs=2, args=0x00007fff5fbfc828) + 1596 at eval.c:2861
>>   frame #19: 0x000000010025be60 Emacs`exec_byte_code(bytestr=4299852505, vector=4299852541, maxdepth=16, args_template=4345311290, nargs=0, args=0x0000000000000000) + 3504 at bytecode.c:916
>>   frame #20: 0x0000000100203261 Emacs`funcall_lambda(fun=4299852461, nargs=0, arg_vector=0x00007fff5fbfcf30) + 1489 at eval.c:3045
>>   frame #21: 0x0000000100201f6c Emacs`Ffuncall(nargs=1, args=0x00007fff5fbfcf28) + 1596 at eval.c:2861
>>   frame #22: 0x000000010025be60 Emacs`exec_byte_code(bytestr=4299813801, vector=4299813837, maxdepth=20, args_template=4345311290, nargs=0, args=0x0000000000000000) + 3504 at bytecode.c:916
>>   frame #23: 0x0000000100203261 Emacs`funcall_lambda(fun=4299813757, nargs=0, arg_vector=0x00007fff5fbfd630) + 1489 at eval.c:3045
>>   frame #24: 0x0000000100201f6c Emacs`Ffuncall(nargs=1, args=0x00007fff5fbfd628) + 1596 at eval.c:2861
>>   frame #25: 0x000000010025be60 Emacs`exec_byte_code(bytestr=4299812881, vector=4299812917, maxdepth=16, args_template=4345311290, nargs=0, args=0x0000000000000000) + 3504 at bytecode.c:916
>>   frame #26: 0x0000000100203261 Emacs`funcall_lambda(fun=4299812741, nargs=4, arg_vector=0x00007fff5fbfdd30) + 1489 at eval.c:3045
>>   frame #27: 0x0000000100201f6c Emacs`Ffuncall(nargs=5, args=0x00007fff5fbfdd28) + 1596 at eval.c:2861
>>   frame #28: 0x000000010025be60 Emacs`exec_byte_code(bytestr=4299811305, vector=4299811341, maxdepth=20, args_template=4345311290, nargs=0, args=0x0000000000000000) + 3504 at bytecode.c:916
>>   frame #29: 0x0000000100203261 Emacs`funcall_lambda(fun=4299811205, nargs=2, arg_vector=0x00007fff5fbfe458) + 1489 at eval.c:3045
>>   frame #30: 0x0000000100201f6c Emacs`Ffuncall(nargs=3, args=0x00007fff5fbfe450) + 1596 at eval.c:2861
>>   frame #31: 0x00000001001faa43 Emacs`Fcall_interactively(function=4370705002, record_flag=4345311290, keys=4370471557) + 9155 at callint.c:836
>>   frame #32: 0x0000000100201d9a Emacs`Ffuncall(nargs=4, args=0x00007fff5fbfe8d8) + 1130 at eval.c:2819
>>   frame #33: 0x000000010025be60 Emacs`exec_byte_code(bytestr=4299358761, vector=4299358797, maxdepth=52, args_template=4100, nargs=1, args=0x00007fff5fbff030) + 3504 at bytecode.c:916
>>   frame #34: 0x0000000100202e84 Emacs`funcall_lambda(fun=4299358717, nargs=1, arg_vector=0x00007fff5fbff028) + 500 at eval.c:2979
>>   frame #35: 0x0000000100201f6c Emacs`Ffuncall(nargs=2, args=0x00007fff5fbff020) + 1596 at eval.c:2861
>>   frame #36: 0x0000000100202839 Emacs`call1(fn=4370480538, arg1=4370705002) + 73 at eval.c:2611
>>   frame #37: 0x00000001001421c7 Emacs`command_loop_1 + 2391 at keyboard.c:1559
>>   frame #38: 0x00000001001ffb9c Emacs`internal_condition_case(bfun=0x0000000100141870, handlers=4370487930, hfun=0x000000010015bcf0) + 396 at eval.c:1348
>>   frame #39: 0x000000010015bbe9 Emacs`command_loop_2(ignore=4345311290) + 41 at keyboard.c:1177
>>   frame #40: 0x00000001001ff1d4 Emacs`internal_catch(tag=4370484122, func=0x000000010015bbc0, arg=4345311290) + 356 at eval.c:1112
>>   frame #41: 0x0000000100140deb Emacs`command_loop + 187 at keyboard.c:1156
>>   frame #42: 0x0000000100140cb4 Emacs`recursive_edit_1 + 132 at keyboard.c:777
>>   frame #43: 0x0000000100140f97 Emacs`Frecursive_edit + 327 at keyboard.c:848
>>   frame #44: 0x000000010013ef89 Emacs`main(argc=2, argv=0x00007fff5fbff680) + 5929 at emacs.c:1646
>>   frame #45: 0x00007fff8ed825c9 libdyld.dylib`start + 1
>> 
> 






  reply	other threads:[~2014-11-08 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  1:57 bug#18848: 24.4.51; Hang after toolbar use David Reitter
     [not found] ` <handler.18848.B.141437508615391.ack@debbugs.gnu.org>
2014-10-28  0:40   ` bug#18848: Acknowledgement (24.4.51; Hang after toolbar use) David Reitter
2014-10-29  3:51     ` bug#18848: hang is in [EmacsApp run] " David Reitter
2014-10-29 13:47       ` David Reitter
2014-11-08 16:34         ` Jan D.
2014-11-08 17:06           ` David Reitter [this message]
2014-11-08 17:19             ` Jan D.
2014-11-08 18:03               ` David Reitter
2014-11-15 18:24         ` Jan D.
2014-11-07 18:24 ` bug#18848: Yosemite problem David Reitter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6E925F6B-08EE-4852-9FDC-1FF42394FD96@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=18848@debbugs.gnu.org \
    --cc=jan.h.d@swipnet.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).