CoreMIDI virtual destinations crash on 10.11

Hi,


I am experiences MIDI crashes with virtual CoreMIDI destinations. The crash happening randomly, without sending any MIDI messages to the destinations. What I found also the crash is only happening when there are other MIDI sources too - like IAC or a hardware MIDI controller - and I use team (so an input port have been created for them).


There crash always looks like this, and the same code works on 10.8 and later:


Crashed Thread: 0 Dispatch queue: com.apple.main-thread



Exception Type: EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: EXC_I386_GPFLT

Exception Note: EXC_CORPSE_NOTIFY



Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0 com.apple.audio.midi.CoreMIDI 0x000000010c6c8462 MIDIClientCallbackListener_Notify + 242

1 com.apple.audio.midi.CoreMIDI 0x000000010c6a0b6e _XNotify + 74

2 com.apple.audio.midi.CoreMIDI 0x000000010c6c7fe7 mshMIGPerform + 217

3 com.apple.CoreFoundation 0x00007fff958df0a9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41

4 com.apple.CoreFoundation 0x00007fff958df019 __CFRunLoopDoSource1 + 473

5 com.apple.CoreFoundation 0x00007fff958d065b __CFRunLoopRun + 2171

6 com.apple.CoreFoundation 0x00007fff958cfb78 CFRunLoopRunSpecific + 296

7 com.apple.HIToolbox 0x00007fff838a13e5 RunCurrentEventLoopInMode + 235

8 com.apple.HIToolbox 0x00007fff838a117b ReceiveNextEventCommon + 432

9 com.apple.HIToolbox 0x00007fff838a0fbb _BlockUntilNextEventMatchingListInModeWithFilter + 71

10 com.apple.AppKit 0x00007fff9373dae7 _DPSNextEvent + 1076

11 com.apple.AppKit 0x00007fff93b09ac5 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 440

12 com.apple.AppKit 0x00007fff93733986 -[NSApplication run] + 682

13 com.apple.AppKit 0x00007fff936b5e9a NSApplicationMain + 1176


Anyone else facing with this issue too?

Replies

I'm experiencing the same crash in code that has been working for a while. Did you ever get anywhere with this?


Thanks


Crashed Thread:        0  Dispatch queue: com.apple.main-thread


Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY


Global Trace Buffer (reverse chronological seconds):
21.464838    CFNetwork                 0x00007fff890d8927 TCP Conn 0x7fe1c261d510 complete. fd: 38, err: 0
21.465259    CFNetwork                 0x00007fff89167121 TCP Conn 0x7fe1c261d510 event 1. err: 0
21.544563    CFNetwork                 0x00007fff890d7bf7 TCP Conn 0x7fe1c261d510 started
24.911580    CFNetwork                 0x00007fff890d8927 TCP Conn 0x7fe204e3f220 complete. fd: 26, err: 0
24.911938    CFNetwork                 0x00007fff89167121 TCP Conn 0x7fe204e3f220 event 1. err: 0
24.977289    CFNetwork                 0x00007fff890d7bf7 TCP Conn 0x7fe204e3f220 started
31.256583    CFNetwork                 0x00007fff890da07b TCP Conn 0x7fe2024ccfa0 SSL Handshake DONE
31.338510    CFNetwork                 0x00007fff890d9f57 TCP Conn 0x7fe2024ccfa0 starting SSL negotiation
31.338623    CFNetwork                 0x00007fff890d8927 TCP Conn 0x7fe2024ccfa0 complete. fd: 13, err: 0
31.338889    CFNetwork                 0x00007fff89167121 TCP Conn 0x7fe2024ccfa0 event 1. err: 0
31.432656    CFNetwork                 0x00007fff890d7bf7 TCP Conn 0x7fe2024ccfa0 started
119.971160   CFNetwork                 0x00007fff890da07b TCP Conn 0x7fe204c42f20 SSL Handshake DONE
119.996055   CFNetwork                 0x00007fff890da07b TCP Conn 0x7fe204d03b70 SSL Handshake DONE
120.072531   CFNetwork                 0x00007fff890d9f57 TCP Conn 0x7fe204c42f20 starting SSL negotiation
120.072611   CFNetwork                 0x00007fff890d8927 TCP Conn 0x7fe204c42f20 complete. fd: 26, err: 0
120.072858   CFNetwork                 0x00007fff89167121 TCP Conn 0x7fe204c42f20 event 1. err: 0
120.086849   CFNetwork                 0x00007fff890d9f57 TCP Conn 0x7fe204d03b70 starting SSL negotiation
120.086935   CFNetwork                 0x00007fff890d8927 TCP Conn 0x7fe204d03b70 complete. fd: 19, err: 0
120.087230   CFNetwork                 0x00007fff89167121 TCP Conn 0x7fe204d03b70 event 1. err: 0
120.141916   CFNetwork                 0x00007fff890d7bf7 TCP Conn 0x7fe204c42f20 started
120.203125   CFNetwork                 0x00007fff890d7bf7 TCP Conn 0x7fe204d03b70 started
122.163161   CFNetwork                 0x00007fff890d8927 TCP Conn 0x7fe2026b93f0 complete. fd: 13, err: 0
122.163491   CFNetwork                 0x00007fff89167121 TCP Conn 0x7fe2026b93f0 event 1. err: 0
122.250081   CFNetwork                 0x00007fff890d7bf7 TCP Conn 0x7fe2026b93f0 started
122.251364   CFNetwork                 0x00007fff8909b75e Creating default cookie storage with process/bundle identifier
122.251364   CFNetwork                 0x00007fff8909b6f6 Faulting in CFHTTPCookieStorage singleton
122.251364   CFNetwork                 0x00007fff8909b585 Faulting in NSHTTPCookieStorage singleton


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.audio.midi.CoreMIDI 0x0000000102d12462 MIDIClientCallbackListener_Notify + 242
1   com.apple.audio.midi.CoreMIDI 0x0000000102ceab6e _XNotify + 74
2   com.apple.audio.midi.CoreMIDI 0x0000000102d11fe7 mshMIGPerform + 217
3   com.apple.CoreFoundation       0x00007fff9a24ae79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
4   com.apple.CoreFoundation       0x00007fff9a24ade9 __CFRunLoopDoSource1 + 473
5   com.apple.CoreFoundation       0x00007fff9a24281b __CFRunLoopRun + 2171
6   com.apple.CoreFoundation       0x00007fff9a241d38 CFRunLoopRunSpecific + 296
7   com.apple.HIToolbox           0x00007fff954fad55 RunCurrentEventLoopInMode + 235
8   com.apple.HIToolbox           0x00007fff954fab8f ReceiveNextEventCommon + 432
9   com.apple.HIToolbox           0x00007fff954fa9cf _BlockUntilNextEventMatchingListInModeWithFilter + 71
10  com.apple.AppKit               0x00007fff8b321f3a _DPSNextEvent + 1067
11  com.apple.AppKit               0x00007fff8b321369 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
12  com.apple.AppKit               0x00007fff8b315ecc -[NSApplication run] + 682
13  com.apple.AppKit               0x00007fff8b2df162 NSApplicationMain + 1176
14  libdyld.dylib                 0x00007fff982a95ad start + 1

lov,


Are you using the VVMIDI framework?


Thanks

Hello,


yes, I am using the VVMIDI framework, and this issue has been resolved a while ago: https://github.com/mrRay/vvopensource/commit/c129e5b4a0ddeb0ea2e27065451e4d4f25a3217b

This crash still occurs in the release version of El Capitan. For me it occurs when disconnecting a USB keyboard while running a program which uses the MIDIClientCallbackListener_Notify mechanisms.


- Rick