Sign up ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

I'm using a UITableView and UITableViewCell in my project, I've customised the UITableViewCell properly, and in the TableView I'm displaying an Array of items, I'm assigning the values to that array in the below manner.

result= [[[NSMutableArray alloc]initWithArray:detail]]; [tableView1
     reloadData];//reloading table

It works properly, but after four or five times scrolling the TableView my app get crashed

(SIGABRT)

, it shows the error

"Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 129 beyond bounds for empty array'
share|improve this question
    
Could you please the exact line, where are you getting this error message? –  IAmDav Jul 14 '14 at 9:21
    
You need to add your table view datasource code to question. That will help us to answer –  Naga Mallesh Maddali Jul 14 '14 at 9:22
    
That error says that you are trying to access object from out of array bounds, but where and how it's mystery from the info you are providing –  wootage Jul 14 '14 at 9:22
    
you need to check your datasource array. –  sigkill Jul 14 '14 at 9:24
    
In the tableView's delegate method, cellforRowAtIndexPath , for a cell it shows null value –  Gobinath Ed Jul 14 '14 at 9:25

1 Answer 1

up vote 1 down vote accepted

When you reload the table view,It will call the delegate function bywhich all your cells will get reload.So before reloading do check whether your result array is having the data are not.It means you are trying to access the index of array beyond its limit(which is either released or not found). To get the exact place keep exception breakpoint and check.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.