UIWebView WTFCrash CSSParser::addNamespace - ios

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?

Related

iOS crash in executing JS by JavascriptCore

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.

AppleMetalGLRenderer Crash

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.

UIWebView WebCore TimerBase crash only on 11.3 (15E216) : SIGTRAP WebCore _ZN7WebCore9TimerBaseD2Ev

I've recently got a crash report from Crash Report Tools. This crash is being refered to UIWebView WebCore crash, my app uses UIWebView only ,And i can't switch to WKWebview recently. Below is the crash report,and I can't reproduce it. It happened on device iPhone 6,7,8,X, but only using version iOS 11.3 (15E216).
this crash has 3 diffrent crash stack. Any advice would be helpful.
type 1:
0 WebCore WebCore::TimerBase::~TimerBase() + 120
1 WebCore WebCore::TimerBase::~TimerBase() + 40
2 WebCore WebCore::ImageLoader::~ImageLoader() + 2076
3 WebCore WebCore::HTMLImageElement::~HTMLImageElement() + 224
4 WebCore WebCore::HTMLImageElement::~HTMLImageElement() + 12
5 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212
type 2:
0 WebCore WebCore::TimerBase::~TimerBase() + 120
1 WebCore WebCore::TimerBase::~TimerBase() + 40
2 WebCore WebCore::XMLHttpRequest::~XMLHttpRequest() + 116
3 WebCore WebCore::XMLHttpRequest::~XMLHttpRequest() + 12
4 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212
5 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&)::'lambda'()::operator()() const + 408
type 3:
0 WebCore WebCore::TimerBase::~TimerBase() + 120
1 WebCore WebCore::TimerBase::~TimerBase() + 40
2 WebCore WebCore::MediaElementSession::~MediaElementSession() + 96
3 WebCore WebCore::HTMLMediaElement::~HTMLMediaElement() + 1340
4 WebCore WebCore::HTMLVideoElement::~HTMLVideoElement() + 176
5 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212
==
fully crash stack:
type 1:
#0 Thread
SIGTRAP
0 WebCore WebCore::TimerBase::~TimerBase() + 120
1 WebCore WebCore::TimerBase::~TimerBase() + 40
2 WebCore WebCore::ImageLoader::~ImageLoader() + 2076
3 WebCore WebCore::HTMLImageElement::~HTMLImageElement() + 224
4 WebCore WebCore::HTMLImageElement::~HTMLImageElement() + 12
5 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212
6 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&)::'lambda'()::operator()() const + 408
7 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&) + 320
8 JavaScriptCore JSC::JSDestructibleObjectHeapCellType::finishSweep(JSC::MarkedBlock::Handle&, JSC::FreeList*) + 32
9 JavaScriptCore JSC::MarkedBlock::Handle::sweep(JSC::FreeList*) + 372
10 JavaScriptCore JSC::LocalAllocator::tryAllocateIn(JSC::MarkedBlock::Handle*) + 40
11 JavaScriptCore JSC::LocalAllocator::tryAllocateWithoutCollecting() + 48
12 JavaScriptCore JSC::LocalAllocator::allocateSlowCase(JSC::GCDeferralContext*, JSC::AllocationFailureMode) + 292
13 JavaScriptCore JSC::CompleteSubspace::allocateNonVirtual(JSC::VM&, unsigned long, JSC::GCDeferralContext*, JSC::AllocationFailureMode) + 216
14 WebCore std::__1::enable_if<std::is_same<WebCore::GainNode, WebCore::GainNode>::value, WebCore::JSDOMWrapperConverterTraits<WebCore::GainNode>::WrapperClass*>::type WebCore::createWrapper<WebCore::GainNode, WebCore::GainNode>(WebCore::JSDOMGlobalObject*, ***::Ref<WebCore::GainNode, ***::DumbPtrTraits<WebCore::GainNode> >&&) + 220
15 WebCore WebCore::toJS(JSC::ExecState*, WebCore::JSDOMGlobalObject*, WebCore::GainNode&) + 136
16 WebCore WebCore::jsAudioContextPrototypeFunctionCreateGain(JSC::ExecState*) + 264
17 JavaScriptCore _llint_entry + 31860
18 JavaScriptCore _llint_entry + 29020
19 JavaScriptCore _llint_entry + 30040
20 JavaScriptCore _llint_entry + 29020
21 JavaScriptCore _llint_entry + 29020
22 JavaScriptCore _llint_entry + 29020
23 JavaScriptCore _llint_entry + 29020
24 JavaScriptCore _llint_entry + 29020
25 JavaScriptCore _llint_entry + 29020
26 JavaScriptCore _llint_entry + 29020
27 JavaScriptCore _llint_entry + 29020
28 JavaScriptCore _llint_entry + 29020
29 JavaScriptCore _llint_entry + 29020
30 JavaScriptCore _llint_entry + 29020
31 JavaScriptCore _llint_entry + 29020
32 JavaScriptCore _llint_entry + 29020
33 JavaScriptCore _llint_entry + 29020
34 JavaScriptCore _llint_entry + 29020
35 JavaScriptCore _llint_entry + 29020
36 JavaScriptCore _vmEntryToJavaScript + 272
37 JavaScriptCore JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
38 JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 464
39 JavaScriptCore JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, ***::NakedPtr<JSC::Exception>&) + 180
40 WebCore WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) + 1176
41 WebCore WebCore::EventTarget::fireEventListeners(WebCore::Event&, ***::Vector<***::RefPtr<WebCore::RegisteredEventListener, ***::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, ***::CrashOnOverflow, 16ul, ***::FastMalloc>) + 760
42 WebCore WebCore::EventTarget::fireEventListeners(WebCore::Event&) + 596
43 WebCore WebCore::EventTarget::dispatchEvent(WebCore::Event&) + 116
44 WebCore WebCore::WebSocket::didReceiveBinaryData(***::Vector<unsigned char, 0ul, ***::CrashOnOverflow, 16ul, ***::FastMalloc>&&) + 236
45 WebCore WebCore::WebSocketChannel::processFrame() + 2912
46 WebCore WebCore::WebSocketChannel::processBuffer() + 112
47 WebCore WebCore::WebSocketChannel::didReceiveSocketStreamData(WebCore::SocketStreamHandle&, char const*, unsigned long) + 112
48 WebCore WebCore::SocketStreamHandleImpl::readStreamCallback(unsigned long) + 544
49 CoreFoundation __signalEventSync + 212
50 CoreFoundation __cfstream_solo_signalEventSync + 260
51 CoreFoundation __CFStreamSignalEvent + 548
52 CFNetwork SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 64
53 CFNetwork SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 148
54 CFNetwork SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 88
55 CoreFoundation ___CFSocketPerformV0 + 1352
56 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
57 CoreFoundation ___CFRunLoopDoSources0 + 276
58 CoreFoundation ___CFRunLoopRun + 1204
59 CoreFoundation CFRunLoopRunSpecific + 552
60 GraphicsServices GSEventRunModal + 100
61 UIKit UIApplicationMain + 236
62 x5gamehelper main + 88
63 libdyld.dylib _start + 4
type 2:
#0 Thread
SIGTRAP
0 WebCore WebCore::TimerBase::~TimerBase() + 120
1 WebCore WebCore::TimerBase::~TimerBase() + 40
2 WebCore WebCore::XMLHttpRequest::~XMLHttpRequest() + 116
3 WebCore WebCore::XMLHttpRequest::~XMLHttpRequest() + 12
4 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212
5 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&)::'lambda'()::operator()() const + 408
6 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&) + 320
7 JavaScriptCore JSC::JSDestructibleObjectHeapCellType::finishSweep(JSC::MarkedBlock::Handle&, JSC::FreeList*) + 32
8 JavaScriptCore JSC::MarkedBlock::Handle::sweep(JSC::FreeList*) + 372
9 JavaScriptCore JSC::LocalAllocator::tryAllocateIn(JSC::MarkedBlock::Handle*) + 40
10 JavaScriptCore JSC::LocalAllocator::tryAllocateWithoutCollecting() + 48
11 JavaScriptCore JSC::LocalAllocator::allocateSlowCase(JSC::GCDeferralContext*, JSC::AllocationFailureMode) + 292
12 JavaScriptCore JSC::CompleteSubspace::allocateNonVirtual(JSC::VM&, unsigned long, JSC::GCDeferralContext*, JSC::AllocationFailureMode) + 216
13 WebCore std::__1::enable_if<std::is_same<WebCore::GainNode, WebCore::GainNode>::value, WebCore::JSDOMWrapperConverterTraits<WebCore::GainNode>::WrapperClass*>::type WebCore::createWrapper<WebCore::GainNode, WebCore::GainNode>(WebCore::JSDOMGlobalObject*, ***::Ref<WebCore::GainNode, ***::DumbPtrTraits<WebCore::GainNode> >&&) + 220
14 WebCore WebCore::toJS(JSC::ExecState*, WebCore::JSDOMGlobalObject*, WebCore::GainNode&) + 136
15 WebCore WebCore::jsAudioContextPrototypeFunctionCreateGain(JSC::ExecState*) + 264
16 JavaScriptCore _llint_entry + 31860
17 JavaScriptCore _llint_entry + 29020
18 JavaScriptCore _llint_entry + 30040
19 JavaScriptCore _llint_entry + 29020
20 JavaScriptCore _llint_entry + 29020
21 JavaScriptCore _llint_entry + 29020
22 JavaScriptCore _llint_entry + 29020
23 JavaScriptCore _llint_entry + 29020
24 JavaScriptCore _llint_entry + 29020
25 JavaScriptCore _llint_entry + 29020
26 JavaScriptCore _llint_entry + 29020
27 JavaScriptCore _llint_entry + 29020
28 JavaScriptCore _llint_entry + 29020
29 JavaScriptCore _llint_entry + 28904
30 JavaScriptCore _llint_entry + 28904
31 JavaScriptCore _llint_entry + 28904
32 JavaScriptCore _llint_entry + 29020
33 JavaScriptCore _llint_entry + 29020
34 JavaScriptCore _llint_entry + 28904
35 JavaScriptCore _llint_entry + 29020
36 JavaScriptCore _llint_entry + 29020
37 JavaScriptCore _vmEntryToJavaScript + 272
38 JavaScriptCore JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
39 JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 464
40 JavaScriptCore JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, ***::NakedPtr<JSC::Exception>&) + 180
41 WebCore WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) + 1176
42 WebCore WebCore::EventTarget::fireEventListeners(WebCore::Event&, ***::Vector<***::RefPtr<WebCore::RegisteredEventListener, ***::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, ***::CrashOnOverflow, 16ul, ***::FastMalloc>) + 760
43 WebCore WebCore::EventTarget::fireEventListeners(WebCore::Event&) + 596
44 WebCore WebCore::EventTarget::dispatchEvent(WebCore::Event&) + 116
45 WebCore WebCore::WebSocket::didReceiveBinaryData(***::Vector<unsigned char, 0ul, ***::CrashOnOverflow, 16ul, ***::FastMalloc>&&) + 236
46 WebCore WebCore::WebSocketChannel::processFrame() + 2912
47 WebCore WebCore::WebSocketChannel::processBuffer() + 112
48 WebCore WebCore::WebSocketChannel::didReceiveSocketStreamData(WebCore::SocketStreamHandle&, char const*, unsigned long) + 112
49 WebCore WebCore::SocketStreamHandleImpl::readStreamCallback(unsigned long) + 544
50 CoreFoundation __signalEventSync + 212
51 CoreFoundation __cfstream_solo_signalEventSync + 260
52 CoreFoundation __CFStreamSignalEvent + 548
53 CFNetwork SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 64
54 CFNetwork SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 148
55 CFNetwork SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 88
56 CoreFoundation ___CFSocketPerformV0 + 1352
57 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
58 CoreFoundation ___CFRunLoopDoSources0 + 276
59 CoreFoundation ___CFRunLoopRun + 1204
60 CoreFoundation CFRunLoopRunSpecific + 552
61 GraphicsServices GSEventRunModal + 100
62 UIKit UIApplicationMain + 236
63 x5gamehelper main + 88
64 libdyld.dylib _start + 4
type 3:
#0 Thread
SIGTRAP
0 WebCore WebCore::TimerBase::~TimerBase() + 120
1 WebCore WebCore::TimerBase::~TimerBase() + 40
2 WebCore WebCore::MediaElementSession::~MediaElementSession() + 96
3 WebCore WebCore::HTMLMediaElement::~HTMLMediaElement() + 1340
4 WebCore WebCore::HTMLVideoElement::~HTMLVideoElement() + 176
5 JavaScriptCore void JSC::MarkedBlock::Handle::specializedSweep<true, (JSC::MarkedBlock::Handle::EmptyMode)1, (JSC::MarkedBlock::Handle::SweepMode)1, (JSC::MarkedBlock::Handle::SweepDestructionMode)1, (JSC::MarkedBlock::Handle::ScribbleMode)0, (JSC::MarkedBlock::Handle::NewlyAllocatedMode)1, (JSC::MarkedBlock::Handle::MarksMode)1, JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::MarkedBlock::Handle::EmptyMode, JSC::MarkedBlock::Handle::SweepMode, JSC::MarkedBlock::Handle::SweepDestructionMode, JSC::MarkedBlock::Handle::ScribbleMode, JSC::MarkedBlock::Handle::NewlyAllocatedMode, JSC::MarkedBlock::Handle::MarksMode, JSC::JSDestructibleObjectDestroyFunc const&) + 212
6 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&)::'lambda'()::operator()() const + 408
7 JavaScriptCore void JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType<JSC::JSDestructibleObjectDestroyFunc>(JSC::FreeList*, JSC::JSDestructibleObjectDestroyFunc const&) + 320
8 JavaScriptCore JSC::JSDestructibleObjectHeapCellType::finishSweep(JSC::MarkedBlock::Handle&, JSC::FreeList*) + 32
9 JavaScriptCore JSC::MarkedBlock::Handle::sweep(JSC::FreeList*) + 372
10 JavaScriptCore JSC::LocalAllocator::tryAllocateIn(JSC::MarkedBlock::Handle*) + 40
11 JavaScriptCore JSC::LocalAllocator::tryAllocateWithoutCollecting() + 48
12 JavaScriptCore JSC::LocalAllocator::allocateSlowCase(JSC::GCDeferralContext*, JSC::AllocationFailureMode) + 292
13 JavaScriptCore JSC::CompleteSubspace::allocateNonVirtual(JSC::VM&, unsigned long, JSC::GCDeferralContext*, JSC::AllocationFailureMode) + 216
14 WebCore std::__1::enable_if<std::is_same<WebCore::WebSocket, WebCore::WebSocket>::value, WebCore::JSDOMWrapperConverterTraits<WebCore::WebSocket>::WrapperClass*>::type WebCore::createWrapper<WebCore::WebSocket, WebCore::WebSocket>(WebCore::JSDOMGlobalObject*, ***::Ref<WebCore::WebSocket, ***::DumbPtrTraits<WebCore::WebSocket> >&&) + 220
15 WebCore WebCore::constructJSWebSocket1(JSC::ExecState*) + 284
16 WebCore WebCore::JSDOMConstructor<WebCore::JSWebSocket>::construct(JSC::ExecState*) + 136
17 JavaScriptCore JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 580
18 JavaScriptCore _llint_entry + 30024
19 JavaScriptCore _llint_entry + 28904
20 JavaScriptCore _llint_entry + 28904
21 JavaScriptCore _llint_entry + 29020
22 JavaScriptCore _llint_entry + 28904
23 JavaScriptCore _llint_entry + 28904
24 JavaScriptCore _llint_entry + 29020
25 JavaScriptCore _llint_entry + 29020
26 JavaScriptCore _llint_entry + 29020
27 JavaScriptCore _llint_entry + 29020
28 JavaScriptCore _vmEntryToJavaScript + 272
29 JavaScriptCore JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
30 JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 464
31 JavaScriptCore JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) + 512
32 JavaScriptCore _llint_entry + 31860
33 JavaScriptCore _llint_entry + 29020
34 JavaScriptCore _vmEntryToJavaScript + 272
35 JavaScriptCore JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
36 JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 464
37 JavaScriptCore JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) + 512
38 JavaScriptCore _llint_entry + 31860
39 JavaScriptCore _llint_entry + 29020
40 JavaScriptCore _llint_entry + 29020
41 JavaScriptCore _llint_entry + 29020
42 JavaScriptCore _llint_entry + 28904
43 JavaScriptCore _llint_entry + 29020
44 JavaScriptCore _llint_entry + 28904
45 JavaScriptCore _llint_entry + 28904
46 JavaScriptCore _llint_entry + 28904
47 JavaScriptCore _vmEntryToJavaScript + 272
48 JavaScriptCore JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
49 JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 464
50 JavaScriptCore JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, ***::NakedPtr<JSC::Exception>&) + 180
51 WebCore WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) + 1176
52 WebCore WebCore::EventTarget::fireEventListeners(WebCore::Event&, ***::Vector<***::RefPtr<WebCore::RegisteredEventListener, ***::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, ***::CrashOnOverflow, 16ul, ***::FastMalloc>) + 760
53 WebCore WebCore::EventTarget::fireEventListeners(WebCore::Event&) + 596
54 WebCore WebCore::EventTarget::dispatchEvent(WebCore::Event&) + 116
55 WebCore WebCore::WebSocket::didReceiveBinaryData(***::Vector<unsigned char, 0ul, ***::CrashOnOverflow, 16ul, ***::FastMalloc>&&) + 236
56 WebCore WebCore::WebSocketChannel::processFrame() + 2912
57 WebCore WebCore::WebSocketChannel::processBuffer() + 112
58 WebCore WebCore::WebSocketChannel::didReceiveSocketStreamData(WebCore::SocketStreamHandle&, char const*, unsigned long) + 112
59 WebCore WebCore::SocketStreamHandleImpl::readStreamCallback(unsigned long) + 544
60 CoreFoundation __signalEventSync + 212
61 CoreFoundation __cfstream_solo_signalEventSync + 260
62 CoreFoundation __CFStreamSignalEvent + 548
63 CFNetwork SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 64
64 CFNetwork SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 148
65 CFNetwork SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 88
66 CoreFoundation ___CFSocketPerformV0 + 1352
67 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
68 CoreFoundation ___CFRunLoopDoSources0 + 276
69 CoreFoundation ___CFRunLoopRun + 1204
70 CoreFoundation CFRunLoopRunSpecific + 552
71 GraphicsServices GSEventRunModal + 100
72 UIKit UIApplicationMain + 236
73 x5gamehelper main + 88
74 libdyld.dylib _start + 4
Can anybody help me ? :)
I had faced same type of issue due to JavaScriptCore. After wasted 3-4 days time, Finally got below solution.
Just disable JSC_useJIT envirnment to false for iOS 11.0. It is worked for me.
I put this code in didFinishLaunchingWithOptions method in AppDelegate file:
setenv("JSC_useJIT", "false", 0);
I hope this will help.
Find reference from Here
You appear to have exposed a bug with TimerBase in WebKit as reported here:
https://bugs.webkit.org/show_bug.cgi?id=182931
They mention a fix, which may have been picked up in the recently released 11.3.1.
You can see the fix here if you're curious.

iOS Crash related to javascript core, web thread

getting lots of crashes in ios11 as below: webkit framework is included in project. any idea what could be reason for this crash ?
Crashed: WebThread
0 JavaScriptCore 0x18bdbeebc bmalloc::Heap::allocateSmallChunk(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long) + 680
1 JavaScriptCore 0x18bdbec70 bmalloc::Heap::allocateSmallChunk(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long) + 92
2 JavaScriptCore 0x18bdbef58 bmalloc::Heap::allocateSmallPage(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, std::__1::array<bmalloc::List<bmalloc::SmallPage>, 112ul>&) + 152
3 JavaScriptCore 0x18bdbf45c bmalloc::Heap::allocateSmallBumpRangesByObject(std::__1::lock_guard<bmalloc::StaticMutex>&, unsigned long, bmalloc::BumpAllocator&, bmalloc::FixedVector<bmalloc::BumpRange, 3ul>&, std::__1::array<bmalloc::List<bmalloc::SmallPage>, 112ul>&) + 52
4 JavaScriptCore 0x18bdbd228 bmalloc::Allocator::refillAllocatorSlowCase(bmalloc::BumpAllocator&, unsigned long) + 160
5 JavaScriptCore 0x18bdbd358 bmalloc::Allocator::allocateLogSizeClass(unsigned long) + 160
6 JavaScriptCore 0x18bba1cec JSC::MarkedBlock::tryCreate(JSC::Heap&) + 36
7 JavaScriptCore 0x18bba10c0 JSC::MarkedAllocator::allocateSlowCaseImpl(JSC::GCDeferralContext*, bool) + 368
8 JavaScriptCore 0x18bce69d0 JSC::Subspace::allocate(unsigned long) + 152
9 JavaScriptCore 0x18bcfb7a0 JSC::UnlinkedFunctionExecutable::link(JSC::VM&, JSC::SourceCode const&, std::optional<int>, JSC::Intrinsic) + 236
10 JavaScriptCore 0x18b6c9b98 JSC::CodeBlock::finishCreation(JSC::VM&, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*) + 1964
11 JavaScriptCore 0x18bcb9f64 JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, JSC::JSFunction*, JSC::JSScope*, JSC::JSObject*&) + 1088
12 JavaScriptCore 0x18bcba384 JSC::ScriptExecutable::prepareForExecutionImpl(JSC::VM&, JSC::JSFunction*, JSC::JSScope*, JSC::CodeSpecializationKind, JSC::CodeBlock*&) + 240
13 JavaScriptCore 0x18b454718 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 672
14 JavaScriptCore 0x18bb9b444 llint_entry + 26996
15 JavaScriptCore 0x18bb94900 vmEntryToJavaScript + 272
16 JavaScriptCore 0x18ba73190 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 184
17 JavaScriptCore 0x18ba47af4 JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::ExecState*, JSC::JSObject*) + 12168
18 JavaScriptCore 0x18b7108e8 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) + 340
19 WebCore 0x18d77fe4c WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*) + 324
20 WebCore 0x18d786458 WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) + 584
21 WebCore 0x18d4c5750 WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) + 164
22 WebCore 0x18d7866fc WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) + 216
23 WebCore 0x18d78ce0c WebCore::ScriptRunner::timerFired() + 456
24 WebCore 0x18c85b000 WebCore::ThreadTimers::sharedTimerFiredInternal() + 172
25 WebCore 0x18c85af40 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
26 CoreFoundation 0x1849fefc0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
27 CoreFoundation 0x1849fece4 __CFRunLoopDoTimer + 864
28 CoreFoundation 0x1849fe4e4 __CFRunLoopDoTimers + 248
29 CoreFoundation 0x1849fc0cc __CFRunLoopRun + 1928
30 CoreFoundation 0x18491be58 CFRunLoopRunSpecific + 436
31 WebCore 0x18c88ca34 RunWebThread(void*) + 560
32 libsystem_pthread.dylib 0x18467c2b4 _pthread_body + 308
33 libsystem_pthread.dylib 0x18467c180 _pthread_body + 310
34 libsystem_pthread.dylib 0x18467ab74 thread_start + 4

UIWebView update in background I've got a EXC_BAD_ACCESS

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.

Resources