My iOS app suffers a crash that hard to be reproduced. Here's crash stack I can provide.
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 (sometimes nonzero, like 0x1170000000007db7)
Crashed: com.apple.main-thread
0 JavaScriptCore 0xe3dc1c JSC::objectConstructorAssign(JSC::JSGlobalObject*, JSC::CallFrame*) + 656
1 JavaScriptCore 0x2b80a0 llint_function_for_construct_arity_checkTagGateAfter + 160236
2 JavaScriptCore 0x2b80a0 llint_function_for_construct_arity_checkTagGateAfter + 160236
3 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
4 JavaScriptCore 0x2b4a48 llint_function_for_construct_arity_checkTagGateAfter + 146324
5 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
6 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
7 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
8 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
9 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
10 JavaScriptCore 0x2b4a48 llint_function_for_construct_arity_checkTagGateAfter + 146324
11 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
12 JavaScriptCore 0x2b4a48 llint_function_for_construct_arity_checkTagGateAfter + 146324
13 JavaScriptCore 0x2b4990 llint_function_for_construct_arity_checkTagGateAfter + 146140
14 JavaScriptCore 0x2b5f90 llint_function_for_construct_arity_checkTagGateAfter + 151772
15 JavaScriptCore 0x28a980 vmEntryToJavaScriptGateAfter + 6
16 JavaScriptCore 0x9fdfe8 JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 532
17 JavaScriptCore 0xc74cb0 JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 184
18 JavaScriptCore 0x36ecfc JSObjectCallAsFunction + 572
19 ... (skips app stack)
For more information,
my app uses JSBinding to manage some JS objects.
jscontext(js global object) is not likely dealloced.
can't provide full codes. The last code snippet is JSObjectCallAsFunction(jscontext, jsobject, NULL, 0, NULL, NULL);, while jsobject refers to a js function.
I've got some information by internal test. Here're some guesses,
maybe JS objects has dealloc unexpectly.
it's not likely a multi-thread issue after reviewing my codes.
Can anyone help to identify the root cause? Any ideas will be appreciated.
Related
I am trying to figure out what is causing this crash and so far have been unable to determine what the problem is. Any help would be greatly appreciated. This is the log from Firebase on the crash, and its happened multiple times.
Crashed: WebThread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000000048e8
0
AGXMetalA11
(Missing)
1
AppleMetalGLRenderer
GLDContextRec::setRenderTexturesAndSamplersInternal(unsigned int, unsigned int&, SetSamplerStateIMPCache*, SetTextureIMPCache*)
2
AppleMetalGLRenderer
GLDContextRec::setRenderTexturesAndSamplersInternal(unsigned int, unsigned int&, SetSamplerStateIMPCache*, SetTextureIMPCache*)
3
AppleMetalGLRenderer
GLDContextRec::setRenderSamplersAndTextures()
4
AppleMetalGLRenderer
GLDContextRec::setRenderState(unsigned int)
5
AppleMetalGLRenderer
gldRenderVertexArray(GLDContextRec*, unsigned int, unsigned int, int, int, unsigned int, void const*, int, void const*)
6
GLEngine
glDrawElements_ACC_ES2Exec
7
WebCore
WebCore::GraphicsContext3D::drawElements(unsigned int, int, unsigned int, long) + 64
8
WebCore
WebCore::WebGLRenderingContextBase::drawElements(unsigned int, int, unsigned int, long long) + 316
9
WebCore
WebCore::jsWebGLRenderingContextPrototypeFunctionDrawElements(JSC::ExecState*) + 328
10
JavaScriptCore
llint_entry + 135068
11
JavaScriptCore
llint_entry + 124496
12
JavaScriptCore
llint_entry + 124496
13
JavaScriptCore
llint_entry + 124496
14
JavaScriptCore
llint_entry + 124496
15
JavaScriptCore
llint_entry + 124664
16
JavaScriptCore
llint_entry + 124664
17
JavaScriptCore
llint_entry + 124496
18
JavaScriptCore
llint_entry + 124664
19
JavaScriptCore
llint_entry + 124496
20
JavaScriptCore
llint_entry + 124496
21
JavaScriptCore
llint_entry + 124496
22
JavaScriptCore
llint_entry + 124496
23
JavaScriptCore
llint_entry + 129852
24
JavaScriptCore
llint_entry + 124496
25
JavaScriptCore
llint_entry + 124496
26
JavaScriptCore
vmEntryToJavaScript + 248
27
JavaScriptCore
JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 408
28
JavaScriptCore
JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 196
29
WebCore
WebCore::JSExecState::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 140
30
WebCore
WebCore::JSCallbackData::invokeCallback(WebCore::JSDOMGlobalObject&, JSC::JSObject*, JSC::JSValue, JSC::MarkedArgumentBuffer&, WebCore::JSCallbackData::CallbackType, JSC::PropertyName, WTF::NakedPtr<JSC::Exception>&) + 356
31
WebCore
WebCore::JSRequestAnimationFrameCallback::handleEvent(double) + 412
32
WebCore
WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks(double) + 400
33
WebCore
WebCore::Page::updateRendering() + 280
34
WebKitLegacy
LayerFlushController::flushLayers() + 52
35
WebKitLegacy
WebViewLayerFlushScheduler::layerFlushCallback() + 56
36
CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
37
CoreFoundation
__CFRunLoopDoObservers + 416
38
CoreFoundation
CFRunLoopRunSpecific + 496
39
WebCore
RunWebThread(void*) + 612
40
libsystem_pthread.dylib
_pthread_start + 156
41
libsystem_pthread.dylib
thread_start + 8
I am not sure why its reporting java because we are not using java in this app; I can only assume Apple has something running in the background. Also, We are not using AppleMetalGLRenderer specifically so again I'm assuming that Apple has it on by default?
Any help would be appreciated.
I am getting a lot of reports on Crashlytics of this WebThread crash, mostly for iPads (~80%) on iOS 12 (~96%). Not sure exactly what it means aside from being a timer / timing issue - any ideas? I have Amazon Ads, Google AdMob and use a WkWebView for the main app.
Crashed: WebThread
0 libGPUSupportMercury.dylib 0x1d0eb5fe4 gpus_ReturnNotPermittedKillClient
1 AGXGLDriver 0x1d54e5ed8 (Missing)
2 libGPUSupportMercury.dylib 0x1d0eb6fac gpusSubmitDataBuffers
3 AGXGLDriver 0x1d54e7404 (Missing)
4 WebCore 0x1beb39e30 WebCore::GraphicsContext3D::reshape(int, int) + 580
5 WebCore 0x1bf001758 WebCore::WebGLRenderingContextBase::initializeNewContext() + 936
6 WebCore 0x1bf001048 WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase(WebCore::CanvasBase&, WTF::Ref<WebCore::GraphicsContext3D, WTF::DumbPtrTraits<WebCore::GraphicsContext3D> >&&, WebCore::GraphicsContext3DAttributes) + 640
7 WebCore 0x1beff7c3c WebCore::WebGLRenderingContext::create(WebCore::CanvasBase&, WTF::Ref<WebCore::GraphicsContext3D, WTF::DumbPtrTraits<WebCore::GraphicsContext3D> >&&, WebCore::GraphicsContext3DAttributes) + 84
8 WebCore 0x1bf0003fc WebCore::WebGLRenderingContextBase::create(WebCore::CanvasBase&, WebCore::GraphicsContext3DAttributes&, WTF::String const&) + 1416
9 WebCore 0x1be6cfd6c WebCore::HTMLCanvasElement::getContext(JSC::ExecState&, WTF::String const&, WTF::Vector<JSC::Strong<JSC::Unknown>, 0ul, WTF::CrashOnOverflow, 16ul>&&) + 904
10 WebCore 0x1bdc59194 WebCore::jsHTMLCanvasElementPrototypeFunctionGetContext(JSC::ExecState*) + 416
11 JavaScriptCore 0x1bc33073c llint_entry + 89260
12 JavaScriptCore 0x1bc32ecb4 llint_entry + 82468
13 JavaScriptCore 0x1bc32ed54 llint_entry + 82628
14 JavaScriptCore 0x1bc32ed54 llint_entry + 82628
15 JavaScriptCore 0x1bc31a7fc vmEntryToJavaScript + 268
16 JavaScriptCore 0x1bc84b32c JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::ExecState*, JSC::JSObject*) + 9816
17 JavaScriptCore 0x1bca546dc JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) + 320
18 WebCore 0x1be30d4bc WebCore::JSExecState::profiledEvaluate(JSC::ExecState*, JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) + 108
19 WebCore 0x1be30d2f8 WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*) + 232
20 WebCore 0x1be5af98c WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) + 640
21 WebCore 0x1be5774c8 WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) + 140
22 WebCore 0x1be5afc30 WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 224
23 WebCore 0x1be5b2f40 WebCore::ScriptRunner::timerFired() + 508
24 WebCore 0x1bea5a20c WebCore::ThreadTimers::sharedTimerFiredInternal() + 216
25 WebCore 0x1bea7a258 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
26 CoreFoundation 0x1b4f92650 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
27 CoreFoundation 0x1b4f92380 __CFRunLoopDoTimer + 864
28 CoreFoundation 0x1b4f91bb4 __CFRunLoopDoTimers + 248
29 CoreFoundation 0x1b4f8cb04 __CFRunLoopRun + 1844
30 CoreFoundation 0x1b4f8c0b0 CFRunLoopRunSpecific + 436
31 WebCore 0x1bdc1cbd8 RunWebThread(void*) + 600
32 libsystem_pthread.dylib 0x1b4c1f2c0 _pthread_body + 128
33 libsystem_pthread.dylib 0x1b4c1f220 _pthread_start + 44
34 libsystem_pthread.dylib 0x1b4c22cdc thread_start + 4
https://groups.google.com/forum/#!msg/google-admob-ads-sdk/MOaVw22zUgY/sOCFi3TuBgAJ had a workaround but it was fixed in Admob iOS 7.45.0 https://developers.google.com/admob/ios/rel-notes
Fixed a crash that occurs on rare occasions when dismissing video ads.
I faced these crashes, then switch to using WKWebView. WKWebViews run in another process, so even if this issue still occurs it may crash only the web view instead of the entire application.
put this key in your infor.plist should do it
<key>gad_preferred_webview</key>
<string>wkwebview</string>
We are facing the following crash in our iOS Cordova based app:
Crashed: WebThread
0 JavaScriptCore 0x187a3b22c WTFCrash + 72
1 JavaScriptCore 0x187a3b224 WTFCrash + 64
2 WebCore 0x187d6c4fc WebCore::CSSParser::addNamespace(WTF::AtomicString const&, WTF::AtomicString const&) + 186
3 WebCore 0x188a6ecac WebCore::TextResourceDecoder::decodeAndFlush(char const*, unsigned long) + 192
4 WebCore 0x187cb5c9c WebCore::CachedScript::script() + 72
5 JavaScriptCore 0x187a21f20 std::__1::unique_ptr<JSC::FunctionNode, std::__1::default_delete<JSC::FunctionNode> > JSC::parse<JSC::FunctionNode>(JSC::VM*, JSC::SourceCode const&, JSC::FunctionParameters*, JSC::Identifier const&, JSC::JSParserBuiltinMode, JSC::JSParserStrictMode, JSC::JSParserCodeType, JSC::ParserError&, JSC::JSTextPosition*, JSC::ConstructorKind, JSC::ThisTDZMode) + 88
6 JavaScriptCore 0x187a21550 JSC::UnlinkedFunctionExecutable::codeBlockFor(JSC::VM&, JSC::SourceCode const&, JSC::CodeSpecializationKind, JSC::DebuggerMode, JSC::ProfilerMode, JSC::ParserError&) + 156
7 JavaScriptCore 0x1877a3440 JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, JSC::JSFunction*, JSC::JSScope*, JSC::JSObject*&) + 508
8 JavaScriptCore 0x1877a3a70 JSC::ScriptExecutable::prepareForExecutionImpl(JSC::ExecState*, JSC::JSFunction*, JSC::JSScope*, JSC::CodeSpecializationKind) + 104
9 JavaScriptCore 0x1875229b0 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 164
10 JavaScriptCore 0x187961e58 llint_entry + 23912
11 JavaScriptCore 0x187961d44 llint_entry + 23636
I have tried to check the source code and found the following:
void CSSParser::addNamespace(const AtomicString& prefix, const AtomicString& uri)
{
if (!m_styleSheet || !m_allowNamespaceDeclarations)
return;
m_allowImportRules = false;
m_styleSheet->parserAddNamespace(prefix, uri);
if (prefix.isEmpty() && !uri.isNull())
m_defaultNamespace = uri;
}
But I can't just figure out where could the WTFCrash be happening. Any idea?
I study iOS Programming alone and I want make Youtube app.
I want that I can listen when I clicked home button and I want listen many song(like a youtube playlist. but not a list I can chose song in my tablelist.)
I use youtube-ios-player-libarary
https://github.com/youtube/youtube-ios-player-helper and I solved if I press home button app continous play in background.
But I have problem now.
When I listen in background youtube video sound and than video ended don't play next video. In the app is working, but not in background. I don't get any log in Xcode like this. (I tried Zombie)
enter image description here
I tried to work in main thread, like this:
[self performSelectorOnMainThread:#selector(createNewWebView) withObject:nil waitUntilDone:YES];
and
dispatch_async(dispatch_get_main_queue(), ^{
[self.webView removeFromSuperview];
_webView = [self createNewWebView];
[self addSubview:self.webView];
});
But it didn't work, and now I found this device log:
Date/Time: 2016-01-18 15:42:46.46 +0900
Launch Time: 2016-01-18 15:42:33.33 +0900
OS Version: iOS 9.2 (13C75)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000001
Triggered by Thread: 13
Thread 13 name: WebThread
Thread 13 Crashed:
0 libGPUSupportMercury.dylib 0x31e3d322 gpus_ReturnNotPermittedKillClient + 10
1 libGPUSupportMercury.dylib 0x31e3de12 gpusSubmitDataBuffers + 118
2 IMGSGX543RC2GLDriver 0x34bd968c 0x34bd6000 + 13964
3 WebCore 0x29260792 WebCore::GraphicsContext3D::reshape(int, int) + 434
4 WebCore 0x299371e2 WebCore::WebGLRenderingContextBase::initializeNewContext() + 502
5 WebCore 0x29936dd0 WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase(WebCore::HTMLCanvasElement*, WTF::PassRefPtr<WebCore::GraphicsContext3D>, WebCore::GraphicsContext3D::Attributes) + 484
6 WebCore 0x29931be0 WebCore::WebGLRenderingContext::WebGLRenderingContext(WebCore::HTMLCanvasElement*, WTF::PassRefPtr<WebCore::GraphicsContext3D>, WebCore::GraphicsContext3D::Attributes) + 48
7 WebCore 0x29936720 WebCore::WebGLRenderingContextBase::create(WebCore::HTMLCanvasElement*, WebCore::WebGLContextAttributes*, WTF::String const&) + 772
8 WebCore 0x28fcfbca WebCore::HTMLCanvasElement::getContext(WTF::String const&, WebCore::CanvasContextAttributes*) + 250
9 WebCore 0x28fcfa46 WebCore::JSHTMLCanvasElement::getContext(JSC::ExecState*) + 154
10 WebCore 0x28fcf988 WebCore::jsHTMLCanvasElementPrototypeFunctionGetContext(JSC::ExecState*) + 88
11 JavaScriptCore 0x28bad71e llint_entry + 21374
12 JavaScriptCore 0x28bad338 llint_entry + 20376
13 JavaScriptCore 0x28bad338 llint_entry + 20376
14 JavaScriptCore 0x28bad338 llint_entry + 20376
15 JavaScriptCore 0x28bad338 llint_entry + 20376
16 JavaScriptCore 0x28ba8190 vmEntryToJavaScript + 336
17 JavaScriptCore 0x28b016da JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 102
18 JavaScriptCore 0x288eaa18 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 344
19 JavaScriptCore 0x288ea8bc JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 60
20 JavaScriptCore 0x2897d780 JSC::boundFunctionCall(JSC::ExecState*) + 324
21 JavaScriptCore 0x28bad71e llint_entry + 21374
22 JavaScriptCore 0x28bad4ba llint_entry + 20762
23 JavaScriptCore 0x28bad338 llint_entry + 20376
24 JavaScriptCore 0x28bad338 llint_entry + 20376
25 JavaScriptCore 0x28ba8190 vmEntryToJavaScript + 336
26 JavaScriptCore 0x28b016da JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 102
27 JavaScriptCore 0x288eaa18 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 344
28 JavaScriptCore 0x288ea8bc JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 60
29 JavaScriptCore 0x2897d780 JSC::boundFunctionCall(JSC::ExecState*) + 324
30 JavaScriptCore 0x28bad71e llint_entry + 21374
31 JavaScriptCore 0x28bad338 llint_entry + 20376
32 JavaScriptCore 0x28ba8190 vmEntryToJavaScript + 336
33 JavaScriptCore 0x28b016da JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 102
34 JavaScriptCore 0x288eaa18 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 344
35 JavaScriptCore 0x288ea8bc JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 60
36 JavaScriptCore 0x2897d780 JSC::boundFunctionCall(JSC::ExecState*) + 324`enter code here`
37 JavaScriptCore 0x28bad71e llint_entry + 21374
38 JavaScriptCore 0x28bad338 llint_entry + 20376
39 JavaScriptCore 0x28ba8190 vmEntryToJavaScript + 336
40 JavaScriptCore 0x28b016da JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 102
41 JavaScriptCore 0x288eaa18 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 344
42 JavaScriptCore 0x289c6f38 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 64
43 WebCore 0x28f95df2 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 490
44 WebCore 0x291e17d8 WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector<WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow, 16ul>&) + 532
45 WebCore 0x28edb96c WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 232
46 WebCore 0x28fd60a0 WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 64
47 WebCore 0x291aebe6 WebCore::DOMWindow::dispatchMessageEventWithOriginCheck(WebCore::SecurityOrigin*, WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<Inspector::ScriptCallStack>) + 66
48 WebCore 0x291aeb62 WebCore::DOMWindow::postMessageTimerFired(WebCore::PostMessageTimer&) + 98
49 WebCore 0x291b212e WebCore::PostMessageTimer::fired() + 14
50 WebCore 0x28e89898 WebCore::ThreadTimers::sharedTimerFiredInternal() + 136
51 WebCore 0x28e897ec WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
52 CoreFoundation 0x25b919e6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
53 CoreFoundation 0x25b91618 __CFRunLoopDoTimer + 936
54 CoreFoundation 0x25b8f464 __CFRunLoopRun + 1500
55 CoreFoundation 0x25ae1bb8 CFRunLoopRunSpecific + 516
56 CoreFoundation 0x25ae19ac CFRunLoopRunInMode + 108
57 WebCore 0x28ecfcbe RunWebThread(void*) + 422
58 libsystem_pthread.dylib 0x25906c7e _pthread_body + 138
59 libsystem_pthread.dylib 0x25906bf2 _pthread_start + 110
60 libsystem_pthread.dylib 0x25904a08 thread_start + 8
What can I change or add code ?
Please help me guys..
Is it correct to use main thread??
I have a UIWebView based iOS application which has recently started crashing quite a lot. I strongly believe the crash is caused by something that has changed in the web content (worst-case, but maybe most likely, scenario is it's a 3rd party banner ad), since the crash reports started to come in for all version of my iOS app on the same day, suddenly going from 0 to several hundred crashes.
Here is the crash stack trace on iOS9:
Thread : Crashed: WebThread
0 libmetal_timestamp.dylib 0x18cf2df08 (Missing)
1 libmetal_timestamp.dylib 0x18cf2eec4 (Missing)
2 libmetal_timestamp.dylib 0x18cf335ac (Missing)
3 MobileCoreServices 0x185c941a8 (Missing)
4 MobileCoreServices 0x185bf3428 (Missing)
5 OpenGLES 0x185ccea9c glTexImage2D + 108
6 WebCore 0x1946e3da8 WebCore::GraphicsContext3D::texImage2D(unsigned int, int, unsigned int, int, int, int, unsigned int, unsigned int, void const*) + 60
7 WebCore 0x194ffb37c WebCore::WebGLRenderingContextBase::texImage2DBase(unsigned int, int, unsigned int, int, int, int, unsigned int, unsigned int, void const*, int&) + 160
8 WebCore 0x194ffbb84 WebCore::WebGLRenderingContextBase::texImage2D(unsigned int, int, unsigned int, int, int, int, unsigned int, unsigned int, JSC::ArrayBufferView*, int&) + 784
9 WebCore 0x194b80ba4 WebCore::jsWebGLRenderingContextBasePrototypeFunctionTexImage2D(JSC::ExecState*) + 2880
10 JavaScriptCore 0x1842422f0 llint_entry + 25056
11 JavaScriptCore 0x184241d10 llint_entry + 23552
12 JavaScriptCore 0x184241d10 llint_entry + 23552
13 JavaScriptCore 0x184241d10 llint_entry + 23552
14 JavaScriptCore 0x18423bef8 vmEntryToJavaScript + 312
15 JavaScriptCore 0x184168c48 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 180
16 JavaScriptCore 0x183e02108 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 400
17 JavaScriptCore 0x183eb41bc JSC::boundFunctionCall(JSC::ExecState*) + 512
18 JavaScriptCore 0x18423c080 vmEntryToNative + 320
19 JavaScriptCore 0x183e0214c JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 468
20 JavaScriptCore 0x183f117dc JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 80
21 WebCore 0x1943b8ecc WebCore::JSCallbackData::invokeCallback(JSC::JSValue, JSC::MarkedArgumentBuffer&, bool*) + 580
22 WebCore 0x194a60434 WebCore::JSRequestAnimationFrameCallback::handleEvent(double) + 196
23 WebCore 0x194dd634c WebCore::ScriptedAnimationController::serviceScriptedAnimations(double) + 424
24 WebCore 0x194575c48 WebCore::DisplayRefreshMonitor::displayDidRefresh() + 428
25 QuartzCore 0x187567840 CA::Display::DisplayLinkItem::dispatch() + 40
26 QuartzCore 0x1875676f4 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 424
27 IOKit 0x183a262f8 IODispatchCalloutFromCFMessage + 372
28 CoreFoundation 0x18272e840 __CFMachPortPerform + 180
29 CoreFoundation 0x182744c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
30 CoreFoundation 0x1827443b4 __CFRunLoopDoSource1 + 436
31 CoreFoundation 0x18274210c __CFRunLoopRun + 1800
32 CoreFoundation 0x182670ca0 CFRunLoopRunSpecific + 384
33 WebCore 0x19425a54c RunWebThread(void*) + 456
34 libsystem_pthread.dylib 0x197c83b28 _pthread_body + 156
35 libsystem_pthread.dylib 0x197c83a8c _pthread_body + 154
36 libsystem_pthread.dylib 0x197c81028 thread_start + 4
On iOS8 it crashes with a slightly different but very very similar stack trace. The iOS8 and iOS9 crashes started at the same time so it's undoubtedly the same thing.
Given the OpenGLES references in the crash report I suspect it has something to do with DOM rendering involving the hardware. Has anyone else developed a hybrid web app and seen these crashes? Any specific CSS transforms/transitions that caused the app to crash this way?
Also, there's a reference to WebGLRenderingContextBase, does that mean that it must be caused by actual WebGL on the web page or could it still originate just form non-3D CSS styles?