EXC_BAD_ACCESS signal received
- by Hector Ramos
When deploying the application to the device, the program will quit after a few cycles with the following error:
Program received signal: "EXC_BAD_ACCESS".
The program runs without any issue on the iPhone simulator, it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again, I will hit the EXC_BAD_ACCESS signal.
In this particular case, it happened to be an error in the accelerometer code. It would not execute within the simulator, which is why it did not throw any errors. However, it would execute once deployed to the device.
Most of the answers to this question deal with the general EXC_BAD_ACCESS error, so I will leave this open as a catch-all for the dreaded Bad Access error.
EXC_BAD_ACCESS is typically thrown as the result of an illegal memory access. You can find more information in the answers below.
Have you encountered the EXC_BAD_ACCESS signal before, and how did you deal with it?