user559142
user559142

Reputation: 12517

iPhone App Crashing - NSZombie Output Issue

My application is crashing when I use popViewController. When using NSZombie I get the following:

2011-07-15 13:20:03.334 Question[27412:207] *** -[CFString release]: message sent to deallocated instance 0x4c8a090

I'm not entirely sure how to interpret this or how to find the instance being referred to...

The app crashes when I add the following line:

-(void) finishQuestionnaire:(id)sender{
    //go back to main manual
    [self.navigationController popViewControllerAnimated:YES];
}

I don't think this is the problem, I think whatever its loading is the problem...

Upvotes: 0

Views: 1407

Answers (5)

Maulik
Maulik

Reputation: 19418

I had similar problem and I've wasted whole day to solve this error... in my case there were a string like
str = [[NSString alloc] initWithString:@"a string"];

then i chanched like

str = [NSString stringWithFormat:@"%@",aVarible];

and it was solved...

Upvotes: 1

Tendulkar
Tendulkar

Reputation: 5540

This means you have released on object and again you are using the released object.by using the retain property you can handle this error.And one more thing i would like to tell you is before sending the build to anyone remove the NSZombieEnabled to NO

Upvotes: 0

ipraba
ipraba

Reputation: 16553

From your given info i can say that you are using a NSString object which you have already released. If you have used NSZombie in instruments you can find the stack track with the viewController and the method where it is crashing. It would very easy to find the object which you are accessing.

Upvotes: 0

user814037
user814037

Reputation:

If you have NSZombie enabled then it should break on the line where you're referencing the deallocated object, is this not the case?

According to the message above you're trying to release an instance of an already deallocated NSString.

Upvotes: 0

EmptyStack
EmptyStack

Reputation: 51374

It seems you are over releasing an object(NSString) ie., releasing an already released object. See if you have released the string somewhere already.

Upvotes: 0

Related Questions