Reputation: 4837
All of a sudden I must have changed something in my app that causes it to crash randomly. After viewWillAppear I get an EXC_BAD_ACCESS. I have commented everything out in my view loading methods to just initialise a simple view. Sometimes it runs fine and others not, I attach two different console logs.
-(void) loadView {
UIView *uv = [[UIView alloc] initWithFrame:CGRectZero];
[self setView:uv];
[uv release];
NSLog(@"[BookScrollVC.m] loadView >>>");
}
WHEN IT CRASCHES
2012-10-07 09:07:51.780 DILPStatic[2340:207] [BookScrollVC.m] loadView >>>
2012-10-07 09:07:51.781 DILPStatic[2340:207] [BookScrollVC.m] viewDidLoad
2012-10-07 09:07:51.782 DILPStatic[2340:207] [viewDidLoad] exiting...
2012-10-07 09:07:51.783 DILPStatic[2340:207] [viewWillAppear]
Current language: auto; currently objective-c
Program received signal: “EXC_BAD_ACCESS”.
WHEN IT WORKS
2012-10-07 09:12:54.702 DILPStatic[2385:207] [BookScrollVC.m] loadView >>>
2012-10-07 09:12:54.703 DILPStatic[2385:207] [BookScrollVC.m] viewDidLoad
2012-10-07 09:12:54.704 DILPStatic[2385:207] [viewDidLoad] exiting...
2012-10-07 09:12:54.705 DILPStatic[2385:207] [viewWillAppear]
2012-10-07 09:12:54.706 DILPStatic[2385:207] *** __NSAutoreleaseFreedObject(): release of previously deallocated object (0x4b59fc0) ignored
2012-10-07 09:12:55.058 DILPStatic[2385:207] [viewDidAppear]
It loads by pushviewcontroller.
BookScrollVC *bookScrollVC = [[BookScrollVC alloc] initWithBook:bookPath];
[self.navigationController setToolbarHidden:YES];
[self.navigationController setNavigationBarHidden:YES];
[self.navigationController pushViewController:bookScrollVC animated:YES];
[bookScrollVC release];
Upvotes: 0
Views: 542
Reputation: 4837
I did solve the problem by cleaning up variables that where not used properly in other classes. This included both missing [... release] and wrongly deallocating ivars.
Hope it reminds someone to actually check these things, altough it's probably not an issue with ARC anymore.
Upvotes: 1