• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: App Crashing in ARC !!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: App Crashing in ARC !!
      • From: KappA <email@hidden>
References: 
 >App Crashing in ARC !! (From: Naresh Kongara <email@hidden>)

  • Prev by Date: Re: Sudden and hard to reproduce crashes in libcache
  • Next by Date: Re: Dumb question about radio buttons
  • Previous by thread: App Crashing in ARC !!
  • Next by thread: Re: App Crashing in ARC !!
  • Index(es):
    • Date
    • Thread