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

  • SEARCH
  • Home
  • 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 4006648
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:32:23+00:00 2026-05-20T08:32:23+00:00

I have a string variable which stores date from date picker but when I

  • 0

I have a string variable which stores date from date picker but when I use its value in other function I am getting error like Program received signal: “EXC_BAD_ACCESS”. Note: variable is globally defined.

code :

    - (void) changedDate: (UIDatePicker *) picker 
    {
     if (appDelegate.dateint == 8)
     {
     NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; 

[dateFormatter setDateFormat:@"dd MMM, yyyy"];
     datestr=[dateFormatter stringFromDate:[dptpicker date]]; 
    NSLog(@"date:%@",datestr); 
    } 
    else if(appDelegate.dateint == 9) 
    { NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; 

[dateFormatter setDateFormat:@"dd MMM, yyyy"]; 
    datestr1=[dateFormatter stringFromDate:[dptpicker date]] ;
     NSLog(@"date1:%@",datestr1);
     } 
    }
  • 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-20T08:32:24+00:00Added an answer on May 20, 2026 at 8:32 am

    You have to retain that string. This is the most likely reason.

    Edit:
    The only reason why it is crashing is the bad pointer. The bad pointer = over-releasing the object. Just run your app with zombies enabled and you’ll see the place where you’re doing that. Check this http://www.markj.net/iphone-memory-debug-nszombie/

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

Sidebar

Related Questions

If I have a variable string which stores a different section of characters from
I have a java string, which has a variable length. I need to put
I have a variable of type Hashmap <String,Integer >. In this, the Integer value
I have a string variable that represents the name of a custom class. Example:
In Java, suppose I have a String variable S, and I want to search
When using CDT I would like to have std::string show up in the 'variable'
I have the following string in the smarty (php templating system) variable $test: <img
If I have variable of type IEnumerable<List<string>> is there a LINQ statement or lambda
I have a dataset which stores dates in a DataColumn (datatype of this column
I have a string that stores some variables that must be executed to produce

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.