How to solve EXC_BAD_ACCESS error in my application?

I load a custom cell in a tableView and I return 50 rows in a tableView. the number of some rows is displayed in the table view, but when scrolling through the table view my user cell is not displayed, and I have an error

"EXC_BAD_ACCESS"

and also display the following message on the console

"void SendDelegateMessage (NSInvocation *): delegate (webViewDidLayout :) failed to return after waiting 10 seconds. main run loop mode: UITrackingRunLoopMode"

+6
iphone ios4 ios-simulator
source share
4 answers

I think you get this error due to your method of creating custom cells. When you created the class file for the custom cell in the .m file, you released IBOutlets. Try to remove this part from your code than try.

I had the same problem in the application and I solved this problem this way. Perhaps this solution will work for you.

+3
source share

The best way to detect zombies:

  • in the Groups and files section, expand the Executable files section and right-click the name of your application and select Get Information
  • select the Arguments tab at the top, and then add a new entry to the Variables that will be set in the environment section. Name the new variable NSZombieEnabled and set its value to YES .

After that, you will have information in the console on which released objects will be released.

+2
source share

This usually means that you asked the program to look at a memory area that you do not have access to, which usually means that you ran the end of the array or something like that.

If you are running in debug mode, stack tracing is likely to give you more hints. Open the debug console.

+1
source share

You should also use NSZombieEnabled , this usually helps. It shows to whom access to the remote object was granted. Be sure to disconnect it after use, because using this, the memory is not released.

0
source share

All Articles