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

Is It can not use boost::archive::binary_iarchive in develop ai plugin?

Guest
Oct 19, 2010 Oct 19, 2010

if you write these code in you program:

#include <boost/serialization/access.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
            std::ifstream ifs("d:\\haha");
            boost::archive::binary_iarchive ia(ifs);

plug-in can't be load;

is it a bug?

TOPICS
SDK
6.7K
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

Community Beginner , Nov 02, 2010 Nov 02, 2010

Hi,

I looked at your code and tried to debug your problem.

The problem is happenning because boost's serialization creates a static singleton instance. The static members are initialized at the time of dll attach, so before calling any function of the plugin, boost tries to allocate memory for the static instance.

You have included ASMemory.cpp which overrides the new operator, therefore this new operator is called at the time of static member construction.

However new fails to allocate memory since

...
Translate
Adobe
Guest
Nov 05, 2010 Nov 05, 2010
LATEST

Thank you very much!

I tried the first method, but when the illustrator is closed, the program crashes and error prompts appear.
I think the second method is not suitable for me, because I do not want to use the other dll
So, I think I do not use the boost serialization library

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