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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:09:34+00:00 2026-05-26T13:09:34+00:00

Why does my app quit when user scrolls down the UITableView, past the first/last

  • 0

Why does my app quit when user scrolls down the UITableView, past the first/last cell?

Here is my log:

2011-11-02 07:53:23.794 School VLE Business[20876:707] *** Terminating app due to uncaught exception 'NSRangeException', reason:     
'*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x30bfa8bf 0x37d9f1e5 0x30b43b6b 0x51493 0x32bf49cb 0x32bf3a09 0x32bf3233 0x32b97d4b 0x30b5922b 0x322ad381 0x322acf99   
0x322b111b 0x322b0e57 0x322d86f1 0x322fb4c5 0x322fb379 0x358e0f93 0x31e8e891 0x30bc3f43 0x30bce553 0x30bce4f5 0x30bcd343 
0x30b504dd 0x30b503a5 0x3377efed 0x32bc2743 0x2645 0x25dc)
terminate called throwing an exception[Switching to process 7171 thread 0x1c03]
(gdb) 

Bear in mind that this is the code I use to add/remove objects to/from the UITableView:

maincelltext = [[NSMutableArray alloc] init];
subtitlecelltext = [[NSMutableArray alloc] init];

if(maincelltext.count == 0){

[maincelltext addObject:@"No Dates Set"];
[subtitlecelltext addObject:@"Try adding a note!"];

}

if(Assignment1DueDate.text.length > 1){

    [maincelltext addObject:Assignment1.text];
    [subtitlecelltext addObject:Assignment1DueDate.text];

}

if(Assignment2DueDate.text.length > 1){

    [maincelltext addObject:Assignment2.text];
    [subtitlecelltext addObject:Assignment2DueDate.text];

}

if(Assignment3DueDate.text.length > 1){

    [maincelltext addObject:Assignment3.text];
    [subtitlecelltext addObject:Assignment3DueDate.text];

}

if(Assignment4DueDate.text.length > 1){

    [maincelltext addObject:Assignment4.text];
    [subtitlecelltext addObject:Assignment4DueDate.text];

}

… and so on…

  • 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-26T13:09:35+00:00Added an answer on May 26, 2026 at 1:09 pm

    One of your arrays is empty and you are trying to get the first element out of it. Make sure this logic runs before -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section is called by the UITableView so that it can return the correct count.

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

Sidebar

Related Questions

This is a continuation of the question here: JBoss - does app have to
The calender app does it... How can I make an app icon change based
It's weird that my app does not zoom in when running in the application
I have several customers where my WinForms app does not perform as well as
Are dylibs and frameworks already in an iPhone, or does my app actually incorporate
An example of an app that does this is Enso , it pops up
I'm looking for an app that does about the same thing at the Performance
I have an MVC app that does a lot of work with jQuery ajax
I have a multi-threaded C++ app which does 3D rendering with the OpenSceneGraph library.
I wish to write a windows app which does something when I become disconnected

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.