My application crashes when I navigate to different view for more than 10 to 11 times. I mean I have 6 buttons on main screen which on pressing bring you to different views. when I press these buttons repeatedly then my app crashes. I have spent 3 days but comes up with no solution. here is the code where app crashes
when i uncomment release statement then it crashes after first time.
-(IBAction) goToLiveAlerts{
teamAlerts *showLiveAlerts=[[teamAlerts alloc] initWithNibName:@"teamAlerts" bundle:nil];
[self.navigationController pushViewController:showLiveAlerts animated:YES];
//[showLiveAlerts release];
}
when i uncomment then i console error is
“wait_fences: failed to receive reply: 10004003
[Switching to process 2093]
[Switching to process 2093]
Program received signal: “EXC_BAD_ACCESS”.”
-(IBAction)goToPhotos{
picturesGallery *showPictures=[[picturesGallery alloc] initWithNibName:@”picturesGallery” bundle:nil];
[self.navigationController pushViewController:showPictures animated:YES];
//[showPictures release];
}
Do you use ARC or not? If not, according to your code, there is some memory leaks in your code, try this:
Anyway, you need to provide more code crash log.
According to your crash log,
EXC_BAD_ACCESSmeans there is some memory leaks. EnableNSZombiein Xcode to debug. In Xcode 4.3, go toProduct->Edit Scheme->Diagnosticsand checkEnable Zombie Objects.