后台UIWebView更新我遇到了EXC_BAD_ACCESS(SIGSEGV)错误

时间:2016-01-19 09:14:44

标签: ios objective-c youtube uiwebview

我单独学习iOS编程,我想制作Youtube应用程序。

我希望当我点击主页按钮时我可以听,我想听很多歌(就像youtube播放列表。但不是列表,我可以在我的表列表中选择歌曲。)

我使用youtube-ios-player-libarary https://github.com/youtube/youtube-ios-player-helper如果我按下主页按钮应用程序在后台连续播放,我就解决了。

但我现在有问题。

当我在后台听你的视频声音而不是视频结束时,不要播放下一个视频。在应用程序工作,但不在后台。我没有像这样在Xcode中登录任何日志。 (我试过Zombie) enter image description here

我尝试在主线程中工作,像这样:

[self performSelectorOnMainThread:@selector(createNewWebView) withObject:nil waitUntilDone:YES];

dispatch_async(dispatch_get_main_queue(), ^{
    [self.webView removeFromSuperview];

   _webView = [self createNewWebView];
   [self addSubview:self.webView];
});

但它没有用,现在我发现了这个设备日志:

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

我可以更改或添加代码? 请帮帮我们..

使用主线程是否正确??

0 个答案:

没有答案
相关问题