#876: EXC_BAD_ACCESS using IOBluetooth -------------------------------------------+-------------------------------- Reporter: matt.wizeman@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- Comment(by matt.wizeman@…): Sorry for the confusion on the attachment. I didn't want you to have to use an actual bluetooth device to try out the code, so I was attempting to demonstrate the problem without using IOBluetooth. The IOBluetooth callback that causes the crash is: {{{ - (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel data:(void *)dataPointer length:(size_t)dataLength; }}} which I've implemented in my ruby code as: {{{ def l2capChannelData l2capChannel, data:data, length:dataLength }}} At least I think this is the case because if I comment out that method the application no longer crashes. I tried to get the method name in the debugger as requested but didn't have any luck. I got: {{{ (gdb) bt #0 0x00007fff80bbc5f0 in object_getClass () #1 0x00000001000ed2d3 in rb_objc_nsnumber2numeric () #2 0x0000000103f09630 in ?? () #3 0x00007fff86c1ddd6 in -[IOBluetoothL2CAPChannel processIncomingData:] () #4 0x00007fff86c1c767 in -[IOBluetoothL2CAPChannel handleMachMessage:] () #5 0x00007fff820bf07f in __NSFireMachPort () #6 0x00007fff831b7bce in __CFMachPortPerform () #7 0x00007fff83190171 in __CFRunLoopRun () #8 0x00007fff8318e84f in CFRunLoopRunSpecific () #9 0x00007fff8766491a in RunCurrentEventLoopInMode () #10 0x00007fff8766471f in ReceiveNextEventCommon () #11 0x00007fff876645d8 in BlockUntilNextEventMatchingListInMode () #12 0x00007fff838ed29e in _DPSNextEvent () #13 0x00007fff838ecbed in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #14 0x00007fff838b28d3 in -[NSApplication run] () #15 0x00007fff838ab5f8 in NSApplicationMain () #16 0x0000000103f02dcd in ?? () #17 0x0000000100140c94 in rb_vm_dispatch () #18 0x0000000103f01260 in ?? () #19 0x0000000103f00a1b in ?? () #20 0x000000010014ec08 in rb_vm_run () #21 0x0000000100040650 in ruby_run_node () #22 0x000000010014f06d in macruby_main () #23 0x0000000100000efe in main (argc=1, argv=0x7fff5fbff640) (gdb) p rb_symbolicate(0x0000000103f09630) warning: Cancelling call - objc code on the current thread's stack makes this unsafe. warning: Canceling call as the ObjC runtime would deadlock. Unable to call function "rb_symbolicate" at 0x100147be0: no return type information available. To call this function anyway, you can cast the return type explicitly (e.g. 'print (float) fabs (3.0)') }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/876#comment:7> MacRuby <http://macruby.org/>