views:

34

answers:

1

I've this code

- (void)viewDidLoad {

MoMagAppDelegate *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,Thank you for your kindness.

A: 

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

huggie
Thank you so much.I just comment [issue release] in cellForRowAtIndexPath method// Configure the cell...Issue *issue = (Issue *)[self.issueList objectAtIndex:indexPath.row]; // [issue release];Thank you again. I'm newbie in iphone programming
yothins