My app makes heavy use of UIWebView
's in iOS 7 and 8. I get frequent crash reports affecting a small number of users relating to Web Core. I have already been setting the webview delegate to nil when its view controller disappears, as suggested in other answers. However, I still get numerous crashes like:
WebCore::SharedBuffer::clear()
WebCore::TimerBase::updateHeapIfNeeded(double)
WebCore::WebVideoFullscreenModelMediaElement::updateForEventName
WebCore::HTMLMediaElement::seekTimerFired
WebCore::EventTarget::fireEventListeners
WebCore::CachedResource::unregisterHandle
WebCore::CSSFontSelector::~CSSFontSelector()
WebCore::MediaQueryMatcher::styleResolverChanged
I have a few thousand daily users, but get probably 5 crashes a day with stack traces like the above, so I'm never able to reproduce. What else can I do to prevent UIWebView
crashes?
Are you using UIWebView instances with delegate in some places?, did you try to nil the delegate in the dealloc method of the view controller or view?
- (void)dealloc
{
self.webView.delegate = nil;
}
No matter if you are using ARC or non-ARC, this is very important.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With