Most of xcoders hate both red and green light even at a traffic signal…
Lets see how easy it is to remove bad access using instruments in xcode…
Step 1. Open your project in xcode and run it using instruments to so press command + I or go to product and click on profile.
Step 2. In the resulting window select Zombie .
Step 3. Click on the profile button bottom right of the screen.
Step 4.Run your app till you replicate the crash.(bad access).Look out for the zombie msg.
Step 5.Click on the little arrow to go to the object access log.
Step 6.The list will be shown, and at the bottom will be last access.Click on the button left to library.
Step 7.Click on the hi lighted line appearing in the left bar.it will revel the faulty code as shown below .
Change and you are sorted.