开发者

iphone app crashes after loading more row into a custom table

I am using a UITableView with custom cell. I have an array that contains the objects of class A. In cellForRowAtIndexPath i go though the array and assign each object to each cell. I first load 25 rows. Then when load more is pressed i load another 25 rows. When i move up and down i works fine. But problem happens when i load more 25 cells. When i move to the top of the table the app crashes. I debugged the app and found that the object that i assign from the array has value of 0xffffffff which means there is nothing. It always happens at the 4th cell of the table. Can anyone help me out why this开发者_Python百科 is happening ??

thanx


What are you seeing in the console? Often it's a good hint, but if it's EXC_BAD_ACCESS, you need to worry about memory corruption.

I have written this blog to understand crashes EXC_BAD_ACCESS and how to debug them.

http://loufranco.com/blog/files/Understanding-EXC_BAD_ACCESS.html

  1. Run Build and Analyze -- fix the problems it reports
  2. Run with Zombies enabled (instructions at link above)

Most problems are solved by doing those two things. Otherwise Debug Malloc (also explained at the link)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜