views:

39

answers:

2

Hello,

Many a times I get the error "EXC_BAD_ACCESS" and my application terminates and I am not able to find because of what I get this error, until I debug my application step by step (which is very time consuming and tedious).

Can anyone help me in this.

+4  A: 

When your application terminates because of EXC_BAD_ACCESS, it's not an exception really. It's just that some code is referring to an object in memory which no longer exists at that particular memory address, so it will terminate immediately.

Please read the Apple Docs on Memory Management, and some of the very many tutorials available about this.

JoostK
A: 

There are many, many questions here on Stack Overflow about EXC_BAD_ACCESS, with lots of great information about how to debug those issues. (And links to excellent information on the memory management rules that need to be followed to avoid them to begin with.)

Sixten Otto