I am stuck with a very strange issue. I hope that many of you can provide me input to solve this. My application breaks quite often, but I am not able to get the exact scena
The error "modifying layer that is being finalized" occurs when you are trying to modify the properties of a CALayer when it is in the process of being deallocated. I've seen this happen when I've accidentally used an accessor to clear a property on a CALayer while within that layer's -dealloc method.
This may also happen within a UIView's -dealloc method if anything display-related is updated (thus touching the underlying CALayer).
In your case, it looks like you're overreleasing a UIView somewhere, due to the zombie message. The "modifying layer that is being finalized" is just a side-effect of that, because at some point you'd be updating the UIView while it's being deallocated before it should.
Turn on breakpoints, make sure you've set a breakpoint on exceptions being thrown, and run your application within the debugger. It should halt on the line where a message is being sent to an overreleased UIView, which should tell you what view is at the center of this. Then you can backtrack to find at what point you're sending one too many release messages (or have autoreleased without retaining if you need it beyond the current scope).
Because you already have evidence pointing to the UINavigationBar, check it and its associated views to make sure that you're properly retaining it.