I'm having EXC_BAD_ACCESS problems with cocos2d-iphone 1.0.1.
I have enabled NSZombies, hoping to see where in my code am I accessing an object I shouldn't be accessing.
The problem occurs in CCMenu.m, here:
-(void) ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event
{
NSAssert(state_ == kCCMenuStateTrackingTouch, @"[Menu ccTouchMoved] -- invalid state");
CCMenuItem *currentItem = [self itemForTouch:touch];
if (currentItem != selectedItem_) {
[selectedItem_ unselected]; // <--- selectedItem_ is a zombie
selectedItem_ = currentItem;
[selectedItem_ selected];
}
}
I can observe that selectedItem_ is a zombie.
This is CCMenu code, not mine - I should be looking at my own code. So I take a look at the backtrace:

This doesn't really help me: The backtrace does not reach my own code. That's cocos2d-iphone code.
What should I do to address this error then?
Omega, you should be careful with ownership:
You should synthesize retained setter for selectedItem_
...
Then using setter assignement. Not plain pointer assignment.