You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
When UIWebView is executing some JavaScript it can run in a dead lock on the main thread, causing the whole application to hang. In the real world this is caused by some CPU intensive JavaScript. In the attached example project a simple while (true) { ... } loop in JavaScript is used to demonstrate the issue.
Steps to Reproduce:
Open attached project in Xcode 8.3.2
Run it on iPhone 7 10.3 Simulator
Tap on the "Open WebView" button
Wait 10 seconds
Tap on the back button
Wait 10 seconds
Tap again on the "Open WebView" button
Expected Results:
Open the WebView a second time.
Actual Results:
It does not open the WebView a second time. Instead the application hangs and is unresponsive.
You can pause the application at this point and get a stack trace of the main thread:
Description
Area:
WebKit
Summary:
When UIWebView is executing some JavaScript it can run in a dead lock on the main thread, causing the whole application to hang. In the real world this is caused by some CPU intensive JavaScript. In the attached example project a simple while (true) { ... } loop in JavaScript is used to demonstrate the issue.
Steps to Reproduce:
Expected Results:
Open the WebView a second time.
Actual Results:
It does not open the WebView a second time. Instead the application hangs and is unresponsive.
You can pause the application at this point and get a stack trace of the main thread:
if let
andguard let
to assign toself
in failable value type initializers #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP__psynch_mutexwait + 10 frame #1: 0x0000000107bd5e6e libsystem_pthread.dylib
_pthread_mutex_lock_wait + 100frame 22108390: Swift 2.0b4: Allow assignment of nil to self in failable initializers to indicate failure #2: 0x0000000107bd358d libsystem_pthread.dylib
_pthread_mutex_lock_slow + 285 frame #3: 0x000000010af466d2 WebCore
_WebTryThreadLock(bool) + 34frame 22108127: Apple Music: CarPlay does not show the For You Playlists #4: 0x000000010af47508 WebCore
WebThreadLock + 88 frame #5: 0x00000001043fb58a UIKit
-[UIWebDocumentView viewportHandler:didChangeViewportSize:] + 56frame 22108095: Changing account in Music app requires force-quit #6: 0x000000010444c083 UIKit
-[_UIWebViewportHandler update:] + 394 frame #7: 0x00000001043fd991 UIKit
-[UIWebDocumentView setMinimumSize:updateCurrentViewportConfigurationSize:] + 105frame 22107434: Providing Generic Generator for protocol intermittently crashes compiler #8: 0x0000000104446133 UIKit
-[UIWebView _updateViewSettings] + 723 frame #9: 0x0000000104445a9b UIKit
-[_UIWebViewScrollView setContentInset:] + 241frame 22107245: Xcode 7 beta 4 (7A165t) Interface Builder ignores background color set on UITableView #10: 0x000000010425c644 UIKit
-[UIViewController _setNavigationControllerContentInsetAdjustment:] + 573 frame #11: 0x00000001042a1450 UIKit
-[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 804frame 22106516: watchOS 2 Beta 4: Can’t Import CoreText #12: 0x0000000104296f84 UIKit
__49-[UINavigationController _startCustomTransition:]_block_invoke + 246 frame #13: 0x0000000104bf1dac UIKit
-[_UIViewControllerTransitionContext completeTransition:] + 102frame 22105625: Mac OS X 10.11: Battery status alwasy shows "20:00 Remaining" #14: 0x00000001040ab360 UIKit
__53-[_UINavigationParallaxTransition animateTransition:]_block_invoke.99 + 803 frame #15: 0x000000010417bcd4 UIKit
-[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 527frame 22103992: Stack implemented with enum causes Abort trap: 6 #16: 0x000000010414ef07 UIKit
-[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 222 frame #17: 0x000000010414f446 UIKit
-[UIViewAnimationState animationDidStop:finished:] + 136frame 22103156: News app interface sometimes not visible or incorrect #18: 0x00000001096af68e QuartzCore
CA::Layer::run_animation_callbacks(void*) + 306 frame #19: 0x000000010784305c libdispatch.dylib
_dispatch_client_callout + 8frame 22102128: Face detection accuracy is bad #20: 0x000000010782440b libdispatch.dylib
_dispatch_main_queue_callback_4CF + 411 frame #21: 0x00000001069a0909 CoreFoundation
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9frame 22098492: Xcode-beta (7A165t): UI Tests: secureTextFields are duplicated #22: 0x0000000106966ae4 CoreFoundation
__CFRunLoopRun + 2164 frame #23: 0x0000000106966016 CoreFoundation
CFRunLoopRunSpecific + 406frame 22096010: Impossible to inspect the contents of the Core Spotlight index #24: 0x00000001087f5a24 GraphicsServices
GSEventRunModal + 62 frame #25: 0x00000001040c30d4 UIKit
UIApplicationMain + 159frame 22094417: UIPrintInteractionController does not indicate its method of dismissal #26: 0x000000010361e1a7 WebThreadDeadLock
main at AppDelegate.swift:12 frame #27: 0x000000010788f65d libdyld.dylib
start + 1frame 22093439: Mac OS X 10.10.4: NSTabViewController tabStyle option NSTabViewControllerTabStyleUnspecified does not work. #28: 0x000000010788f65d libdyld.dylib`start + 1
Version:
Xcode 8.3.2, Mac OS 10.12.4
Notes:
Configuration:
iPhone 7 Simulator, iOS 10.3
Attachments:
'WebThreadDeadLock-master.zip' was successfully uploaded.
(see here: https://github.com/technology-ebay-de/WebThreadDeadLock)
Product Version: iOS 10.3
Created: 2017-05-03T03:07:09.957930
Originated: 2017-05-03T00:00:00
Open Radar Link: http://www.openradar.me/31955525
The text was updated successfully, but these errors were encountered: