Using the XMP Toolkit in Illustrator
I'm trying to read information from the XMP metadata of a linked image in Illustrator from a Plugin. The SDK doesn't seem to provide a full API for manipulating XMP apart from the ability to obtain the XMP packet from an art object via the AIArtSuite with GetArtXMP(...) etc.
So naturally I went for Adobe's XMP Toolkit to do the hard work for me, however I've run into some strange issues that have me a little stumped. Basically, no matter what I do, after calling anything from the XMP Toolkit (SXMPMeta), I end up with either a SIGABRT or BAD_ACCESS in a random object destructor such as ai::FilePath or std::string. I assume this is due to some memory being deallocated too early based on my usage of the toolkit.
Doing a bit more reading, I see that the XMP Toolkit uses a singleton pattern under the hood. This leads me to believe that there is some conflict with Illustrator's own implementation of the toolkit and my own.
Could anyone shed any light on this? Is there another way I should be doing this? Any help anyone can give me would be hugely appreciated!
Thanks!
-W
*Edit: I've linked to the XMP Toolkit both statically and dynamically, each time with the same results.
Another interesting thing I noticed is that if I compile both my plugin and the XMP toolkit with "Symbols Hidden By Default" (GCC_SYMBOLS_PRIVATE_EXTERN) set to "NO", I don't get a crash, but I can't register my namespaces. They just don't appear in the list of namespaces even after dumping the namespace list out directly after the call to SXMPMeta::RegisterNamespace(...)
Should I be asking in the XMP Toolkit forum?