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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:18:30+00:00 2026-05-19T23:18:30+00:00

I know I have a bug somewhere… I a very simple bug indeed, it’s

  • 0

I know I have a bug somewhere… I a very simple bug indeed, it’s just an index out of bounds error. I used to hunt and place breakpoints in my project to see where it is. But today I decided to be smart and to actually learn to read the error message, because I know it’s all there! But I don’t know how to read it, I tried googling and none seems to give me a good explanation!

Can anyone help me read this error message?

2011-02-01 00:28:04.952 FBDiary[44083:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 26 beyond bounds [0 .. 25]'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x011dabe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x0132f5c2 objc_exception_throw + 47
    2   CoreFoundation                      0x011d06e5 -[__NSArrayM objectAtIndex:] + 261
    3   FBDiary                             0x00007035 -[FBFriendsList tableView:heightForRowAtIndexPath:] + 101
    4   UIKit                               0x004a3334 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 2888
    5   UIKit                               0x004a1e8b -[UITableViewRowData(UITableViewRowDataPrivate) _ensureSectionOffsetIsValidForSection:] + 152
    6   UIKit                               0x004a0a0c -[UITableViewRowData numberOfRows] + 145
    7   UIKit                               0x003578c2 -[UITableView noteNumberOfRowsChanged] + 132
    8   UIKit                               0x003642b8 -[UITableView reloadData] + 773
    9   UIKit                               0x04e5d1f0 -[UITableViewAccessibility(Accessibility) reloadData] + 60

EDIT: So a few minutes after posting the question I found the bug… As you said it’s in the tableView:heightForRowAtIndexPath: function. However what I really wanted to know is, can I infer the line where it’s causing problem from this stack trace?

  • 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-19T23:18:31+00:00Added an answer on May 19, 2026 at 11:18 pm

    there’s not much to read. and as usual the stacktrace alone won’t help you to fix the bug.

    For this bug you need understanding of the UITableViewDatasource protocol.

    the error is caused by -[FBFriendsList tableView:heightForRowAtIndexPath:], where you most likely try to access an element of the data array because you want to return the corresponding height.

    So combine your knowledge about UITableViewDatasource with your exception.
    Your knowledge about the datasource should tell you that a tableview asks for heightForRowAtIndexPath for all cells currently visible.
    It should also tell you that you’ve told the tableview how many rows it should access.

    If you combine this knowledge and your exception you should come to the conclusion that the value you return in - (NSInteger)tableView:(UITableView *)tableView_ numberOfRowsInSection:(NSInteger)section is wrong, and most likely it’s 26 where it should be 25.

    This is the most common bug that happens with UITableView.

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

Sidebar

Related Questions

No related questions found

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.