Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using the XMP Toolkit in Illustrator

Explorer ,
Apr 17, 2014 Apr 17, 2014

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?

TOPICS
SDK
972
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Apr 22, 2014 Apr 22, 2014

Please ignore this post. The problem was in my own code. I was stomping over memory that wasn't mine to stomp over.

/idiot

Translate
Adobe
Explorer ,
Apr 22, 2014 Apr 22, 2014
LATEST

Please ignore this post. The problem was in my own code. I was stomping over memory that wasn't mine to stomp over.

/idiot

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines