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.
Related
0
Crashed: WebThread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000001
libGPUSupportMercury.dylib gpus_ReturnNotPermittedKillClient
1 AGXGLDriver (null)
2 libGPUSupportMercury.dylib gpusSubmitDataBuffers
3AGXGLDriver (null)
4 WebCore WebCore::GraphicsContext3D::reshape(int, int) + 528
5 WebCore WebCore::WebGLRenderingContextBase::initializeNewContext() + 716
6 WebCore
WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase(WebCore::HTMLCanvasElement&, WTF::RefPtr<WebCore::GraphicsContext3D>&&, WebCore::GraphicsContext3DAttributes) + 544
7 WebCore
WebCore::WebGLRenderingContext::WebGLRenderingContext(WebCore::HTMLCanvasElement&, WTF::PassRefPtr<WebCore::GraphicsContext3D>, WebCore::GraphicsContext3DAttributes) + 60
8 WebCore
WebCore::WebGLRenderingContextBase::create(WebCore::HTMLCanvasElement&, WebCore::GraphicsContext3DAttributes&, WTF::String const&) + 1176
9 WebCore
WebCore::HTMLCanvasElement::getContextWebGL(WTF::String const&, WebCore::GraphicsContext3DAttributes&&) + 156
10 WebCore
WebCore::JSHTMLCanvasElement::getContext(JSC::ExecState&) + 360
11 WebCore
WebCore::jsHTMLCanvasElementPrototypeFunctionGetContext(JSC::ExecState*) + 172
12 JavaScriptCore
llint_entry + 28916
13 JavaScriptCore
llint_entry + 26408
14 JavaScriptCore
llint_entry + 26408
15 JavaScriptCore
llint_entry + 26408
16 JavaScriptCore
llint_entry + 26408
17 JavaScriptCore
llint_entry + 26408
18 JavaScriptCore
llint_entry + 26408
19 JavaScriptCore
llint_entry + 26408
20 JavaScriptCore
llint_entry + 26408
21 JavaScriptCore
vmEntryToJavaScript + 264
22 JavaScriptCore
JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 164
23 JavaScriptCore
JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416
24 JavaScriptCore
JSC::boundFunctionCall(JSC::ExecState*) + 552
25 JavaScriptCore
llint_entry + 28916
26 JavaScriptCore
llint_entry + 26408
27 JavaScriptCore
vmEntryToJavaScript + 264
28 JavaScriptCore
JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 164
29 JavaScriptCore
JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 416
30 JavaScriptCore
JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 164
31 JavaScriptCore
JSC::JSJobMicrotask::run(JSC::ExecState*) + 436
32 WebCore
WebCore::JSDOMWindowMicrotaskCallback::call() + 152
33 WebCore
WebCore::ActiveDOMCallbackMicrotask::run() + 48
34 WebCore
WebCore::MicrotaskQueue::performMicrotaskCheckpoint() + 100
35 WebCore
WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*) + 352
36 WebCore
WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) + 548
37 WebCore
WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) + 52
38 WebCore
WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 216
39 WebCore
WebCore::ScriptRunner::timerFired() + 504
40 WebCore
WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
41 WebCore
WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
42 CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
43 CoreFoundation
__CFRunLoopDoTimer + 856
44 CoreFoundation
__CFRunLoopDoTimers + 244
45 CoreFoundation
__CFRunLoopRun + 1484
46 CoreFoundation
CFRunLoopRunSpecific + 424
47 WebCore
RunWebThread(void*) + 456
48 libsystem_pthread.dylib
_pthread_body + 240
49 libsystem_pthread.dylib
_pthread_body + 282
50
libsystem_pthread.dylib
thread_start + 4
That's a crash. If you want further help please provide the code that caused this error.
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 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)
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
————————————
16.01.19
tried
dispatch_async(dispatch_get_main_queue(), ^{
if (self.webView != nil) {
self.webView removeFromSuperview];
_webView = [self createNewWebView];
[self addSubview:self.webView];
}
});
and
if (self.webView == nil) {
self.webView removeFromSuperview];
_webView = [self createNewWebView];
[self addSubview:self.webView];
}
but It didn’t work.
What can I change or add code ?
Please help me guys..
Its crashing because of open GL in the background.
You will need to disable open GL if the app is in background.
Here is the Code to do that :
typedef void (*CallFuc)(id, SEL, BOOL);
typedef BOOL (*GetFuc)(id, SEL);
-(BOOL)webView:(UIWebView*)view enableGL:(BOOL)bEnable
{
BOOL bRet = NO;
do
{
Ivar internalVar = class_getInstanceVariable([view class], "_internal");
if (!internalVar)
{
NSLog(#"enable GL _internal invalid!");
break;
}
UIWebViewInternal* internalObj = object_getIvar(view, internalVar);
Ivar browserVar = class_getInstanceVariable(object_getClass(internalObj), "browserView");
if (!browserVar)
{
NSLog(#"enable GL browserView invalid!");
break;
}
id webbrowser = object_getIvar(internalObj, browserVar);
Ivar webViewVar = class_getInstanceVariable(object_getClass(webbrowser), "_webView");
if (!webViewVar)
{
NSLog(#"enable GL _webView invalid!");
break;
}
id webView = object_getIvar(webbrowser, webViewVar);
if (!webView)
{
NSLog(#"enable GL webView obj nil!");
}
if(object_getClass(webView) != NSClassFromString(#"WebView"))
{
NSLog(#"enable GL webView not WebView!");
break;
}
SEL selector = NSSelectorFromString(#"_setWebGLEnabled:");
IMP impSet = [webView methodForSelector:selector];
CallFuc func = (CallFuc)impSet;
func(webView, selector, bEnable);
SEL selectorGet = NSSelectorFromString(#"_webGLEnabled");
IMP impGet = [webView methodForSelector:selectorGet];
GetFuc funcGet = (GetFuc)impGet;
BOOL val = funcGet(webView, selector);
bRet = (val == bEnable);
}while(NO);
return bRet;
}
Call [self webView:self.yourWebView enableGL:NO] when app is in background.
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?