I'm trying to solve my first really hard EXC_BAD_ACCESS problem. I see from a lot of tutorials and blogs that I can use Zombies to help me figure out where I'm going wrong. But I don't think my zombies are working, and I'm DEFINATELY not getting anything useful out of the console.
When I start the program I see this: This GDB was configured as "x86_64-apple-darwin".Setting environment variable "NSZombieEnabled" to null value.
Eventually, I see a couple of NSLog traces I used and then:
Program received signal: “EXC_BAD_ACCESS”.
No help at all. Any ideas? I have a sneaking suspicion that even with the zombies working it won't be able to tell me where the bad access happened. Objective C makes me sad--This would have taken 3 seconds in ActionScript :(
You say the crash is here (edit the question next time):
- (IBAction) toggleView{
if(switchableView.subviews.count != 0)
[[switchableView.subviews objectAtIndex:0] removeFromSuperview];
UIViewController* newView = (viewSelector.selectedSegmentIndex == 0) ? [Login new] : [UserRegistration new];
[switchableView addSubview:newView.view];
//[newView release];
}