AngularJS Safari崩溃EXC_BAD_ACCESS(SIGSEGV)

时间:2014-10-07 13:42:20

标签: angularjs memory-management safari exc-bad-access sigsegv

这是关于一个AngularJS应用程序崩溃Safari。该应用程序在桌面和iPad上随机崩溃Safari。我知道有些东西在内存中调用了一条不存在的记录。如何将该日志跟踪到JavaScript / HTML / CSS操作?

以下是Safari错误报告的输出。我发现崩溃的线程中的22和44调用看起来与其他调用有些不同。我删除了没有崩溃的线程的报告。我还删除了线程状态(超出了字符限制)。

Process:         WebProcess [44604]
Path:            /System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app/Contents/MacOS/WebProcess
Identifier:      com.apple.WebProcess
Version:         8536 (8536.30.1)
Build Info:      WebKit2-7536030001000000~9
Code Type:       X86-64 (Native)
Parent Process:  ??? [1]
User ID:         502

Date/Time:       2014-10-07 11:20:38.251 +0100
OS Version:      Mac OS X 10.8.5 (12F45)
Report Version:  10

Interval Since Last Report:          5675572 sec
Crashes Since Last Report:           18
Per-App Interval Since Last Report:  412893 sec
Per-App Crashes Since Last Report:   8
Anonymous UUID:                      [xxx removed]

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 0000000100a14000-0000000100a15000 [    4K] r-x/rwx SM=COW  /System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app/Contents/MacOS/WebProcess

Application Specific Information:
Bundle controller class:
BrowserBundleController


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             0x00007fff83c98a19 WebCore::Length::incrementCalculatedRef() const + 25
1   com.apple.WebCore             0x00007fff838ec186 bool compareEqual<WebCore::Length, WebCore::Length>(WebCore::Length const&, WebCore::Length const&) + 70
2   com.apple.WebCore             0x00007fff8339aa01 WebCore::RenderStyle::setPaddingLeft(WebCore::Length) + 33
3   com.apple.WebCore             0x00007fff8347242b WebCore::PropertyWrapper<WebCore::Length>::blend(WebCore::AnimationBase const*, WebCore::RenderStyle*, WebCore::RenderStyle const*, WebCore::RenderStyle const*, double) const + 155
4   com.apple.WebCore             0x00007fff83ef8b2b WebCore::CSSPropertyAnimation::blendProperties(WebCore::AnimationBase const*, WebCore::CSSPropertyID, WebCore::RenderStyle*, WebCore::RenderStyle const*, WebCore::RenderStyle const*, double) + 123
5   com.apple.WebCore             0x00007fff83473079 WebCore::ImplicitAnimation::animate(WebCore::CompositeAnimation*, WebCore::RenderObject*, WebCore::RenderStyle const*, WebCore::RenderStyle*, WTF::RefPtr<WebCore::RenderStyle>&) + 233
6   com.apple.WebCore             0x00007fff8346bfe0 WebCore::CompositeAnimation::animate(WebCore::RenderObject*, WebCore::RenderStyle*, WebCore::RenderStyle*) + 208
7   com.apple.WebCore             0x00007fff8333b7df WebCore::AnimationController::updateAnimations(WebCore::RenderObject*, WebCore::RenderStyle*) + 239
8   com.apple.WebCore             0x00007fff8333b6d0 WebCore::RenderObject::setAnimatableStyle(WTF::PassRefPtr<WebCore::RenderStyle>) + 144
9   com.apple.WebCore             0x00007fff83348d16 WebCore::Node::setRenderStyle(WTF::PassRefPtr<WebCore::RenderStyle>) + 38
10  com.apple.WebCore             0x00007fff83348606 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 854
11  com.apple.WebCore             0x00007fff833489a2 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1778
12  com.apple.WebCore             0x00007fff833489a2 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1778
13  com.apple.WebCore             0x00007fff833489a2 WebCore::Element::recalcStyle(WebCore::Node::StyleChange) + 1778
14  com.apple.WebCore             0x00007fff8331805f WebCore::Document::recalcStyle(WebCore::Node::StyleChange) + 559
15  com.apple.WebCore             0x00007fff833420c3 WebCore::Document::updateStyleIfNeeded() + 67
16  com.apple.WebCore             0x00007fff8334dcb7 WebCore::Document::updateLayout() + 55
17  com.apple.WebCore             0x00007fff8334dc65 WebCore::Document::updateLayoutIgnorePendingStylesheets() + 133
18  com.apple.WebCore             0x00007fff838851d7 WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) const + 71
19  com.apple.WebCore             0x00007fff83898a56 WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal(WebCore::CSSPropertyID) + 22
20  com.apple.WebCore             0x00007fff83b3400c WebCore::cssPropertyGetter(JSC::ExecState*, WebCore::JSCSSStyleDeclaration*, unsigned int) + 44
21  com.apple.JavaScriptCore       0x00007fff8ce06cbe cti_op_get_by_val + 942
22  ???                           0x0000000100ef9d7f 0 + 4310670719
23  com.apple.JavaScriptCore       0x00007fff8cde1d70 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 912
24  com.apple.JavaScriptCore       0x00007fff8cde19d4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 52
25  com.apple.WebCore             0x00007fff83b240a1 WebCore::JSCallbackData::invokeCallback(JSC::JSValue, JSC::MarkedArgumentBuffer&, bool*) + 593
26  com.apple.WebCore             0x00007fff83be0383 WebCore::JSRequestAnimationFrameCallback::handleEvent(unsigned long long) + 275
27  com.apple.WebCore             0x00007fff83d8270b WebCore::ScriptedAnimationController::serviceScriptedAnimations(unsigned long long) + 203
28  com.apple.WebCore             0x00007fff838e1d9d WebCore::DisplayRefreshMonitor::notifyClients() + 93
29  com.apple.JavaScriptCore       0x00007fff8cdcba3a WTF::dispatchFunctionsFromMainThread() + 266
30  com.apple.Foundation           0x00007fff8939d5ca __NSThreadPerformPerform + 225
31  com.apple.CoreFoundation       0x00007fff8a882b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32  com.apple.CoreFoundation       0x00007fff8a88251d __CFRunLoopDoSources0 + 445
33  com.apple.CoreFoundation       0x00007fff8a8a57f5 __CFRunLoopRun + 789
34  com.apple.CoreFoundation       0x00007fff8a8a50e2 CFRunLoopRunSpecific + 290
35  com.apple.HIToolbox           0x00007fff8c823eb4 RunCurrentEventLoopInMode + 209
36  com.apple.HIToolbox           0x00007fff8c823c52 ReceiveNextEventCommon + 356
37  com.apple.HIToolbox           0x00007fff8c823ae3 BlockUntilNextEventMatchingListInMode + 62
38  com.apple.AppKit               0x00007fff8d4ce533 _DPSNextEvent + 685
39  com.apple.AppKit               0x00007fff8d4cddf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
40  com.apple.AppKit               0x00007fff8d4c51a3 -[NSApplication run] + 517
41  com.apple.WebCore             0x00007fff83d7a4ff WebCore::RunLoop::run() + 63
42  com.apple.WebKit2             0x00007fff89fe1462 WebKit::WebProcessMain(WebKit::CommandLine const&) + 2586
43  com.apple.WebKit2             0x00007fff89fa7bfd WebKitMain + 285
44  com.apple.WebProcess           0x0000000100a14e7b 0x100a14000 + 3707
45  libdyld.dylib                 0x00007fff853717e1 start + 1

1 个答案:

答案 0 :(得分:0)

你看到的是什么版本的Safari? Dev工具是打开还是关闭会发生什么?

Safari 7.0.1有问题,我投注升级到更高版本会修复它。

请参阅:https://github.com/angular/angularjs.org/issues/70