Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebCore crash #15526

Closed
samratshekhar opened this issue Aug 17, 2017 · 9 comments
Closed

WebCore crash #15526

samratshekhar opened this issue Aug 17, 2017 · 9 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@samratshekhar
Copy link

Environment

  1. react-native -v: 0.44.3
  2. node -v: 7.7.1
  3. npm -v: 4.1.2
  4. yarn --version:
  • Target Platform: iOS & Android
  • Development Operating System: macOS
  • Build tools: Xcode, Android Studio, Issue particular to iOS

Steps to Reproduce

  • Navigate in and out of WebView instance a couple of time on iPhone causes a crash.
  • Usually of the type EXC_BAD_ACCESS KERN_INVALID_ADDRESS or SIGSEGV
  • Mostly seen on newer devices 7/7Plus

Logs:


Crashed: WebThread SIGSEGV 0x0000001000000001

0 WebCore 0x193eb6824 WebCore::RenderStyle::~RenderStyle() + 84
1 WebCore 0x193edd008 WebCore::StyleResolver::invalidateMatchedPropertiesCache() + 80
2 WebCore 0x193edd008 WebCore::StyleResolver::invalidateMatchedPropertiesCache() + 80
3 WebCore 0x194c338b8 WebCore::RuleSet::addChildRules(WTF::Vector<WTF::RefPtrWebCore::StyleRuleBase, 0ul, WTF::CrashOnOverflow, 16ul> const&, WebCore::MediaQueryEvaluator const&, WebCore::StyleResolver*, bool, bool, WebCore::AddRuleFlags) + 456
4 WebCore 0x194c339bc WebCore::RuleSet::addRulesFromSheet(WebCore::StyleSheetContents&, WebCore::MediaQueryEvaluator const&, WebCore::StyleResolver*) + 192
5 WebCore 0x19425d06c WebCore::DocumentRuleSets::appendAuthorStyleSheets(WTF::Vector<WTF::RefPtrWebCore::CSSStyleSheet, 0ul, WTF::CrashOnOverflow, 16ul> const&, WebCore::MediaQueryEvaluator*, WebCore::InspectorCSSOMWrappers&, WebCore::StyleResolver*) + 104
6 WebCore 0x194d20974 WebCore::StyleResolver::appendAuthorStyleSheets(WTF::Vector<WTF::RefPtrWebCore::CSSStyleSheet, 0ul, WTF::CrashOnOverflow, 16ul> const&) + 36
7 WebCore 0x194d2e9d4 WebCore::Style::Scope::updateStyleResolver(WTF::Vector<WTF::RefPtrWebCore::CSSStyleSheet, 0ul, WTF::CrashOnOverflow, 16ul>&, WebCore::Style::Scope::StyleResolverUpdateType) + 92
8 WebCore 0x194d2e584 WebCore::Style::Scope::updateActiveStyleSheets(WebCore::Style::Scope::UpdateType) + 568
9 WebCore 0x194241278 WebCore::Document::fonts() + 88
10 WebCore 0x1945c8db4 WebCore::jsDocumentFonts(JSC::ExecState*, long long, JSC::PropertyName) + 128
11 JavaScriptCore 0x19324a540 llint_slow_path_get_by_id + 1100
12 JavaScriptCore 0x1939e2710 llint_entry + 10368
13 JavaScriptCore 0x1939e65d0 llint_entry + 26432
14 JavaScriptCore 0x1939e65d0 llint_entry + 26432
15 JavaScriptCore 0x1939dfcc8 vmEntryToJavaScript + 264
16 JavaScriptCore 0x1938c9710 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 164
17 JavaScriptCore 0x193256610 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416
18 JavaScriptCore 0x193954100 JSC::JSPromise::initialize(JSC::ExecState*, JSC::JSGlobalObject*, JSC::JSValue) + 288
19 JavaScriptCore 0x1939545d0 JSC::constructPromise(JSC::ExecState*) + 188
20 JavaScriptCore 0x193252270 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 456
21 JavaScriptCore 0x1939e6958 llint_entry + 27336
22 JavaScriptCore 0x1939e65d0 llint_entry + 26432
23 JavaScriptCore 0x1939e65d0 llint_entry + 26432
24 JavaScriptCore 0x1939e65d0 llint_entry + 26432
25 JavaScriptCore 0x1939e65d0 llint_entry + 26432
26 JavaScriptCore 0x1939e65d0 llint_entry + 26432
27 JavaScriptCore 0x1939e65d0 llint_entry + 26432
28 JavaScriptCore 0x1939e6a10 llint_entry + 27520
29 JavaScriptCore 0x1939e65d0 llint_entry + 26432
30 JavaScriptCore 0x1939dfcc8 vmEntryToJavaScript + 264
31 JavaScriptCore 0x1938c9710 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 164
32 JavaScriptCore 0x193256610 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416
33 JavaScriptCore 0x193562850 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtrJSC::Exception&) + 176
34 WebCore 0x193fb27d0 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 1068
35 WebCore 0x1942c131c WebCore::EventTarget::fireEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtrWebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>) + 820
36 WebCore 0x1942c0c90 WebCore::EventTarget::fireEventListeners(WebCore::Event&) + 236
37 WebCore 0x1942b4c94 WebCore::EventContext::handleLocalEvents(WebCore::Event&) const + 116
38 WebCore 0x1942b5cd4 WebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&) + 800
39 WebCore 0x19443c718 non-virtual thunk to WebCore::HTMLScriptElement::dispatchLoadEvent() + 84
40 WebCore 0x194c4157c WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 344
41 WebCore 0x194c46a40 WebCore::ScriptRunner::timerFired() + 504
42 WebCore 0x193ebee00 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
43 WebCore 0x193ebed40 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
44 CoreFoundation 0x18f2f1aa4 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 28
45 CoreFoundation 0x18f2f17a8 __CFRunLoopDoTimer + 856
46 CoreFoundation 0x18f2f1068 __CFRunLoopDoTimers + 244
47 CoreFoundation 0x18f2eec8c __CFRunLoopRun + 1484
48 CoreFoundation 0x18f21eda4 CFRunLoopRunSpecific + 424
49 WebCore 0x193ef0d3c RunWebThread(void*) + 456
50 libsystem_pthread.dylib 0x18e40568c _pthread_body + 240
51 libsystem_pthread.dylib 0x18e40559c _pthread_body + 282
52 libsystem_pthread.dylib 0x18e402cb4 thread_start + 4


Crashed: WebThread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000006204094000

0 WebCore 0x193eb68e0 WebCore::RenderStyle::~RenderStyle() + 272
1 WebCore 0x193edd008 WebCore::StyleResolver::invalidateMatchedPropertiesCache() + 80
2 WebCore 0x193edd008 WebCore::StyleResolver::invalidateMatchedPropertiesCache() + 80
3 WebCore 0x194c338b8 WebCore::RuleSet::addChildRules(WTF::Vector<WTF::RefPtrWebCore::StyleRuleBase, 0ul, WTF::CrashOnOverflow, 16ul> const&, WebCore::MediaQueryEvaluator const&, WebCore::StyleResolver*, bool, bool, WebCore::AddRuleFlags) + 456
4 WebCore 0x194c339bc WebCore::RuleSet::addRulesFromSheet(WebCore::StyleSheetContents&, WebCore::MediaQueryEvaluator const&, WebCore::StyleResolver*) + 192
5 WebCore 0x19425d06c WebCore::DocumentRuleSets::appendAuthorStyleSheets(WTF::Vector<WTF::RefPtrWebCore::CSSStyleSheet, 0ul, WTF::CrashOnOverflow, 16ul> const&, WebCore::MediaQueryEvaluator*, WebCore::InspectorCSSOMWrappers&, WebCore::StyleResolver*) + 104
6 WebCore 0x194d20974 WebCore::StyleResolver::appendAuthorStyleSheets(WTF::Vector<WTF::RefPtrWebCore::CSSStyleSheet, 0ul, WTF::CrashOnOverflow, 16ul> const&) + 36
7 WebCore 0x194d2e9d4 WebCore::Style::Scope::updateStyleResolver(WTF::Vector<WTF::RefPtrWebCore::CSSStyleSheet, 0ul, WTF::CrashOnOverflow, 16ul>&, WebCore::Style::Scope::StyleResolverUpdateType) + 92
8 WebCore 0x194d2e584 WebCore::Style::Scope::updateActiveStyleSheets(WebCore::Style::Scope::UpdateType) + 568
9 WebCore 0x194241278 WebCore::Document::fonts() + 88
10 WebCore 0x1945c8db4 WebCore::jsDocumentFonts(JSC::ExecState*, long long, JSC::PropertyName) + 128
11 JavaScriptCore 0x19324a540 llint_slow_path_get_by_id + 1100
12 JavaScriptCore 0x1939e2710 llint_entry + 10368
13 JavaScriptCore 0x1939e65d0 llint_entry + 26432
14 JavaScriptCore 0x1939e65d0 llint_entry + 26432
15 JavaScriptCore 0x1939dfcc8 vmEntryToJavaScript + 264
16 JavaScriptCore 0x1938c9710 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 164
17 JavaScriptCore 0x193256610 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416
18 JavaScriptCore 0x193954100 JSC::JSPromise::initialize(JSC::ExecState*, JSC::JSGlobalObject*, JSC::JSValue) + 288
19 JavaScriptCore 0x1939545d0 JSC::constructPromise(JSC::ExecState*) + 188
20 JavaScriptCore 0x193252270 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 456
21 JavaScriptCore 0x1939e6958 llint_entry + 27336
22 JavaScriptCore 0x1939e65d0 llint_entry + 26432
23 JavaScriptCore 0x1939e65d0 llint_entry + 26432
24 JavaScriptCore 0x1939e65d0 llint_entry + 26432
25 JavaScriptCore 0x1939e65d0 llint_entry + 26432
26 JavaScriptCore 0x1939e65d0 llint_entry + 26432
27 JavaScriptCore 0x1939e65d0 llint_entry + 26432
28 JavaScriptCore 0x1939e6a10 llint_entry + 27520
29 JavaScriptCore 0x1939e65d0 llint_entry + 26432
30 JavaScriptCore 0x1939dfcc8 vmEntryToJavaScript + 264
31 JavaScriptCore 0x1938c9710 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 164
32 JavaScriptCore 0x193256610 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416
33 JavaScriptCore 0x193562850 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtrJSC::Exception&) + 176
34 WebCore 0x193fb27d0 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 1068
35 WebCore 0x1942c131c WebCore::EventTarget::fireEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtrWebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>) + 820
36 WebCore 0x1942c0c90 WebCore::EventTarget::fireEventListeners(WebCore::Event&) + 236
37 WebCore 0x1942b4c94 WebCore::EventContext::handleLocalEvents(WebCore::Event&) const + 116
38 WebCore 0x1942b5cd4 WebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&) + 800
39 WebCore 0x19443c718 non-virtual thunk to WebCore::HTMLScriptElement::dispatchLoadEvent() + 84
40 WebCore 0x194c4157c WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 344
41 WebCore 0x194c46a40 WebCore::ScriptRunner::timerFired() + 504
42 WebCore 0x193ebee00 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
43 WebCore 0x193ebed40 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
44 CoreFoundation 0x18f2f1aa4 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 28
45 CoreFoundation 0x18f2f17a8 __CFRunLoopDoTimer + 856
46 CoreFoundation 0x18f2f1068 __CFRunLoopDoTimers + 244
47 CoreFoundation 0x18f2eec8c __CFRunLoopRun + 1484
48 CoreFoundation 0x18f21eda4 CFRunLoopRunSpecific + 424
49 WebCore 0x193ef0d3c RunWebThread(void*) + 456
50 libsystem_pthread.dylib 0x18e40568c _pthread_body + 240
51 libsystem_pthread.dylib 0x18e40559c _pthread_body + 282
52 libsystem_pthread.dylib 0x18e402cb4 thread_start + 4


FWIW, here's our implementation

let webviewComponent;
const webviewProps = {
  ref: (ref) => {
  this._webViewRef = ref;
  this.props.setWebViewRef(ref);
},
  automaticallyAdjustContentInsets: false,
  style: styles.container,
  source: {
    uri: this.props.url,
    headers: {
      'X-CLIENT': Constants.requestXClientHeader,
    },
  },
  onNavigationStateChange: this.navStateHandler,
  javaScriptEnabled: true,
  startInLoadingState: true,
  scalesPageToFit: true,
};

webviewComponent = <WebView {...webviewProps} />;
showToolbarSpinner = false;
@hramos
Copy link
Contributor

hramos commented Aug 17, 2017

Can you reproduce this on 0.47.1 or something more recent than 0.44?

@prithsharma
Copy link

Getting the same crash even on iOS simulator with release builds.
And able to reproduce pretty regularly.

Simulator - iPhone 4S, iOS 9.0
RN - 0.44.2

FWIW, this has started to happen fairly recently - without any change in terms of RN version or webview usage from my side. The webview has been there for long and didn't lead to these errors before. So, can't figure about the cause as such.

@hramos will try to check on a more recent RN version and update here.

@samratshekhar
Copy link
Author

@hramos Sadly, its crashing on RN version 0.48.3.
Here's the example repo with updated RN specs. I've replicated our current navigation and webView setup. Installation and repro steps in README.

@samratshekhar
Copy link
Author

FWIW, I'm uploading crash logs which we received via iTunes.
Here's some info on how to get the actual logs from .xccrashpoint file
Archive.zip

@prithsharma
Copy link

Thanks for the update @samratshekhar. @hramos do you think this information would be helpful?

@stale
Copy link

stale bot commented Nov 13, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 13, 2017
@stale stale bot closed this as completed Nov 20, 2017
@ghost
Copy link

ghost commented Dec 6, 2017

Please open this. I get the same crash on iOS.

0x1896c2528 WTF::HashTable<WTF::String, WTF::String, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraitsWTF::String, WTF::HashTraitsWTF::String >::add(WTF::String const&) + 40
1 WebCore 0x1894ccd00 WebCore::ResourceLoadNotifier::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long, WebCore::ResourceRequest&, WebCore::ResourceResponse const&) + 160
2 WebCore 0x1894ccd00 WebCore::ResourceLoadNotifier::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long, WebCore::ResourceRequest&, WebCore::ResourceResponse const&) + 160
3 WebCore 0x18a356054 WebCore::ResourceLoader::willSendRequestInternal(WebCore::ResourceRequest&, WebCore::ResourceResponse const&) + 536
4 WebCore 0x18a480604 WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&, WebCore::ResourceResponse const&) + 296
5 WebCore 0x1894cbf2c WebCore::ResourceLoader::init(WebCore::ResourceRequest const&) + 280
6 WebCore 0x1894cbcf0 WebCore::SubresourceLoader::startLoading() + 36
7 WebKitLegacy 0x18a935280 WebResourceLoadScheduler::servePendingRequests(WebResourceLoadScheduler::HostInformation*, WebCore::ResourceLoadPriority) + 504
8 WebKitLegacy 0x18a934d9c WebResourceLoadScheduler::loadResource(WebCore::Frame&, WebCore::CachedResource&, WebCore::ResourceRequest const&, WebCore::ResourceLoaderOptions const&) + 64
9 WebCore 0x1896bbdc8 WebCore::CachedResource::load(WebCore::CachedResourceLoader&) + 1548
10 WebCore 0x1896bf3c8 WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type, WebCore::CachedResourceRequest&&, WebCore::CachedResourceLoader::ForPreload, WebCore::CachedResourceLoader::DeferOption) + 3248
11 WebCore 0x1896be550 WebCore::CachedResourceLoader::requestImage(WebCore::CachedResourceRequest&&) + 268
12 WebCore 0x189537694 WebCore::ImageLoader::updateFromElement() + 1184
13 WebCore 0x189a6c424 WebCore::HTMLImageElement::selectImageSource() + 692
14 WebCore 0x1898f9e20 WebCore::Element::attributeChanged(WebCore::QualifiedName const&, WTF::AtomicString const&, WTF::AtomicString const&, WebCore::Element::AttributeModificationReason) + 900
15 WebCore 0x1894c358c WebCore::Element::addAttributeInternal(WebCore::QualifiedName const&, WTF::AtomicString const&, WebCore::Element::SynchronizationOfLazyAttribute) + 552
16 WebCore 0x189dd8328 WebCore::setJSHTMLImageElementSrc(JSC::ExecState*, long long, long long) + 236
17 JavaScriptCore 0x1883d8d24 JSC::callCustomSetter(JSC::ExecState*, JSC::JSValue, bool, JSC::JSObject*, JSC::JSValue, JSC::JSValue) + 40
18 JavaScriptCore 0x18877d784 JSC::JSObject::putInlineSlow(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&) + 904
19 JavaScriptCore 0x18811cfdc llint_slow_path_put_by_id + 820
20 JavaScriptCore 0x18881ff60 llint_entry + 12112
21 JavaScriptCore 0x188823984 llint_entry + 26996
22 JavaScriptCore 0x188823984 llint_entry + 26996
23 JavaScriptCore 0x18881ce40 vmEntryToJavaScript + 272
24 JavaScriptCore 0x188702948 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 136
25 JavaScriptCore 0x1886d98dc JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::ExecState*, JSC::JSObject*) + 11244
26 JavaScriptCore 0x1883cde7c JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtrJSC::Exception&) + 316
27 WebCore 0x18a37ee48 WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*) + 324
28 WebCore 0x18a385334 WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) + 568
29 WebCore 0x18a0cc484 WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) + 156
30 WebCore 0x18a3855d8 WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 216
31 WebCore 0x18a38ba4c WebCore::ScriptRunner::timerFired() + 448
32 WebCore 0x1894c2018 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
33 WebCore 0x1894c1f58 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
34 CoreFoundation 0x18176292c CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 28
35 CoreFoundation 0x181762650 __CFRunLoopDoTimer + 864
36 CoreFoundation 0x181761e50 __CFRunLoopDoTimers + 248
37 CoreFoundation 0x18175fa38 __CFRunLoopRun + 1928
38 CoreFoundation 0x18167ffb8 CFRunLoopRunSpecific + 436
39 WebCore 0x1894f3e04 RunWebThread(void*) + 456
40 libsystem_pthread.dylib 0x1813e431c _pthread_body + 308
41 libsystem_pthread.dylib 0x1813e41e8 _pthread_body + 310
42 libsystem_pthread.dylib 0x1813e2c28 thread_start + 4

@prithsharma
Copy link

I am facing the same issue and it is getting too frequent for my iOS users. Can we please get a reply on this?

@JakeRawr
Copy link
Contributor

JakeRawr commented Jan 25, 2018

+1 Getting the same issue on iPhone 6

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants