Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7037625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:34:04+00:00 2026-05-28T01:34:04+00:00

While on return to my app from getting phone number from address book, if

  • 0

While on return to my app from getting phone number from address book, if by mistake i fetch some address or any thing except for phone number, the code in the try catch final gives the following but doesn’t catch it, any idea is appreciated in advance:

  *** -[CFDictionary length]: message sent to deallocated instance 0x6a4db70

Code:

strContact = (NSString *)phone; CFRelease(phone);
// NSLog(@"%@", strContact);
CFRelease(multi);
name = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
NSRegularExpression *regex = [[[NSRegularExpression alloc] initWithPattern:@"[a-zA-Z]" options:0 error:NULL] autorelease];
// Assuming you have some NSString myString.
NSUInteger matches = [regex numberOfMatchesInString:strContact options:0 range:NSMakeRange(0, [strContact length])];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:34:05+00:00Added an answer on May 28, 2026 at 1:34 am

    OK, I think I understand your question now. It just took me a while.

    So, I’m assuming you have Zombie Objects enabled (NSZombieEnabled) and you’re wondering why you can’t catch this error –sending a message to a zombie– with a @try/@catch structure.

    The short answer is NSZombies don’t throw an Objective-C exception (one that you can catch this way). There wouldn’t really be a point to that, since you wouldn’t actually ship an app with NSZombieEnabled anyway. This is meant to be a debugging tool that you use at the debugger or within Instruments.

    In your actual app, when you turn off NSZombie’s, there still wouldn’t be an exception to catch for this, since you would just get an EXE_BAD_ACCESS, which is a UNIX signal (not this type of an exception at this level).

    The last point is that Objective-C exceptions (the type that you can @try/@catch) are not recommended for errors that you expect to be able to recover from. Or in other words, this is meant for fatal errors only, where you might do some cleanup and then allow your app to still crash.

    The right way to do what you’re trying to do is to actually test for different types or different values that you might except to get and then handle each case appropriately. You can do this using normal if/else conditionals or something of that sort. You can test values for nil if you need to and you can see if an object is of a particular class by using [someObj isKindOfClass:[MyExpectedClass class]]

    I hope I understood the question correctly?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$result = mysql_query(SELECT * FROM project ORDER BY projectid); while($row = mysql_fetch_array($result)) { return(array($row['projectid'],
So, I am getting as return parameter from an already established code a StringBuilder
I'm currently using phonegap to create and ios app. While getting familiar to the
I have an app where I need to prevent users from editing data while
Using the following code (from a Silverlight 4 OOB app) I'm getting a result
My whole app is serving stuff in utf-8, only one page (xml) should return
while($row=mysql_fetch_array($result2)){ //return $row['ProjectID']; $sql=INSERT INTO `tycodashboard` (ProjectID,DesignationID,ReqcompID,IntOrgID,FinishedTimeID,ProjectStatusID,PhaseID ) VALUES('{$row['ProjectID']}','$pm,'$req','$initiating,'$initiating','$ftime,'$ProjectStatus,'$Phase); $result=mysql_query($sql); if(!$result){ if(mysql_errno() == ER_DUP_ENTRY){
How can i return my output in ArrayCollection? values = array(); while($row = mysql_fetch_array($result))
Several times, while perusing the Boost library's documentation, I've run across return values that
What is the best way to return the whole number part of a decimal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.