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

Using Zllib, Xerces and Boost (in release mode)

Enthusiast ,
Mar 26, 2009 Mar 26, 2009
I've developped a Export plugin which used Zlib, Xerces, and Boost libs. (This libs are used in a statically.)

In debug mode, the plugin is loaded correctly, and worked fine.

I want to build this plugin in a release mode, in order to test it on an designer's workstation.

The compilation is executed without problems. the same for link operations. But when I tried to load at Illustrator's startup, a message box is shown, telling me my plugin was not loaded correctly, and not loaded at all.

I've took a look at my project settings, to check if my settings were ok (used static libs in debug or release mode), if there was no conflicts in precompiled header............

I did not find! So if someone would have some tips to help me, it would be great!

Thx,

Thomas.
TOPICS
SDK
2.4K
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
Adobe
Guide ,
Mar 26, 2009 Mar 26, 2009
Sounds like the proper DLLs simply aren't present. Xerces, Boost & Zlib all have debug & release DLLs, make 100% sure you've got the right ones in there. I'm pretty sure when you don't you get that behaviour.

Also, make sure you've got them in the right place. They need to be in Support Files\Contents\Windows\ or it won't see them.
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
Guide ,
Mar 26, 2009 Mar 26, 2009
Hold on, you mentioned static libs -- are you using dynamic linking or static? We use Xerces & Boost in our plug-in and they both required putting DLLs in the above-mentioned folder.
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
Enthusiast ,
Mar 26, 2009 Mar 26, 2009
Static linking is used. Additional directories for header fils and libs are set (added) correctly in the project settings.
I've got two distinct config for debug and release mode.
In debug mode, it works fine. Compiling, running the pluging is easy as 1,2,3. 😉 Since libs are linked in a static mode (debug version), i've got only myplugin.aip.

In a release mode, it'is exactly the same, except the fact that Xerces, Boost and Zlib libs are linked in static mode (but release version).

no errors during compiling, during linking!
but when illustrator started, my plugin did not load correctly.
No errors messages, only a message box telling that my plugin will not be loaded.
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
Guide ,
Mar 31, 2009 Mar 31, 2009
If you're not on Windows, I won't be able to help much. If you are & are still struggling with this, read on for a couple of suggestions.

First, I'd check out the event viewer. If you're having Side By Side errors -- if you're on 2005 or higher, manifests can easily botch things and they typically show up in release if they happen. If so, it should be pretty obvious. Solving that is a bit of a pain, but it's doable.

Second, I'd look at the output in Studio. If you find the place where you plugin starts to get loaded the subsequent DLL loads might give a clue as to where it goes wrong.
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
Enthusiast ,
Apr 01, 2009 Apr 01, 2009
Thx for the reply! I'll check using your solutions!
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
Enthusiast ,
Apr 06, 2009 Apr 06, 2009

Do you know if Xerces, Boost or Zlib are already used in Illustrator CS3?

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
Guide ,
Apr 06, 2009 Apr 06, 2009

I'm about 99.9% sure they aren't. We use (or have used) all three of those and we have to copy all the DLLs into the Illustrator system folder to get our plugin to run. You should be able to just look at the contents of \Support Files\Contents\Windows to see if any of those three show up as DLLs. Even if plugins use it, that's where they'd stick the DLLs.

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
Enthusiast ,
Apr 08, 2009 Apr 08, 2009

I have just took a look at Output windows at plugin startup.

A exception has been raised. Memory access violation.

'Illustrator.exe': Loaded 'D:\SVNWorkspace\IllustratorExportPlugin\Output\win\release\MyPlugin.aip', Binary was not built with debug information.
First-chance exception at 0x7c911a39 in Illustrator.exe: 0xC0000005: Access violation writing location 0x00000004.
'Illustrator.exe': Unloaded 'D:\SVNWorkspace\IllustratorExportPlugin\Output\win\release\MyPlugin.aip'

I do not have this message in debug.

So, how could I know what causes this ? what have I done wrong ?

thx.

Thomas

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
Guide ,
Apr 08, 2009 Apr 08, 2009

Well, at least you know why it's failing now. It doesn't look like a dependency issue at any rate.

Since it only happens in release, the first thing that springs to mind is an uninitialized variable or member somewhere. Studio zeroes out some variables in debug builds but doesn't in release -- I've had that cause us grief in release at least once.

If there's nothing obvious like that, your best bet is sprinkle some output in there, see if you can narrow down where it's happening. The most important one is to check the entry point, to see if you're at least getting that far. Hopefully it does, so you can start figuring out which block of code has the trouble. OutputDebugString() should do the trick, though it'll mean you need to fire up your release build in the debugger (though you obviously won't see any code).

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
Enthusiast ,
Apr 27, 2009 Apr 27, 2009
LATEST

I have finally found the problem!

After having unplugged all the code I have written and replugged the all by block of code,

I have found where I was wrong! it has taken me almost a day of work!

the probleme was in the using of #ifndef, define!

just this few lines:

#ifndef _XERCESSTRING_H
#define _XERCESSTRING_H

#include <xercesc/util/XMLString.hpp>

#ifdef XERCES_CPP_NAMESPACE_USE
XERCES_CPP_NAMESPACE_USE
#endif

I have fixed that! now project can be built in release.

Thanks for helping me!

thomas.

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