title: MidiClientCreate "The operation couldn't be completed. (OSStatus error -50.)"
body: <p>I'm trying to debug a MIDI issue in a complex iOS / Objective-C software.
  It appears on this call :</p>
  
  <pre><code>OSStatus s;
  MIDIClientRef midi_client_ref;
  s = MIDIClientCreate((CFStringRef)@"MIDIPlayerSetup MIDI Client", NULL, NULL,
                       &amp;midi_client_ref);
  </code></pre>
  
  <p>Most of the time everything works fine but sometimes the returned OSStatus is a -50 code (bad parameter).</p>
  
  <p>But as you can see and like in many example of MIDIClientCreate on the web, the explicit parameters can't really be the problem. I even tried to have an unique name with no effect.</p>
  
  <p>To orientate my search, I would need to have a more precise idea of what is going on in the underlying client creation that could provoke this bad parameter issue.</p>
  
  <p>Any guess is welcome !</p>
  
  <p><strong>UPDATE :</strong> someone got the same issue <a href="http://lists.apple.com/archives/coreaudio-api/2013/Sep/msg00014.html" rel="nofollow">here</a> and solved it. He says "It was caused by an uninitalised variable.".</p>
  
  <p>That's an indication, but not enough to lead me to my mistake...</p>