WebCore在OS X应用程序中崩溃

时间:2016-05-22 00:28:21

标签: objective-c macos crash

我收到了一些用户非常相似的崩溃报告。我不确定坠机的确切时刻或可能导致坠机的原因;据我所知,这些崩溃报告看起来非常相似。

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.WebCore 0x00007fff97c15e1e WebCore::TextIterator::subrange(WebCore::Range*, int, int) + 126
1 com.apple.WebCore 0x00007fff97ce5a93 WebCore::AlternativeTextController::applyAlternativeTextToRange(WebCore::Range const*, WTF::String const&, WebCore::AlternativeTextType, WTF::Vector const&) + 1747
2 com.apple.WebCore 0x00007fff97c07262 WebCore::AlternativeTextController::handleAlternativeTextUIResult(WTF::String const&) + 754
3 com.apple.WebKitLegacy 0x00007fff990da858 -[WebView(WebViewInternal) handleAcceptedAlternativeText:] + 72
4 com.apple.WebKitLegacy 0x00007fff9906e6bd CorrectionPanel::handleAcceptedReplacement(NSString*, NSString*, NSString*, NSCorrectionIndicatorType) + 269
5 com.apple.AppKit 0x00007fff9d541b8e __120-[NSSpellChecker showCorrectionIndicatorOfType:primaryString:alternativeStrings:forStringInRect:view:completionHandler:]_block_invoke + 20
6 com.apple.AppKit 0x00007fff9d7a1f63 -[NSCorrectionPanel _doDismissAndAccept:] + 198
7 com.apple.Foundation 0x00007fff99190f4e -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 1115
8 com.apple.Foundation 0x00007fff99190a75 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
9 com.apple.AppKit 0x00007fff9d542709 NSSpellCheckerDismissCorrectionsForView + 294
10 com.apple.WebKitLegacy 0x00007fff9902c25c CorrectionPanel::dismiss(WebCore::ReasonForDismissingAlternativeText) + 92
11 com.apple.WebKitLegacy 0x00007fff9903e939 WebAlternativeTextClient::dismissAlternative(WebCore::ReasonForDismissingAlternativeText) + 25
12 com.apple.WebCore 0x00007fff97c1923b WebCore::Editor::textFieldDidEndEditing(WebCore::Element*) + 27
13 com.apple.WebCore 0x00007fff97fa46bf WebCore::FrameLoader::handleUnloadEvents(WebCore::UnloadEventPolicy) + 143
14 com.apple.WebCore 0x00007fff97a5c6db WebCore::FrameLoader::stopLoading(WebCore::UnloadEventPolicy) + 59
15 com.apple.WebCore 0x00007fff97d5765b WebCore::CachedFrame::CachedFrame(WebCore::Frame&) + 155
16 com.apple.WebCore 0x00007fff97d5939e WebCore::CachedPage::CachedPage(WebCore::Page&) + 62
17 com.apple.WebCore 0x00007fff9853c635 WebCore::PageCache::add(WebCore::HistoryItem&, WebCore::Page&) + 53
18 com.apple.WebCore 0x00007fff979f5384 WebCore::FrameLoader::commitProvisionalLoad() + 292
19 com.apple.WebCore 0x00007fff97a758ff WebCore::DocumentLoader::commitLoad(char const*, int) + 79
20 com.apple.WebCore 0x00007fff97a75280 WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) + 160
21 com.apple.WebCore 0x00007fff97d59601 WebCore::CachedRawResource::addDataBuffer(WebCore::SharedBuffer&) + 145
22 com.apple.WebCore 0x00007fff97a74cfa WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::PassRefPtr, long long, WebCore::DataPayloadType) + 218
23 com.apple.WebCore 0x00007fff97a93f6c WebCore::SubresourceLoader::didReceiveBuffer(WTF::PassRefPtr, long long, WebCore::DataPayloadType) + 44
24 com.apple.WebCore 0x00007fff97a93f0c WebCore::ResourceLoader::didReceiveBuffer(WebCore::ResourceHandle*, WTF::PassRefPtr, int) + 44
25 com.apple.WebCore 0x00007fff988f212a -[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:] + 106
26 com.apple.CFNetwork 0x00007fff9410ab49 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 69
27 com.apple.CFNetwork 0x00007fff9410aa5e -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 233
28 com.apple.CFNetwork 0x00007fff9410a963 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
29 com.apple.CFNetwork 0x00007fff9410f652 _NSURLConnectionDidReceiveDataArray(_CFURLConnection*, __CFArray const*, void const*) + 82
30 com.apple.CFNetwork 0x00007fff9410f259 ___ZN27URLConnectionClient_Classic29_delegate_didReceiveDataArrayEv_block_invoke + 145
31 com.apple.CFNetwork 0x00007fff942a4519 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100
32 libdispatch.dylib 0x00007fff912d340b _dispatch_client_callout + 8
33 libdispatch.dylib 0x00007fff912e1039 _dispatch_block_invoke + 474
34 com.apple.CFNetwork 0x00007fff9410a820 RunloopBlockContext::_invoke_block(void const*, void*) + 24
35 com.apple.CoreFoundation 0x00007fff932efd74 CFArrayApplyFunction + 68
36 com.apple.CFNetwork 0x00007fff9410a719 RunloopBlockContext::perform() + 137
37 com.apple.CFNetwork 0x00007fff9410a5ba MultiplexerSource::perform() + 282
38 com.apple.CFNetwork 0x00007fff9410a3dc MultiplexerSource::_perform(void*) + 72
39 com.apple.CoreFoundation 0x00007fff9334d881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
40 com.apple.CoreFoundation 0x00007fff9332cfbc __CFRunLoopDoSources0 + 556
41 com.apple.CoreFoundation 0x00007fff9332c4df __CFRunLoopRun + 927
42 com.apple.CoreFoundation 0x00007fff9332bed8 CFRunLoopRunSpecific + 296
43 com.apple.HIToolbox 0x00007fff88fd1935 RunCurrentEventLoopInMode + 235
44 com.apple.HIToolbox 0x00007fff88fd176f ReceiveNextEventCommon + 432
45 com.apple.HIToolbox 0x00007fff88fd15af _BlockUntilNextEventMatchingListInModeWithFilter + 71
46 com.apple.AppKit 0x00007fff9ce7aefa _DPSNextEvent + 1067
47 com.apple.AppKit 0x00007fff9ce7a32a -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
48 com.apple.AppKit 0x00007fff9ce6ee84 -[NSApplication run] + 682
49 com.apple.AppKit 0x00007fff9ce3846c NSApplicationMain + 1176
50 libdyld.dylib 0x00007fff9bf3f5ad start + 1

完整崩溃日志:http://pastebin.com/5upzvMJg

因为它是EXC_CORPSE_NOTIFY我知道这意味着仍在使用的某个对象已被释放,但由于我无法重现该崩溃(它只发生在数百个用户中四次,可能使用了应用数千次)我无法使用NSZombies来找出它是谁。

有人曾经遭遇过这种崩溃吗?观察可能会有所帮助: - 所有崩溃都发生在Mac OS X 10.11.4(15E65) - 项目的OS X目标版本是10.8 +

提前致谢。

2 个答案:

答案 0 :(得分:3)

我有同样的问题。

重现的步骤:

  1. 转到https://www.youtube.com/channels
  2. 在搜索字段搜索频道中输入拼写错误的字词(例如,Antz)。
  3. 等待具有建议更正的拼写检查器面板出现。
  4. 按ENTER键。
  5. 结果:应用程序崩溃。

    我的解决方案:关闭自动更正功能。

    在应用中,选择修改>拼写和语法>自动纠正拼写或在用户的默认值中将键“WebAutomaticSpellingCorrectionEnabled”的值设置为NO:

    [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebAutomaticSpellingCorrectionEnabled"];
    

答案 1 :(得分:0)

我也在Chrome Canary中出现此问题,禁用拼写检查是唯一有效的修复方法。