Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
- Subject: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
- From: Jerry Krinock <email@hidden>
- Date: Sun, 26 Sep 2010 17:51:18 -0700
On 2010 Sep 26, at 16:58, Ken Thomases wrote:
> Have you tried actually using the method that's in his log (-initWithObjects:count:), instead of a different one? Or even +arrayWithObjects:count:?
Yes, but to make a long story short, I was stymied by the rocket science of class clusters and abstract classes. The error says that +initWithObjects:count: was sent to NSCFArray. So first I reverse-engineered from savannah.gnu.org what are the argument types. They are id* (a C array of ids), and an unsigned int. Then I constructed an invocation using the NSClassFromString(), @selector(), etc. But upon invoking, the system told me that +initWithObjects:count: is not implemented the *abstract* class NSCFArray. I don't know what the concrete subclass is :(
Another thing I tried was to replace the method +[NSCFArray initWithObjects:count:] using Method Replacement. But it was never invoked, probably for the same reason, although interestingly -[NSCFArray objectAtIndex:] is invoked with great frequency.
So rather than fight all this stuff I thought I'd ask the more general question: Is it possible for the same exception in the same build to crash the app on one system but be handled with no crash on another system. I believe it has something to do with exception handlers but I've never learnt this very well.
_______________________________________________
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