简体   繁体   中英

iOS 7 App Crashes (crash log included) when entering foreground (after being in background for a while)

I am going to paste my crash log for the app. I have a feeling it has something to do with the UIWebView getting overloaded with data while in the background (web sockets), but I may be wrong so I wanted to see if anyone here would be willing to analyze my crash log and see what's going on.

SYMBOLIZED Log w/ Breakpoints: http://pastebin.com/q63QvURY

Your connection is continuing after your UIWebView's delegate is deallocated. The crash happens because the connection is trying to update an object which has been deallocated.

From the UIWebView class reference :

Important : Before releasing an instance of UIWebView for which you have set a delegate, you must first set its delegate property to nil . This can be done, for example, in your dealloc method.

For example:

- (void) dealloc {
    self.myWebview.delegate = nil;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM