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

CS5 Plugin crash

Guest
Sep 24, 2010 Sep 24, 2010

We've taken over development of a AI plugin that was apparently built on the CS3 SDK.  This seems to run fine in CS3 and CS4, but crashes in CS5.  The stack trace seems to vary every time, but a typical one is very ambiguous and looks like:

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread

0   com.adobe.illustrator         0x006c1eba AWS_CUI_RevertAlert(OpaqueWindowPtr*, adobe::aws::gen::String<unsigned short>&, adobe::aws::gen::String<unsigned short>&) + 3695890

1   com.adobe.illustrator         0x006c6794 AWS_CUI_RevertAlert(OpaqueWindowPtr*, adobe::aws::gen::String<unsigned short>&, adobe::aws::gen::String<unsigned short>&) + 3714540

2   com.adobe.illustrator         0x001b4b46 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 1671922

3   com.adobe.illustrator         0x006c716b AWS_CUI_RevertAlert(OpaqueWindowPtr*, adobe::aws::gen::String<unsigned short>&, adobe::aws::gen::String<unsigned short>&) + 3717059

4   com.adobe.illustrator         0x006c0a23 AWS_CUI_RevertAlert(OpaqueWindowPtr*, adobe::aws::gen::String<unsigned short>&, adobe::aws::gen::String<unsigned short>&) + 3690619

5   com.adobe.illustrator         0x001b3280 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 1665580

6   com.adobe.illustrator         0x001b4a1d AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 1671625

7   com.adobe.illustrator         0x0010af6a AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 976662

8   com.adobe.illustrator         0x0004f59d AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 208201

9   com.adobe.illustrator         0x0005015e AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 211210

10  com.adobe.illustrator         0x0004f8e4 AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 209040

11  com.adobe.illustrator         0x0010a5cd AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 974201

12  com.adobe.illustrator         0x000cc97e AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 721194

13  com.adobe.illustrator         0x00003346 0x1000 + 9030

And I seem to get into states where the plugin won't crash AI and I can successfully use it, but it's hard to know why.  I saw some reference to similar issues on this forum, but there were no clear answers.  Does anyone have any insight into this issue?  Many thanks.
Jeff

TOPICS
SDK
3.2K
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
Contributor ,
Sep 24, 2010 Sep 24, 2010

Hi Jeff,

Have you tried compiling the plugin with the CS5 SDK?

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 ,
Sep 24, 2010 Sep 24, 2010

A good suggestion if you haven't already tried it. Sometimes structs change from SDK to SDK (I know AIDocumentSetup has) and if you use the wrong one you could get some wierd results.

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
Guest
Sep 24, 2010 Sep 24, 2010

Hi - I have not.  It's a fairly complex plugin which doesn't look like it's a simple drop-in of the new SDK.  Should CS3-based plugins not be forward compatible with CS5?

The odd thing is that it works occasionally and I can use it with no problem.  I've tried debugging in Xcode, but can't trace the actual problem - it's as if something is getting corrupt causing the later crash.  I keep seeing this AWS_CUI_RevertAlert in the crash logs - is that indicative of anything or more a red herring?

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
Contributor ,
Sep 24, 2010 Sep 24, 2010

If you can't drop it in CS5 and compile it (with few or no issues), there is a good chance that it might not be compatible. It could also help reveal what might be incompatible.

Adobe states the following in their Programmer's Guide:

Illustrator makes its best effort to support binary compatibility across two previous product versions. For example, this means a plug-in built with the Illustrator CS3 SDK or Illustrator CS4 SDK should load and run under Illustrator CS5. Changes to the development, operating system, or hardware platform can compromise this objective.

However, I have had my plugins crash compiled for prior versions that don't crash when compiled for the current version.

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
Guest
Sep 25, 2010 Sep 25, 2010

Thanks guys for the responses.

I've updated to the CS5 SDK but am still seeing the same problem.  I'm stumped at this point - I can only assume that there's a fundamental problem with the plugin somewhere that is for some reason being revealed more readily in CS5 (ie it's trashing memory somewhere).  If you have any other thoughts about what the problem might, it's greatly appreciated.

Jeff

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 Employee ,
Sep 25, 2010 Sep 25, 2010

some thoughts:

Have you seen if your plug-in is unloaded and reloaded by Illustrator many times? When a plug-in is reloaded, it might be loaded to another address in memory. You can set a breakpoint in UnloadPlugin() and ReloadPlugin() to debug. You can also use Plugin::LockPlugin() to lock your plug-in so that it is not unloaded.

Not sure if this is helpful to you.

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 ,
Sep 27, 2010 Sep 27, 2010

Also, when is it crashing? Right as startup? Or when you go to run something? If during start-up, can you catch it entering your plugin at least once? Does it die somewhere in your plugin?

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
Guest
Sep 27, 2010 Sep 27, 2010

Yes, it crashes during the plugin load phase while the splash screen is up.  I can debug the plugin in Xcode and see it entering my plugin at multiple points, but I can't trace the exact point where it dies - the stack trace varies per crash, but I have seen it crash multiple times when trying to add a sub-menu.  My suspicion is that the plugin is somehow trashing memory causing the later crash.

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
New Here ,
Feb 10, 2011 Feb 10, 2011

Hi

I'm faced with exactly the same issue. I have a plugin built with CS3 SDK, it's working fine with Illustrator CS3 and CS4 but not with CS5. On Windows, it's working even with CS5, but on MacOS it won't. It almost always crashes right on startup (after the plugin handles the kSPInterfaceStartupSelector message, and control is returned to AI), but occasianally AI starts and it will crash at some later point. The callstack I get when AI crashes looks the same as yours. I've also tried to build the plugin with CS5 SDK, but I get the same results.

Have you been able to solve this issue somehow? Does anybody have an idea where to look for problems?

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
New Here ,
Feb 10, 2011 Feb 10, 2011

Yes, we did resolve it!  It came down to one line in our .r file:

#define PIPL_ENTRY "PluginMain"

When that is defined, it crashes - when removed, the plugin runs fine.

I went through Adobe tech support on this and they logged a bug on it, but removing that line (if you have it) should fix the problem.

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
New Here ,
Feb 14, 2011 Feb 14, 2011
LATEST

I had that line in the resource file, removed it, and now the plugin runs in CS5.

Thanks for the help! You saved me a lot of time!

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
Guest
Sep 27, 2010 Sep 27, 2010

Reload seems to get called once prior to PluginStartup.

I'll try LockPlugin to see if that helps any.  Thanks.

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