Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9
Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9
- Subject: Re: Simple Out-of-Box Demo: Private Framework Crashes in 10.3.9
- From: Jerry Krinock <email@hidden>
- Date: Fri, 21 Mar 2008 17:55:44 -0700
On 2008 Mar, 21, at 17:04, Kyle Sluder wrote:
My guess is that since dyld doesn't support @loader_path on 10.3.9,
your framework isn't loading,
Hmmmm...but the first NSLog() in the framework executes and logs.
Does that not prove that the framework must be loaded?
and therefore your category resolves to
NULL. Once you try to use it, you crash because the runtime tries to
dereference this NULL identifier.
Although this is weird, it acts more like some methods in the parent
Cocoa class are not being found. But some are. Here is a complete
list of what I've found, including some not shown in the demo:
Does not cause crash:
-[NSString length]
+[NSString initialize]
+[NSString class]
+[NSDictionary initialize]
+[NSDictionary class]
Causes crash (in 10.3 only):
-[NSString stringByAppendingString:]
-[NSString rangeOfString:options:range:]
-[NSScanner scanUpToString:intoString:]
-[NSDictionary dictionaryWithObject:forKey]
More info here:
http://lists.apple.com/archives/xcode-users/2007/May/msg00076.html
In that thread, the trouble was with a bundle containing a plug-in,
not a framework. The solution mentioned for a framework is to set the
framework's Installation Directory to:
@executable_path/../Frameworks
which I am already doing, (but neglected to mention in my original
post).
This is, the way I've always done it, with frameworks that work, and
is, I believe, the "normal" setting for a private framework which is
in the app package.
Just a simple app using a simple private framework, to run in
10.3.9-10.5. Nothing fancy!
Thanks for the ideas, though. I shall keep studying (and hoping that
someone knows the answer).
Still stumped,
Jerry
_______________________________________________
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