开发者

iPhone App Crashing - NSZombie Output Issue

开发者 https://www.devze.com 2023-03-21 00:20 出处:网络
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 inst

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:Y开发者_运维问答ES];
}

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


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...


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


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号