From Fabric:
Crashed: WebThread
0 libobjc.A.dylib 0x19e0aa530 objc_msgSend + 16
1 WebKitLegacy 0x1a917461c invocation function for block in hardwareKeyboardAvailabilityChangedCallback(__CFNotificationCenter*, void*, __CFString const*, void const*, __CFDictionary const*) + 24
2 WebCore 0x1a89cf624 HandleRunSource(void*) + 716
3 CoreFoundation 0x19ee492bc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
4 CoreFoundation 0x19ee4923c __CFRunLoopDoSource0 + 88
5 CoreFoundation 0x19ee48b24 __CFRunLoopDoSources0 + 176
6 CoreFoundation 0x19ee43a60 __CFRunLoopRun + 1004
7 CoreFoundation 0x19ee43354 CFRunLoopRunSpecific + 436
8 WebCore 0x1a7a9d480 RunWebThread(void*) + 600
9 libsystem_pthread.dylib 0x19ead72c0 _pthread_body + 128
10 libsystem_pthread.dylib 0x19ead7220 _pthread_start + 44
11 libsystem_pthread.dylib 0x19eadacdc thread_start + 4
This looks like a crash in UIWebView, so step one might be to replace it with WKWebView. From there, stopping loading of the web view, and removing the delegate when dismissing the containing view controller might help resolve this as well.
In the last 90 days:
Users Affected: 301
Number of Crashes: 435
Sources:
5c591369f8b88c2963b533ee-fabric
5c5c8e12f8b88c296307c532-fabric
30-day impact: ~34 per day
Users affected: 638
Last seen in: 12.1.3
(5c591369f8b88c2963b533ee-fabric-ios and 5c5c8e12f8b88c296307c532-fabric-ios)
I investigated this one and it looks like the crash is happening on WKWebView level: http://webkit.crisal.io/webkit/rev/324bfaa99696312d8e2daefbe60ae2ab0e616daf/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
We see in the crash logs that hardwareKeyboardAvailabilityChangedCallback shows up in the trace. It looks like WKWebView is notified when availability of hardware keyboard changes, so maybe the ASSERT here crashes the app for some reason (in a normal state this callback isn't supposed to get called when 'self' is deallocated successfully but I guess some kind of invalid state in the memory, maybe a leak, causes it to be called):
static void hardwareKeyboardAvailabilityChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
{
ASSERT(observer);
WKWebView *webView = (__bridge WKWebView *)observer;
webView._page->hardwareKeyboardAvailabilityChanged();
}
Unfortunately I couldn't repro the issue(tried with both free and business sites), I tried opening/closing web views from various places of the app, then I tried connecting/disconnecting hardware keyboard but non of them resulted in a crash.
I tried checking the memory graph after opening/closing some web views but there were no leaks.
I also tried instruments leak tool but again had no chance to produce a leak related to web view.
Lastly I checked the code of WebKitViewController in WPiOS to see if there is sth that can be done intuitively to resolve the issue but nothing weird caught my attention there also. Unfortunately the crash is happening outside of main thread so we don't know what user did that triggered this exactly.
I'll keep using the app with a hardware keyboard for a few more days to see if I'll have any chance to reproduce the issue.
30-day impact: ~34 per day for 12.2 and below
Users affected: 657
Last seen in: 12.2.0.3 (latest release tracked in Fabric)
(5c591369f8b88c2963b533ee-fabric-ios and 5c5c8e12f8b88c296307c532-fabric-ios)
Added to the "Migrate to WKWebView" project in case it's not closed by the time we tackle the migration.
I'm still leaving this in Groundskeeping though, as it's a high-priority crash. Hope that's ok @designsimply !
90-day impact: 1
Users affected in the last 90 days: 1
https://sentry.io/share/issue/92c90587203e4c91bfe23224ab2f06e3/
Note: these crashes may be showing up in Sentry but not getting grouped. A search for "_frame > XTUM " shows 947 separate issues, and it's worth looking into that when this comes up in rotation.
archives/CC7L49W13/p1569624139225600-slack-platform9
A search for "_frame > XTUM" under wordpress-ios in Sentry returns 335 _ungrouped_ results. Not a high enough number yet for it to get prioritized above some of the other crashes we're seeing in iOS.
This is a response from Apple staff in the Apple Developer Forum
As far as I can tell this is a known bug (r. 49725959) that鈥檚 reported as fixed in the current iOS 13 beta. Ooo, and bugs like this often show up on the WebKit public bug tracker.
I'm closing this, as right now there's only one instance of UIWebView in the code and it's disabled for all users by a feature flag. That UIWebView instance will be cleaned up in a few releases.
PS: also I couldn't find any instances of this issue in Sentry.
Most helpful comment
I investigated this one and it looks like the crash is happening on WKWebView level: http://webkit.crisal.io/webkit/rev/324bfaa99696312d8e2daefbe60ae2ab0e616daf/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
We see in the crash logs that
hardwareKeyboardAvailabilityChangedCallbackshows up in the trace. It looks like WKWebView is notified when availability of hardware keyboard changes, so maybe the ASSERT here crashes the app for some reason (in a normal state this callback isn't supposed to get called when 'self' is deallocated successfully but I guess some kind of invalid state in the memory, maybe a leak, causes it to be called):Unfortunately I couldn't repro the issue(tried with both free and business sites), I tried opening/closing web views from various places of the app, then I tried connecting/disconnecting hardware keyboard but non of them resulted in a crash.
I tried checking the memory graph after opening/closing some web views but there were no leaks.
I also tried instruments leak tool but again had no chance to produce a leak related to web view.
Lastly I checked the code of
WebKitViewControllerin WPiOS to see if there is sth that can be done intuitively to resolve the issue but nothing weird caught my attention there also. Unfortunately the crash is happening outside of main thread so we don't know what user did that triggered this exactly.I'll keep using the app with a hardware keyboard for a few more days to see if I'll have any chance to reproduce the issue.