Hi Frederik,

Have you tried wiring your window to an IBOutlet of your Controller and displaying it with [window makeKeyAndOrderFront:nil]; ?

This works for me anyway.

HTH,
Florian.

On 10 Jun 2009, at 16:07, Frederik Slijkerman wrote:

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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/florian.soenens%40nss.be

This email sent to florian.soen...@nss.be



Looking for Web-to-Print Solutions?
Visit our website :   http://www.vit2print.com


This e-mail, and any attachments thereto, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information and/or information protected by intellectual property 
rights.
If you are not the intended recipient, please note that any review, 
dissemination, disclosure, alteration, printing, copying or transmission of 
this e-mail and/or any file transmitted with it, is strictly prohibited and may 
be unlawful.
If you have received this e-mail by mistake, please immediately notify the 
sender and permanently delete the original as well as any copy of any e-mail 
and any printout thereof.
We may monitor e-mail to and from our network.

NSS nv Tieltstraat 167 8740 Pittem Belgium _______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to