Photoshop plugin with Cocoa UI problems
Photoshop plugin with Cocoa UI problems
- Subject: Photoshop plugin with Cocoa UI problems
- From: Frederik Slijkerman <email@hidden>
- Date: Wed, 10 Jun 2009 16:07:34 +0200
Hi all,
I'm trying to make a Photoshop plugin with a Cocoa user interface, but
I'm running into a persistent problem: after closing the plugin window,
Photoshop crashes 90% of the time with the following call stack:
#0 0xa04590d8 in _XHNDL_trapback_instruction
#1 0xbf800fac in ??
#2 0x917ea9a2 in __CFRunLoopDoObservers
#3 0x917ebcfc in CFRunLoopRunSpecific
#4 0x917eccd8 in CFRunLoopRunInMode
#5 0x969f42c0 in RunCurrentEventLoopInMode
#6 0x96aa7904 in GetNextEventMatchingMask
#7 0x96aa7766 in WNEInternal
#8 0x96aa76c5 in WaitNextEvent
I've tried every suggestion I could find. The main plugin is a Carbon
bundle that locates the Cocoa bundle that actually contains the core
plugin as suggested here:
http://furbo.org/2008/07/08/plug-ins-the-cocoa-way/
The Cocoa bundle exports a plugin entry point as a C function. The
Carbon bundle calls this from its own entry point using CFBundleCreate /
CFBundleGetFunctionPointerForName, but it never releases the Cocoa
bundle since apparently Cocoa bundles should not be unloaded. The whole
idea behind this, as far as I can see, is that Photoshop unloads the
Carbon bundle, but does not unload the core Cocoa bundle.
Next, the Cocoa bundle calls NSApplicationLoad, displays an empty window
using [NSApp runModalForWindow], then closes the window and returns. At
this point, I get the aforementioned crash.
What am I doing wrong? Any pointers would be highly appreciated -- I've
been staring at this for about three days now...
Best regards,
Frederik Slijkerman
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden