If your app is just quitting with no debug error, there still could be a message sent to some deallocated instance. Try turning on NSZombieEnabled by following the instructions here:
http://www.codza.com/how-to-debug-exc_bad_access-on-iphone
This will tell you when a bad message is sent.
Further, if you’d like to ask a question involving specific code, you’ll get better responses. Try posting your code and maybe we can help you with basic debugging.
solved draw a layer with some color in iPhone Application