Bug 168618

Summary: Tools/Scripts/run-safari --ios-simulator crashes when launching
Product: WebKit Reporter: Brad Wright <bwright2>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Critical CC: ap, mitz, pqg
Priority: P2    
Version: WebKit Nightly Build   
Hardware: iPhone / iPad   
OS: iOS 10   
Attachments:
Description Flags
Full WebKit Crash when trying to run Safari none

Description Brad Wright 2017-02-20 16:01:27 PST
Created attachment 302188 [details]
Full WebKit Crash when trying to run Safari

After following the instructions to build webkit:

Tools/Scripts/build-webkit --clean
Tools/Scripts/build-webkit --ios-simulator
Tools/Scripts/run-safari --ios-simulator

The following crash appears:

Process:               MobileSafari [23878]
Path:                  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications/MobileSafari.app/MobileSafari
Identifier:            MobileSafari
Version:               10.0 (602.1)
Code Type:             X86-64 (Native)
Parent Process:        launchd_sim [23566]
Responsible:           MobileSafari [23878]
User ID:               501

Date/Time:             2017-02-20 13:24:20.587 -0800
OS Version:            Mac OS X 10.12 (16A323)
Report Version:        12
Anonymous UUID:        D296B277-3FDE-76E4-B152-483BD0EFDB2A

Sleep/Wake UUID:       F25E4D3A-DB27-40CB-8B80-ECB3B2CB0F40

Time Awake Since Boot: 710000 seconds
Time Since Wake:       17000 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x4] Symbol missing

Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_FRAMEWORK_PATH=/Users/bradwright/SourceCode/WebKit/WebKitBuild/Release-iphonesimulator
DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks
DYLD_SHARED_REGION=avoid
DYLD_LIBRARY_PATH=/Users/bradwright/SourceCode/WebKit/WebKitBuild/Release-iphonesimulator

Dyld Error Message:
  Symbol not found: _OBJC_CLASS_$_DOMHTMLInputElement
  Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/WebUI.framework/WebUI
  Expected in: /Users/USER/*/WebCore.framework/WebCore
 in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/WebUI.framework/WebUI

...
Comment 1 Alexey Proskuryakov 2017-02-20 23:27:02 PST
DOMHTMLInputElement is no longer implemented in WebCore; you may need Xcode 8.3 beta to use trunk WebKit with system applications.
Comment 2 Brad Wright 2017-02-21 08:53:24 PST
So, how do I fix the build script and the simulator safari launch script so that it does not crash?  Why is it still referencing this object if it is no longer part of webcore?
Comment 3 Alexey Proskuryakov 2017-02-21 08:59:48 PST
This depends on what you are trying to achieve. Let's continue the discussion internally.

From WebKit point of view, this is expected behavior. It is unfortunate that it is no longer possible to run shipping MobileSafari with ToT WebKit, but this is not going to be fixed from WebKit side.
Comment 4 Alexey Proskuryakov 2017-02-21 09:02:34 PST
Hmm, I didn't know about WK_IOS_BINCOMPAT_LDFLAGS. Maybe this could be fixed from WebKit side, Dan would know better.
Comment 5 mitz 2017-02-21 09:11:13 PST
Yes, adding a definition of WK_IOS_BINCOMPAT_LDFLAGS_V10_2 (or whatever matches the iOS SDK being used) may work. This is just not something anyone working on WebKit has tried to accomplish.
Comment 6 Patrick Quinn-Graham 2017-05-10 00:04:51 PDT
I'm trying to compile webkit & run in the iOS simulator, but I'm seeing the same crash as described. Is this going to be fixed at some point, or could someone take on making some kind of host app that could run in the simulator?