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 6144467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:39:18+00:00 2026-05-23T18:39:18+00:00

i am getting start date and end date from user via date pickerview. when

  • 0

i am getting start date and end date from user via date pickerview. when user scroll the pickerview in speed then it crashes there and gives me this exception. so whats the solution?

[

NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x013fabe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x0154f5c2 objc_exception_throw + 47
    2   CoreFoundation                      0x013f06e5 -[__NSArrayM objectAtIndex:] + 261
    3   iFeel                               0x0001e1b7 -[S7GraphView drawRect:] + 5714
    4   UIKit                               0x0047d6eb -[UIView(CALayerDelegate) drawLayer:inContext:] + 426
    5   QuartzCore                          0x01f6f9e9 -[CALayer drawInContext:] + 143
    6   QuartzCore                          0x01f6f5ef _ZL16backing_callbackP9CGContextPv + 85
    7   QuartzCore                          0x01f6edea CABackingStoreUpdate + 2246
    8   QuartzCore                          0x01f6e134 -[CALayer _display] + 1085
    9   QuartzCore                          0x01f6dbe4 CALayerDisplayIfNeeded + 231
    10  QuartzCore                          0x01f6038b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 325
    11  QuartzCore                          0x01f600d0 _ZN2CA11Transaction6commitEv + 292
    12  QuartzCore                          0x01f907d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
    13  CoreFoundation                      0x013dbfbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
    14  CoreFoundation                      0x013710e7 __CFRunLoopDoObservers + 295
    15  CoreFoundation                      0x01339bd7 __CFRunLoopRun + 1575
    16  CoreFoundation                      0x01339240 CFRunLoopRunSpecific + 208
    17  CoreFoundation                      0x01339161 CFRunLoopRunInMode + 97
    18  GraphicsServices                    0x019de268 GSEventRunModal + 217
    19  GraphicsServices                    0x019de32d GSEventRun + 115
    20  UIKit                               0x0045442e UIApplicationMain + 1160
    21  iFeel                               0x00002990 main + 102
    22  iFeel                               0x00002921 start + 53
)
terminate called after throwing an instance of 'NSException'

the method @deepak and @ Grady Player are talking about is this:

-(void)getGraphicalData{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    //[NSThread sleepForTimeInterval:1];

    self.friendBL = [[FriendBL alloc] init];
    self.result = [self.friendBL  getGraphicalData1:txtStartTime.text andTodate:txtEndTime.text];
    if ([self.result isKindOfClass:[NSString class]]) {
        UIAlertView * friendListAlertView = [[UIAlertView alloc] initWithTitle:@"Friend List" message:(NSString*) self.result delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
        [friendListAlertView show];
        [friendListAlertView release];
    }
    else {
        self.reportList = (NSMutableArray*) self.result;
        NSLog(@"%d",[reportList count]);
    }
    [pool release];
}

after selecting date i click on button to say done and this is the code

-(IBAction)doneBtn{

    [dateView setHidden:YES];
    NSLog(@"%@",[dateTimePicker date]);
    NSLocale *locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease];

    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setDateStyle:NSDateFormatterBehaviorDefault];

    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"MM/dd/yyyy hh:mm:ss"];
    dateFormat.locale = locale;
    if (tag) {
        txtEndTime.text=[dateFormat stringFromDate:[dateTimePicker date]];
        if (![self compareDates]) {
            txtStartTime.text=@"";
            txtEndTime.text=@"";
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Warning!" message:@"Date is not in valid" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil];
            [alert show];
            [alert release];
        }

    }
    else {
        txtStartTime.text=[dateFormat stringFromDate:[dateTimePicker date]];
    }
    NSLog(@"%@",[dateFormat stringFromDate:[dateTimePicker date]]);



}

but if i pick a the date slowly it do not crashes

  • 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-23T18:39:18+00:00Added an answer on May 23, 2026 at 6:39 pm

    Since you are not calling the method by thread you don’t have to use an autorelease pool. Can you try this following code.

    -(void)getGraphicalData{
        self.friendBL = [[[FriendBL alloc] init] autorelease];
        self.result = [self.friendBL  getGraphicalData1:txtStartTime.text andTodate:txtEndTime.text];
        if ([self.result isKindOfClass:[NSString class]]) {
            UIAlertView * friendListAlertView = [[UIAlertView alloc] initWithTitle:@"Friend List" message:(NSString*) self.result delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
            [friendListAlertView show];
            [friendListAlertView release];
        }else {
            self.reportList = (NSMutableArray*) self.result;
            NSLog(@"%d",[reportList count]);
        }
    }
    

    This is my last try to help 🙁

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

Sidebar

Related Questions

I'm having trouble getting event start in end times in UTC format from facebook.
All of a sudden I start getting this error while trying to open 2
I have two input dates taking from Date Picker control. I have selected start
Sorry to have to do this, but I'm getting no love from the people
Getting this error when updating a row via a gridview with a sqldatasource in
I'm getting ready to start a new project and I've been researching the entity
I am getting ready to start building a new web project in my spare
My dev team is getting ready to start a new project. The shop has
What are some good tools for getting a quick start for parsing and analyzing
getting error while try to start service

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.