How to fix WebCore errors in UIWebView?

My application makes heavy use of UIWebView on iOS 7 and 8. I get frequent crash reports affecting a small number of Web Core-related users. I already set the webview delegate to zero when its view controller disappeared, as suggested in other answers. However, I still get numerous crashes, such as:

 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 several thousand daily users, but probably 5 crashes per day with a stack trace, as shown above, so I can never play back. What else can be done to prevent UIWebView crashes?

+6
source share
1 answer

Do you use UIWebView instances with a delegate in some places? Have you tried sharing the delegate in the dealloc method of the view or view controller?

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

Regardless of whether you use ARC or not ARC, this is very important.

+2
source

Source: https://habr.com/ru/post/976954/


All Articles