core midi errors & dynamic libraries
core midi errors & dynamic libraries
- Subject: core midi errors & dynamic libraries
- From: Wesley Smith <email@hidden>
- Date: Sun, 25 Jan 2009 14:15:18 -0800
Hi,
I'm using core midi in a library that is dynamically loaded and
unloaded during runtime. I have no problem with my code the first
time the lib is loaded, but after it is unloaded and loaded again,
there are frequently errors from basic functions like
MIDIGetNumberOfSources() and the like.
I'm using
NSLinkModule(img, path, NSLINKMODULE_OPTION_PRIVATE |
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
NSUnLinkModule
to do the (un)loading. I've noticed that if you use dlopen/dlclose,
core midi causes a bad access exception, which is really surprising.
Is core midi caching something related to the binary that calls into
it? Are ports attached in some strange way to binaries that would
cause this behavior?
Anyway, using NSLinkModule keeps core midi form crashing on the second
load, however, I'm still getting funny errors like:
*** CFMessagePort: bootstrap_register(): failed 1103 (0x44f) 'Service
name already exists', port = 0x8f0b, name = 'Apple MIDI Client'
See /usr/include/servers/bootstrap_defs.h for the error codes.
from calling MIDIGetNumberOfSources();
Anyone seen this before?
thanks,
wes
_______________________________________________
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