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: Ken Thomases <email@hidden>
- Date: Sun, 26 Sep 2010 18:58:57 -0500
On Sep 26, 2010, at 4:32 PM, Jerry Krinock wrote:
> When my app runs for a particular user it emits these to the console once in awhile:
>
> *** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0]
>
> However, the app does not crash for him when this happens.
>
> I would like it to crash when this happens so I could get a crash report with a call stack.
>
> I can reproduce that log message with this code:
>
> NSArray* crash = [NSArray arrayWithObject:nil] ;
> NSLog(@"%@", crash) ;
>
> However, for me, even if I launch by doubleclicking my Release build in Finder, after logging that exception, it crashes.
>
> We're both running Mac OS 10.6.4 on Intel, although his is a 64-bit processor, the app is 32-bit.
>
> Why does it crash for me and not for him?
Have you tried actually using the method that's in his log (-initWithObjects:count:), instead of a different one? Or even +arrayWithObjects:count:?
Regards,
Ken
_______________________________________________
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