On Mar 21, 2013, at 8:47 AM, Peng Gu <pan...@gmail.com> wrote:

>   4. I click the button again, then the app hangs for about 10 seconds and
>   the xcode throws EXC_BAD_ACCESS(code=2, address=0x7fff5f3ffff8), the caller
>   is 0_CFArrayReplaceValues
> *The app doesn't die, it just doesn't respond.*

The app has crashed and is suspended so that the Xcode debugger can examine it. 
At this point you should use the debugger UI in Xcode to look at the stack.

From the pause, this sounds a lot like an infinite-regress, i.e. functions 
calling each other in an endless cycle. This will run for a while before it 
overflows the stack space and crashes, and then Xcode’s debugger will take a 
while to read the huge list of stack frames out of the process.

> I used @try @catch, no error thrown.

Crashes aren’t the same as Objective-C exceptions, they’re lower-level. You 
generally can’t catch or recover from them programmatically unless you want to 
get into tricky low-level coding like signal handling.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to