Re: Blocked in MIDIClientCreate
Re: Blocked in MIDIClientCreate
- Subject: Re: Blocked in MIDIClientCreate
- From: Doug Wyatt <email@hidden>
- Date: Mon, 12 Dec 2005 14:41:10 -0800
On Dec 12, 2005, at 7:53, philippe wicker wrote:
Hi all,
I'm having a problem with a MIDI app running on Mac OS X (10.4.2)
when this app is killed ("terminated" within the debugger). This
app communicates with a 2.0 USB Audio/MIDI device (under
development as is the MIDI app).
When the application is killed and relaunched, It stays blocked in
the call to MIDIClientCreate. The stack displayed in the debugger
window shows that it is waiting for a reply in the call to
FindOrLaunchServer. I can see using "top" that the MIDIServer is
running at that time. The only way I've found to revert to a
working situation is to unplug and replug the device.
I suspected first that the problem was a consequence of
MIDIClientDispose not being called when the app is killed but I
think that CoreMidi does clean up the client "connection" resources
when it "unexpectedly" exits. Am I right assuming this?
yes
I did some tests using 2 MIDI devices available in the market. The
1st one uses a vendor driver, the 2nd one relies on the generic USB
MIDI driver. I couldn't reproduce the blocking behavior with these
devices. So I'd tend to think that there's something wrong with my
device but I've no idea where to look at :(
What's happening when a MIDI client is killed with regard to the
actual device (e.g. any USB requests sent to it)?
What's happening when MIDIClientCreate is called with regard to the
actual device (e.g. any USB requests sent to it)?
What could cause the call to FindOrLaunchServer to be blocking?
Any idea?
Check your console log to see if there's a more specific error, but
it looks like MIDIServer is running but it is not responding to the
Mach messages from the client. The client-side framework will wait up
to 30 seconds before timing out and returning an error.
So the question is, why is the MIDIServer hanging? It would appear
that your driver has something to do with that... let me know if you
have more questions.
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden