I have this code:
(void)viewDidLoad {
Mo开发者_如何学运维MagAppDelegate *delegate = (MoMagAppDelegate *)[[UIApplication sharedApplication] delegate];
self.issueList = delegate.issueList; //Line to error
NSLog(@"IssueList size %d",[self.issueList count]);
[super viewDidLoad];
}
Please suggestion for resolve this problem.
Somewhere your object (possibly issueList?) is freed prior to sending the message. And the release code is not in the scope of the code you posted. You can try to set an environmental variable called NSZombieEnabled. (Google around or try this http://www.fromconcentratesoftware.com/2007/08/09/nszombieenabled-for-the-debugger-adverse/ ) If I recall correctly, what this does is when you call release on an object, it doesn't actually get freed, ever. And when a supposedly would be freed object is sent a message, you can track it under the stack trace.
EDIT: I think this may explain better. http://www.codza.com/how-to-debug-exc_bad_access-on-iphone
精彩评论