Re: Mixing cocoa and carbon crashing in photoshop plugin
Re: Mixing cocoa and carbon crashing in photoshop plugin
- Subject: Re: Mixing cocoa and carbon crashing in photoshop plugin
- From: Rosyna <email@hidden>
- Date: Thu, 24 Nov 2005 23:22:33 +0900
Is photoshop unloading your plugin?
According to the documentation, "NSBundle correctly loads Objective-C
symbols into the runtime system, but there is no way to unload Cocoa
bundles once loaded due to a runtime limitation."
I actually do everything dynamically. Load the objective-c runtime,
then use objc_msgSend() to call all the things I need. Or call
something that I know will load cocoa for me like
FCCopyCollectionNames() (although I have no idea why this loads Cocoa
on 10,4, it shouldn't since the API it is using doesn't require Cocoa
for anything, but oh well).
Some others just have a cocoa bundle that they load from their carbon
bundle with no ill affects. I do that as well, however my cocoa
bundle only contains a category (too lazy to register a category on a
class dynamically).
Ack, at 11/24/05, Scott Andrew said:
I have a photoshop plug-in that i am mixing cocoa and carbon in and
i am getting intermittent crashes. I do call NSApplicationLoad like
i should. The 2nd time i come through the app i don't hit my break
points. Now i saw something about bundles with coco never unloading
so I am thinking this could be the solution.
So my thought was to create a cocoa bundle that is loaded by my
Carbon bundle. I want to use cocoa for the UI. I was wondering if
checking CFBoundleIsLoaded would be a check i should make and don't
reload the plugin the 2nd time around if tis loaded. Has anyone
mixed carbon/cocoa in a plugin? Did you seperate the cocoa into a
seperate bundle or code?
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden