malloc: *** error: incorrect checksum for freed object - object was probably modified after being freed

前端 未结 4 1137
悲&欢浪女
悲&欢浪女 2020-11-30 05:19

I have a big problem with my iOS App: it crashes sometimes without detailed debug error. The stack trace is empty. These are the only two lines in the stack trace:

4条回答
  •  情深已故
    2020-11-30 05:52

    hi guys i have found this solution if you are using nib or xib interface and you facing this problem when you want to push a viewcontroller object then some time this error will occur and your app will be crash (specially error in iPad) Here is the solution:

    // Format like this

    UINavigationController *nav=[[UINavigationController      alloc]initWithRootViewController:yourViewControllerObj];
    
    [self.navigationController  presentViewController:nav animated:true completion:nil];
    

    Don't try to push in this condition.

提交回复
热议问题