RESOLVED INVALID 167864
Creating a UIWebView in jspatch prevents assets from loading on iOS
https://bugs.webkit.org/show_bug.cgi?id=167864
Summary Creating a UIWebView in jspatch prevents assets from loading on iOS
mike.lx
Reported 2017-02-05 19:31:19 PST
JSPatch bridge Objective-C and Javascript using the Objective-C runtime. I use it for hotfixing of iOS App. I'm trying to create a webview in jspatch. However, it causes the new webview to load a webpage without its assets (css/js)。 : -[DOMHTMLBodyElement exceedsStructuralComplexity:]: unrecognized selector sent to instance 0x610000035560 : *** WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: <NSInvalidArgumentException> -[DOMHTMLBodyElement exceedsStructuralComplexity:]: unrecognized selector sent to instance 0x610000035560 : -[WebView _touchEventRegions]: unrecognized selector sent to instance 0x6180000ae460 : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WebView _touchEventRegions]: unrecognized selector sent to instance 0x6180000ae460' *** First throw call stack: ( 0 CoreFoundation 0x000000010892dd4b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010838f21e objc_exception_throw + 48 2 CoreFoundation 0x000000010899df04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x00000001088b3005 ___forwarding___ + 1013 4 CoreFoundation 0x00000001088b2b88 _CF_forwarding_prep_0 + 120 5 UIKit 0x0000000109c78810 -[UIWebBrowserView(UIWebTouchEventsGestureRecognizerDelegateImplementation) isAnyTouchOverActiveArea:] + 71 6 UIKit 0x00000001098dd945 -[UIWebTouchEventsGestureRecognizer touchesBegan:withEvent:] + 131 7 UIKit 0x0000000109a97e5d -[UIGestureRecognizer _touchesBegan:withEvent:] + 113 8 UIKit 0x0000000109a84dc2 __55-[UIGestureEnvironment _updateGesturesForEvent:window:]_block_invoke + 341 9 UIKit 0x0000000109a858e4 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 298 10 UIKit 0x0000000109a84ba6 -[UIGestureEnvironment _updateGesturesForEvent:window:] + 286 11 UIKit 0x00000001095cac1d -[UIWindow sendEvent:] + 3989 12 UIKit 0x00000001095779ab -[UIApplication sendEvent:] + 371 13 UIKit 0x0000000109d6472d __dispatchPreprocessedEventFromEventQueue + 3248 14 UIKit 0x0000000109d5d463 __handleEventQueue + 4879 15 CoreFoundation 0x00000001088d2761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 16 CoreFoundation 0x00000001088b798c __CFRunLoopDoSources0 + 556 17 CoreFoundation 0x00000001088b6e76 __CFRunLoopRun + 918 18 CoreFoundation 0x00000001088b6884 CFRunLoopRunSpecific + 420 19 GraphicsServices 0x000000010dd3fa6f GSEventRunModal + 161 20 UIKit 0x0000000109559c68 UIApplicationMain + 159 21 JSPatchDemo 0x000000010709343f main + 111 22 libdyld.dylib 0x000000010aeec68d start + 1 23 ??? 0x0000000000000001 0x0 + 1 )
Attachments
mike.lx
Comment 1 2017-02-05 19:33:41 PST
someone told me this is a conflict between the JSContext of the jspatch, and the context of the webview, what is happening in JSContext. I really want to know
mike.lx
Comment 2 2017-02-05 20:01:00 PST
what is "[DOMHTMLBodyElement exceedsStructuralComplexity:]" mean, I can not find "exceedsStructuralComplexity" in webkit nighty
Alexey Proskuryakov
Comment 3 2017-02-08 17:14:04 PST
-exceedsStructuralComplexity is not part of WebKit. What these errors say is that messages are being sent to objects of a wrong type, which could happen e.g. when the address is reused after free. You can try enabling NSZombies to see if that's the case. Marking invalid for now, as there isn't much information to investigate at this point.
Note You need to log in before you can comment on or make changes to this bug.