Re: App Crashing in ARC !!
Re: App Crashing in ARC !!
- Subject: Re: App Crashing in ARC !!
- From: Fritz Anderson <email@hidden>
- Date: Thu, 23 Feb 2012 14:01:57 -0600
On 22 Feb 2012, at 9:31 PM, Naresh Kongara wrote:
> I'm creating the alert with class method in NSAlert and running it with runModal.
>
> NSAlert *alert =[NSAlert alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:];
> if ([alert runModal] == NSAlertDefaultReturn) {
> //Code
> }
> This crash is happening only after we migrated to ARC. I tried with analyzer and Zombies, but no success in finding the cause for the crash.
You've provided a skeleton of how you intend to do something, but nothing that shows what you are actually doing. You've provided nothing more than "make an alert and run it." If there is a bug in this section of your code, it's probably in the construction of the parameters to alertWith…, or in "Code."
If your actual code is terribly complex, or proprietary, reduce it to a minimal case that reproduces it, and post it. Creating a minimal case will often show you your problem with no need to consult anyone else.
Also: By any chance, are you running this alert on any thread other than the main one? You can't do that. You'll crash.
— F
_______________________________________________
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