[MacRuby] #1463: MacRuby crash with accessibility notifications and Method callbacks

MacRuby ruby-noreply at macosforge.org
Wed Feb 15 12:28:02 PST 2012


#1463: MacRuby crash with accessibility notifications and Method callbacks
------------------------------------+---------------------------------------
 Reporter:  mrada@…                 |       Owner:  lsansonetti@…        
     Type:  defect                  |      Status:  new                  
 Priority:  blocker                 |   Milestone:                       
Component:  MacRuby                 |    Keywords:                       
------------------------------------+---------------------------------------
 When I use accessibility for notifications, I have to register a callback.
 I've exclusively been using Procs for the callbacks in the past and they
 work fine.

 However, if I try to setup a Method for the callback instead then MacRuby
 will crash sometimes. It seems as though there is something go wrong with
 treating the callback as if it were a Proc:

 {{{

 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
 0   libobjc.A.dylib                     0x00007fff91b1995b
 _class_getSuperclass + 9
 1   libmacruby.dylib                    0x000000010353fa33 rb_objc_type +
 179
 2   libmacruby.dylib                    0x000000010358302d
 rb_check_convert_type + 125
 3   libmacruby.dylib                    0x0000000103562471
 rb_proc_check_and_call + 49
 4   ???                                 0x00000001050ad06c 0 + 4379562092
 5   com.apple.HIServices                0x00007fff98b095c5
 _XXMIGPostNotification + 904
 6   com.apple.HIServices                0x00007fff98b19c25
 _XPostNotification + 618
 7   com.apple.HIServices                0x00007fff98af1b12 mshMIGPerform +
 564
 8   com.apple.CoreFoundation            0x00007fff99afccac
 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 44
 9   com.apple.CoreFoundation            0x00007fff99afc9db
 __CFRunLoopDoSource1 + 155
 10  com.apple.CoreFoundation            0x00007fff99b33117 __CFRunLoopRun
 + 1895
 11  com.apple.CoreFoundation            0x00007fff99b32676
 CFRunLoopRunSpecific + 230
 12  com.apple.Foundation                0x00007fff9a149f9f
 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
 13  com.apple.Foundation                0x00007fff9a1cdb7a
 -[NSRunLoop(NSRunLoop) runUntilDate:] + 66
 14  ???                                 0x00000001050ad723 0 + 4379563811
 15  libmacruby.dylib                    0x000000010363caa8 rb_vm_dispatch
 + 5848
 16  ???                                 0x00000001050ac094 0 + 4379558036
 17  ???                                 0x00000001050ab674 0 + 4379555444
 18  libmacruby.dylib                    0x000000010364c156 rb_vm_run + 534
 19  libmacruby.dylib                    0x0000000103556f33 ruby_run_node +
 83
 20  macruby                             0x0000000103525d18 main + 152
 21  macruby                             0x0000000103525c74 start + 52

 }}}


 I have a small script that reproduces the issue. When you run the script,
 just start creating new Finder windows and MacRuby will crash. Sometimes
 it crashes after a couple of new windows and sometimes it crashes after 10
 new windows.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1463>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list