O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bug Hunt: Instruments and the Debugger

Every programmer dreads the crash...EXC_BAD_ACCESS. When this error occurs, you know that something has tried to access an object that is no longer allocated. These are the hardest problems to find because the code causing the problem usually happens at a very different place from the exception. And although ARC cuts down on these errors, it does not prevent them.

Tracking down this kind of problem is best done with both Instruments and the debugger. Instruments helps you find what object is causing the problem, and then you can use breakpoints to test your hypotheses about how the dead object is being accessed.

To get some practice tracking down this kind of problem, open the project in CH14 CarValet Bug ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required