iOS UIWebView在“WebThread”中崩溃 [英] iOS UIWebView crash in "WebThread"
问题描述
任何能够帮助我解决这次崩溃的人?它在加载时在某些UIWebView实例之间来回切换时会间歇性地发生。
Anyone able to help me out with this crash? It happens intermittently when switching back and forth between some UIWebView instances while they are loading.
崩溃通常略有不同,但它总是WebThread崩溃,堆栈跟踪类似。
The crash is often slightly different, but it's always a crash of the "WebThread" with a similar stack trace.
以下是两次崩溃的相关部分:
Here's the relevant parts of two crashes:
Date/Time: 2011-11-08 14:29:01.165 -0500
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000006
Crashed Thread: 4
Thread 4 name: WebThread
Thread 4 Crashed:
0 ??? 0x00000006 0 + 6
1 WebCore 0x32a36154 -[QuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:] + 72
2 QuickLook 0x30bee2c2 -[QLThreadInvoker connectionDidReceiveDataLengthReceived:] + 90
3 CoreFoundation 0x3537a226 -[NSObject performSelector:withObject:] + 38
4 Foundation 0x32ce2752 __NSThreadPerformPerform + 346
5 CoreFoundation 0x353efafe __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
6 CoreFoundation 0x353ef2ca __CFRunLoopDoSources0 + 210
7 CoreFoundation 0x353ee070 __CFRunLoopRun + 648
8 CoreFoundation 0x353714d8 CFRunLoopRunSpecific + 296
9 CoreFoundation 0x353713a0 CFRunLoopRunInMode + 100
10 WebCore 0x324c912a _ZL12RunWebThreadPv + 398
11 libsystem_c.dylib 0x35ba1c18 _pthread_start + 316
12 libsystem_c.dylib 0x35ba1ad4 thread_start + 4
Date/Time: 2011-11-08 15:09:01.410 -0500
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000034
Crashed Thread: 4
Thread 4 name: WebThread
Thread 4 Crashed:
0 ??? 0x00000034 0 + 52
1 CoreFoundation 0x3537a226 -[NSObject performSelector:withObject:] + 38
2 Foundation 0x32ce2752 __NSThreadPerformPerform + 346
3 CoreFoundation 0x353efafe __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
4 CoreFoundation 0x353ef2ca __CFRunLoopDoSources0 + 210
5 CoreFoundation 0x353ee070 __CFRunLoopRun + 648
6 CoreFoundation 0x353714d8 CFRunLoopRunSpecific + 296
7 CoreFoundation 0x353713a0 CFRunLoopRunInMode + 100
8 WebCore 0x324c912a _ZL12RunWebThreadPv + 398
9 libsystem_c.dylib 0x35ba1c18 _pthread_start + 316
10 libsystem_c.dylib 0x35ba1ad4 thread_start + 4
推荐答案
我看到了你有iOs 5.0。
您正在加载Office文档的文件(docx,xls)?
I see that you have iOs 5.0. Are the files that you're loading Office documents (docx, xls)?
如果是,那么您的情况与我的相同。此问题仅在具有5.0的系统(此处为iPad和iPad 2)上重现,并且在您尝试在完成加载文件之前停止 UIWebView
对象时会发生此问题。是否通过调用 stopLoading
或 loadRequest
If so, then your case is the same as mine. This problem reproduces only on systems with 5.0 (iPad and iPad 2 here), and happens when you try to stop UIWebView
object before it finishes loading the file. Whether it's by calling stopLoading
or loadRequest
这不是不会发生txt文件。
This doesn't happen with txt files.
如果是这样的话,它起源于 WebThread
从行开始:
And if it does, it originates in WebThread
starting from line:
#1 0x34912158 in -[QuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:] ()
并跳转到一些随机指针,如:
and jumping to some random pointers like:
#0 0x00000010 in 0x00000010 ()
这篇关于iOS UIWebView在“WebThread”中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!