"WebThread"中的iOS UIWebView崩溃

Ste*_*eve 8 uiwebview ios

有谁能帮我解决这个崩溃?它在加载时在某些UIWebView实例之间来回切换时会间歇性地发生.

崩溃通常略有不同,但它始终是具有类似堆栈跟踪的"WebThread"崩溃.

这是两个崩溃的相关部分:

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

小智 7

我看到你有iOs 5.0.您正在加载Office文档(docx,xl​​s)的文件?

如果是这样,那么你的情况与我的相同.此问题仅在具有5.0的系统(此处为iPad和iPad 2)上重现,并且在您尝试UIWebView在完成加载文件之前停止对象时会发生此问题.无论是通过电话stopLoading还是通过电话loadRequest

txt文件不会发生这种情况.

如果是这样,它起源于WebThread从线开始:

#1  0x34912158 in -[QuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:] ()
Run Code Online (Sandbox Code Playgroud)

并跳转到一些随机指针,如:

#0  0x00000010 in 0x00000010 ()
Run Code Online (Sandbox Code Playgroud)

  • 我向Apple报告这是一个错误,他们说这是他们正在研究的一个已知问题.希望它能在iOS 5.1上线时修复. (2认同)