WebCore的崩溃是否意味着它必然与UIWebView相关?

时间:2012-08-12 13:04:03

标签: iphone uiwebview

我的应用程序广泛使用UIWebViews,因为它本质上是一个基于WebView的应用程序。

在应用程序的左侧,我有一个滑出菜单,类似于Facebook和Path应用程序。选择其中一个表行将重新滑入主Web视图并加载URL。

我看过Webthread中WebCore的随机崩溃,但我根本无法理解如何解决它。我测试了僵尸和内存分配,但应用程序始终保持在3-4MB的实时字节内。

我不知道它是否相关,但是当webview加载其页面时,存在重要的“钩子”。例如,在shouldStartLoad中,我检查某些URL,然后在页面上调用JS函数。我不知道这是否会导致崩溃。

崩溃日志显示webcore崩溃的不同区域。我在下面添加了一些最新的变种,但我不确定这些是所有可能的变种。

简而言之,什么是WebCore崩溃?这是UIWebView中的一个我无法做任何事情的错误吗?谢谢!

Thread 2 name:  WebThread
Thread 2 Crashed:
0   WebCore                         0x32c540c0 WebCore::Document::body() const + 4
1   WebCore                         0x32d04052 WebCore::CachedResourceLoader::preload(WebCore::CachedResource::Type, WTF::String const&, WTF::String const&, bool) + 18
2   WebCore                         0x32d03ebe WebCore::HTMLPreloadScanner::processToken() + 1510
3   WebCore                         0x32d03872 WebCore::HTMLPreloadScanner::scan() + 42
4   WebCore                         0x32cebc24 WebCore::HTMLDocumentParser::append(WebCore::SegmentedString const&) + 92
5   WebCore                         0x32cbce20 WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter*, char const*, int, bool) + 200
6   WebCore                         0x32ceb8d0 WebCore::DocumentWriter::addData(char const*, int, bool) + 48
7   WebCore                         0x32ce5c3e WebCore::DocumentLoader::commitData(char const*, int) + 122
8   WebKit                          0x358cbc9a -[WebHTMLRepresentation receivedData:withDataSource:] + 158
9   WebKit                          0x358cbb10 -[WebDataSource(WebInternal) _receivedData:] + 164
10  WebKit                          0x358cba48 WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) + 100
11  WebCore                         0x32ce2a48 WebCore::DocumentLoader::commitLoad(char const*, int) + 120
12  WebCore                         0x32ce29b4 WebCore::DocumentLoader::receivedData(char const*, int) + 72
13  WebCore                         0x32ce25da WebCore::ResourceLoader::didReceiveData(char const*, int, long long, bool) + 34
14  WebCore                         0x32ce2566 WebCore::MainResourceLoader::didReceiveData(char const*, int, long long, bool) + 474
15  WebCore                         0x32ce22b2 WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle*, char const*, int, int) + 42
16  WebCore                         0x32ce2234 WebCore::ResourceHandle::handleDataArray(__CFArray const*) + 212
17  WebCore                         0x32ce2156 WebCore::didReceiveDataArray(_CFURLConnection*, __CFArray const*, void const*) + 34
18  CFNetwork                       0x370dd058 URLConnectionClient::_clientDidReceiveData(__CFArray const*, URLConnectionClient::ClientConnectionEventQueue*) + 220
19  CFNetwork                       0x370434b0 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 436
20  CFNetwork                       0x3704319c URLConnectionClient::processEvents() + 100
21  CFNetwork                       0x370430d2 MultiplexerSource::perform() + 150
22  CoreFoundation                  0x3738aacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
23  CoreFoundation                  0x3738a32e __CFRunLoopDoSources0 + 358
24  CoreFoundation                  0x3738903e __CFRunLoopRun + 646
25  CoreFoundation                  0x3730c49e CFRunLoopRunSpecific + 294
26  CoreFoundation                  0x3730c366 CFRunLoopRunInMode + 98
27  WebCore                         0x32cb5c9c RunWebThread(void*) + 396
28  libsystem_c.dylib               0x33c2b72e _pthread_start + 314
29  libsystem_c.dylib               0x33c2b5e8 thread_start + 0

OR

Thread 2 name:  WebThread
Thread 2 Crashed:
0   WebCore                         0x32cbe120 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode) + 312
1   WebCore                         0x32cebc66 WebCore::HTMLDocumentParser::append(WebCore::SegmentedString const&) + 158
2   WebCore                         0x32cbce20 WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter*, char const*, int, bool) + 200
3   WebCore                         0x32ceb8d0 WebCore::DocumentWriter::addData(char const*, int, bool) + 48
4   WebCore                         0x32ce5c3e WebCore::DocumentLoader::commitData(char const*, int) + 122
5   WebKit                          0x358cbc9a -[WebHTMLRepresentation receivedData:withDataSource:] + 158
6   WebKit                          0x358cbb10 -[WebDataSource(WebInternal) _receivedData:] + 164
7   WebKit                          0x358cba48 WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) + 100
8   WebCore                         0x32ce2a48 WebCore::DocumentLoader::commitLoad(char const*, int) + 120
9   WebCore                         0x32ce29b4 WebCore::DocumentLoader::receivedData(char const*, int) + 72
10  WebCore                         0x32ce25da WebCore::ResourceLoader::didReceiveData(char const*, int, long long, bool) + 34
11  WebCore                         0x32ce2566 WebCore::MainResourceLoader::didReceiveData(char const*, int, long long, bool) + 474
12  WebCore                         0x32ce22b2 WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle*, char const*, int, int) + 42
13  WebCore                         0x32ce2276 WebCore::ResourceHandle::handleDataArray(__CFArray const*) + 278
14  WebCore                         0x32ce2156 WebCore::didReceiveDataArray(_CFURLConnection*, __CFArray const*, void const*) + 34
15  CFNetwork                       0x370dd058 URLConnectionClient::_clientDidReceiveData(__CFArray const*, URLConnectionClient::ClientConnectionEventQueue*) + 220
16  CFNetwork                       0x370434b0 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 436
17  CFNetwork                       0x37043592 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 662
18  CFNetwork                       0x3704319c URLConnectionClient::processEvents() + 100
19  CFNetwork                       0x370430d2 MultiplexerSource::perform() + 150
20  CoreFoundation                  0x3738aacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
21  CoreFoundation                  0x3738a298 __CFRunLoopDoSources0 + 208
22  CoreFoundation                  0x3738903e __CFRunLoopRun + 646
23  CoreFoundation                  0x3730c49e CFRunLoopRunSpecific + 294
24  CoreFoundation                  0x3730c366 CFRunLoopRunInMode + 98
25  WebCore                         0x32cb5c9c RunWebThread(void*) + 396
26  libsystem_c.dylib               0x33c2b72e _pthread_start + 314
27  libsystem_c.dylib               0x33c2b5e8 thread_start + 0

OR

Thread 2 name:  WebThread
Thread 2 Crashed:
0   JavaScriptCore                  0x35653c7c WTF::fastFree(void*) + 80
1   WebCore                         0x32d064b4 WebCore::SegmentedString::prepend(WebCore::SegmentedSubstring const&) + 136
2   WebCore                         0x32d0640e WebCore::SegmentedString::prepend(WebCore::SegmentedString const&) + 66
3   WebCore                         0x32d047a8 WebCore::(anonymous namespace)::unconsumeCharacters(WebCore::SegmentedString&, WTF::Vector<unsigned short, 10ul> const&) + 188
4   WebCore                         0x32cf023e WebCore::consumeHTMLEntity(WebCore::SegmentedString&, WTF::Vector<unsigned short, 16ul>&, bool&, unsigned short) + 1850
5   WebCore                         0x32cef9e4 WebCore::HTMLTokenizer::processEntity(WebCore::SegmentedString&) + 40
6   WebCore                         0x32cbebe8 WebCore::HTMLTokenizer::nextToken(WebCore::SegmentedString&, WebCore::HTMLToken&) + 1232
7   WebCore                         0x32d03894 WebCore::HTMLPreloadScanner::scan() + 76
8   WebCore                         0x32cebc24 WebCore::HTMLDocumentParser::append(WebCore::SegmentedString const&) + 92
9   WebCore                         0x32cbce20 WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter*, char const*, int, bool) + 200
10  WebCore                         0x32ceb8d0 WebCore::DocumentWriter::addData(char const*, int, bool) + 48
11  WebCore                         0x32ce5c3e WebCore::DocumentLoader::commitData(char const*, int) + 122
12  WebKit                          0x358cbc9a -[WebHTMLRepresentation receivedData:withDataSource:] + 158
13  WebKit                          0x358cbb10 -[WebDataSource(WebInternal) _receivedData:] + 164
14  WebKit                          0x358cba48 WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) + 100
15  WebCore                         0x32ce2a48 WebCore::DocumentLoader::commitLoad(char const*, int) + 120
16  WebCore                         0x32ce29b4 WebCore::DocumentLoader::receivedData(char const*, int) + 72
17  WebCore                         0x32ce25da WebCore::ResourceLoader::didReceiveData(char const*, int, long long, bool) + 34
18  WebCore                         0x32ce2566 WebCore::MainResourceLoader::didReceiveData(char const*, int, long long, bool) + 474
19  WebCore                         0x32ce22b2 WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle*, char const*, int, int) + 42
20  WebCore                         0x32ce2276 WebCore::ResourceHandle::handleDataArray(__CFArray const*) + 278
21  WebCore                         0x32ce2156 WebCore::didReceiveDataArray(_CFURLConnection*, __CFArray const*, void const*) + 34
22  CFNetwork                       0x370dd058 URLConnectionClient::_clientDidReceiveData(__CFArray const*, URLConnectionClient::ClientConnectionEventQueue*) + 220
23  CFNetwork                       0x370434b0 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 436
24  CFNetwork                       0x3704319c URLConnectionClient::processEvents() + 100
25  CFNetwork                       0x370430d2 MultiplexerSource::perform() + 150
26  CoreFoundation                  0x3738aacc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
27  CoreFoundation                  0x3738a32e __CFRunLoopDoSources0 + 358
28  CoreFoundation                  0x3738903e __CFRunLoopRun + 646
29  CoreFoundation                  0x3730c49e CFRunLoopRunSpecific + 294
30  CoreFoundation                  0x3730c366 CFRunLoopRunInMode + 98
31  WebCore                         0x32cb5c9c RunWebThread(void*) + 396
32  libsystem_c.dylib               0x33c2b72e _pthread_start + 314
33  libsystem_c.dylib               0x33c2b5e8 thread_start + 0

1 个答案:

答案 0 :(得分:0)

WebThread由WebKit管理,没有开发人员拥有的代码在那里运行。我想知道,它是否可以在较新的iOS固件上重现?你可以就此发表雷达报告。

相关问题