Bug 190955 - Crash in http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html
Summary: Crash in http/tests/inspector/network/resource-response-source-memory-cache-r...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-26 05:22 PDT by Antoine Quint
Modified: 2018-10-26 11:33 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.76 KB, patch)
2018-10-26 06:07 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2018-10-26 05:22:25 PDT
This is fallout from https://bugs.webkit.org/show_bug.cgi?id=190901. If you run this command: 

run-webkit-tests -1 --debug --child-processes=1 http/tests/inspector/network/resource-initiatorNode.html http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html

… you'll hit a crash when this assertion is hit:

ASSERTION FAILED: !frame().animation().hasAnimations()
./page/FrameView.cpp(607) : void WebCore::FrameView::didDestroyRenderTree()

When DRT loads http/tests/inspector/network/resource-initiatorNode.html, it eventually calls RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsCSSIntegrationEnabled() with a true value with this code invocation:

#0	0x112b4faed in WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled(bool) at ~/Builds/Debug/WebCore.framework/PrivateHeaders/RuntimeEnabledFeatures.h:115
#1	0x112b4d5a1 in ::-[WebView(WebPrivate) _preferencesChanged:](WebPreferences *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:3099
#2	0x112b4b104 in ::-[WebView(WebPrivate) _preferencesChangedNotification:](NSNotification *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:2786
#3	0x7fff45e903f2 in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
#4	0x7fff45e9036c in ___CFXRegistrationPost_block_invoke ()
#5	0x7fff45e9028d in _CFXRegistrationPost ()
#6	0x7fff45e986d9 in ___CFXNotificationPost_block_invoke ()
#7	0x7fff45dffe8a in -[_CFXNotificationRegistrar find:object:observer:enumerator:] ()
#8	0x7fff45dff24d in _CFXNotificationPost ()
#9	0x7fff4824d98b in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#10	0x112b0e2af in ::-[WebPreferences(WebPrivate) _postPreferencesChangedNotification]() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebPreferences.mm:1841
#11	0x112b0b366 in ::-[WebPreferences _setBoolValue:forKey:](BOOL, NSString *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebPreferences.mm:846
#12	0x112b1257e in ::-[WebPreferences(WebPrivate) setWebAnimationsCSSIntegrationEnabled:](BOOL) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebPreferences.mm:3147
#13	0x1068e427c in setWebPreferencesForTestOptions(TestOptions const&) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1011
#14	0x1068e21d0 in resetWebViewToConsistentStateBeforeTesting(TestOptions const&) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1850
#15	0x1068d8aa8 in runTest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1983
#16	0x1068d801f in runTestingServerLoop() at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1195
#17	0x1068d7467 in dumpRenderTree(int, char const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1296
#18	0x1068da860 in DumpRenderTreeMain(int, char const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1409

From that point on the Web Animations CSS Integration feature should be on, which is what is expected for DRT and WKTR. But, then we have this call sequence that sets the flag back to false when the test shows the Web Inspector and preferences are re-set to what Web Inspector expects to be sane defaults:

#0	0x112b4fb00 in WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled(bool) at ~/Builds/Debug/WebCore.framework/PrivateHeaders/RuntimeEnabledFeatures.h:117
#1	0x112b4d5a1 in ::-[WebView(WebPrivate) _preferencesChanged:](WebPreferences *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:3099
#2	0x112b5d78a in ::-[WebView setPreferences:](WebPreferences *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:6233
#3	0x112aad1d1 in ::-[WebInspectorWindowController init]() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:395
#4	0x112aad2cd in ::-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:](WebView *, BOOL) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:408
#5	0x112aa9c9f in WebInspectorClient::openLocalFrontend(WebCore::InspectorController*) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:108
#6	0x118b29fef in WebCore::InspectorController::show() at ~/Code/safari/OpenSource/Source/WebCore/inspector/InspectorController.cpp:361
#7	0x112aa92b4 in ::-[WebInspector showWindow]() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebInspector/WebInspector.mm:70
#8	0x112aa9318 in ::-[WebInspector show:](id) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebInspector/WebInspector.mm:75
#9	0x106951fea in TestRunner::showWebInspector() at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/TestRunnerMac.mm:802
#10	0x10693a3a6 in showWebInspectorCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/TestRunner.cpp:1498
#11	0x107811631 in long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*) at ~/Code/safari/OpenSource/Source/JavaScriptCore/API/APICallbackFunction.h:63
#12	0x33138780102d in 0x33138780102d ()
#13	0x10778d8c8 in llint_entry at ~/Code/safari/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:830
#14	0x10778d8c8 in llint_entry at ~/Code/safari/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:830
#15	0x1077851e2 in vmEntryToJavaScript at ~/Code/safari/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:256
#16	0x10833d31e in JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) at ~/Code/safari/OpenSource/Source/JavaScriptCore/jit/JITCodeInlines.h:38
#17	0x10833d9b9 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/interpreter/Interpreter.cpp:891
#18	0x1085f003c in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/runtime/CallData.cpp:41
#19	0x1085f012a in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/runtime/CallData.cpp:48
#20	0x1085f041e in JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/runtime/CallData.cpp:69
#21	0x117f756db in WebCore::JSExecState::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) at ~/Code/safari/OpenSource/Source/WebCore/bindings/js/JSExecState.h:74
#22	0x117fbec54 in WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) at ~/Code/safari/OpenSource/Source/WebCore/bindings/js/JSEventListener.cpp:175
#23	0x118586eec in WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtr<WebCore::RegisteredEventListener, WTF::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, WTF::CrashOnOverflow, 16ul>, WebCore::EventTarget::EventInvokePhase) at ~/Code/safari/OpenSource/Source/WebCore/dom/EventTarget.cpp:301
#24	0x1185828c2 in WebCore::EventTarget::fireEventListeners(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) at ~/Code/safari/OpenSource/Source/WebCore/dom/EventTarget.cpp:242
#25	0x118e67481 in WebCore::DOMWindow::dispatchEvent(WebCore::Event&, WebCore::EventTarget*) at ~/Code/safari/OpenSource/Source/WebCore/page/DOMWindow.cpp:2013
#26	0x118e716a5 in WebCore::DOMWindow::dispatchLoadEvent() at ~/Code/safari/OpenSource/Source/WebCore/page/DOMWindow.cpp:1962
#27	0x1184a46f8 in WebCore::Document::dispatchWindowLoadEvent() at ~/Code/safari/OpenSource/Source/WebCore/dom/Document.cpp:4487
#28	0x11849ccb3 in WebCore::Document::implicitClose() at ~/Code/safari/OpenSource/Source/WebCore/dom/Document.cpp:2945
#29	0x118d032fb in WebCore::FrameLoader::checkCallImplicitClose() at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:951
#30	0x118d02d94 in WebCore::FrameLoader::checkCompleted() at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:892
#31	0x118d02e0d in WebCore::FrameLoader::loadDone(WebCore::LoadCompletionType) at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:794
#32	0x118dfe896 in WebCore::CachedResourceLoader::loadDone(WebCore::LoadCompletionType, bool) at ~/Code/safari/OpenSource/Source/WebCore/loader/cache/CachedResourceLoader.cpp:1317
#33	0x118d77a0d in WebCore::SubresourceLoader::notifyDone(WebCore::LoadCompletionType) at ~/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:742
#34	0x118d75778 in WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) at ~/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:642
#35	0x118d5b775 in WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*) at ~/Code/safari/OpenSource/Source/WebCore/loader/ResourceLoader.cpp:682
#36	0x116f1e6d4 in -[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]::$_7::operator()() at ~/Code/safari/OpenSource/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:314
#37	0x116f1e5b9 in WTF::Function<void ()>::CallableWrapper<-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]::$_7>::call() at ~/Builds/Debug/usr/local/include/wtf/Function.h:101
#38	0x1073076dd in WTF::Function<void ()>::operator()() const at ~/Builds/Debug/usr/local/include/wtf/Function.h:56
#39	0x1073364dd in WTF::dispatchFunctionsFromMainThread() at ~/Code/safari/OpenSource/Source/WTF/wtf/MainThread.cpp:115
#40	0x107339245 in ::-[JSWTFMainThreadCaller call]() at ~/Code/safari/OpenSource/Source/WTF/wtf/cocoa/MainThreadCocoa.mm:54
#41	0x7fff482edabb in __NSThreadPerformPerform ()
#42	0x7fff45e49155 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#43	0x7fff45e490fb in __CFRunLoopDoSource0 ()
#44	0x7fff45e2cb95 in __CFRunLoopDoSources0 ()
#45	0x7fff45e2c13e in __CFRunLoopRun ()
#46	0x7fff45e2ba28 in CFRunLoopRunSpecific ()
#47	0x1068d9dbb in runTest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:2052
#48	0x1068d801f in runTestingServerLoop() at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1195
#49	0x1068d7467 in dumpRenderTree(int, char const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1296
#50	0x1068da860 in DumpRenderTreeMain(int, char const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1409

After this happens the media controls code that is loaded as a result of media controls being created for the .vtt file loaded in the test creates some CSS Transitions and CSS Animations that are evaluated using the legacy animation engine (CSSAnimationController). Then after that the flag is set back to true!

#0	0x112b4faed in WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled(bool) at ~/Builds/Debug/WebCore.framework/PrivateHeaders/RuntimeEnabledFeatures.h:115
#1	0x112b4d5a1 in ::-[WebView(WebPrivate) _preferencesChanged:](WebPreferences *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:3099
#2	0x112b4b104 in ::-[WebView(WebPrivate) _preferencesChangedNotification:](NSNotification *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:2786
#3	0x7fff45e903f2 in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
#4	0x7fff45e9036c in ___CFXRegistrationPost_block_invoke ()
#5	0x7fff45e9028d in _CFXRegistrationPost ()
#6	0x7fff45e986d9 in ___CFXNotificationPost_block_invoke ()
#7	0x7fff45dffe8a in -[_CFXNotificationRegistrar find:object:observer:enumerator:] ()
#8	0x7fff45dff24d in _CFXNotificationPost ()
#9	0x7fff4824d98b in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#10	0x112b0e2af in ::-[WebPreferences(WebPrivate) _postPreferencesChangedNotification]() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebPreferences.mm:1841
#11	0x112b0b366 in ::-[WebPreferences _setBoolValue:forKey:](BOOL, NSString *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebPreferences.mm:846
#12	0x112b0cc4e in ::-[WebPreferences(WebPrivate) setDeveloperExtrasEnabled:](BOOL) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebPreferences.mm:1317
#13	0x106951f97 in TestRunner::setDeveloperExtrasEnabled(bool) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/TestRunnerMac.mm:797
#14	0x1068d9f98 in runTest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:2071
#15	0x1068d801f in runTestingServerLoop() at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1195
#16	0x1068d7467 in dumpRenderTree(int, char const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1296
#17	0x1068da860 in DumpRenderTreeMain(int, char const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/DumpRenderTree.mm:1409

Then the inspector is shown again and the flag is back to being false:

#0	0x112b4fb00 in WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled(bool) at ~/Builds/Debug/WebCore.framework/PrivateHeaders/RuntimeEnabledFeatures.h:117
#1	0x112b4d5a1 in ::-[WebView(WebPrivate) _preferencesChanged:](WebPreferences *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:3099
#2	0x112b5d78a in ::-[WebView setPreferences:](WebPreferences *) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebView/WebView.mm:6233
#3	0x112aad1d1 in ::-[WebInspectorWindowController init]() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:395
#4	0x112aad2cd in ::-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:](WebView *, BOOL) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:408
#5	0x112aa9c9f in WebInspectorClient::openLocalFrontend(WebCore::InspectorController*) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm:108
#6	0x118b29fef in WebCore::InspectorController::show() at ~/Code/safari/OpenSource/Source/WebCore/inspector/InspectorController.cpp:361
#7	0x112aa92b4 in ::-[WebInspector showWindow]() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebInspector/WebInspector.mm:70
#8	0x112aa9318 in ::-[WebInspector show:](id) at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebInspector/WebInspector.mm:75
#9	0x106951fea in TestRunner::showWebInspector() at ~/Code/safari/OpenSource/Tools/DumpRenderTree/mac/TestRunnerMac.mm:802
#10	0x10693a3a6 in showWebInspectorCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) at ~/Code/safari/OpenSource/Tools/DumpRenderTree/TestRunner.cpp:1498
#11	0x107811631 in long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*) at ~/Code/safari/OpenSource/Source/JavaScriptCore/API/APICallbackFunction.h:63
#12	0x33138780102d in 0x33138780102d ()
#13	0x10778d8c8 in llint_entry at ~/Code/safari/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:830
#14	0x10778d8c8 in llint_entry at ~/Code/safari/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:830
#15	0x1077851e2 in vmEntryToJavaScript at ~/Code/safari/OpenSource/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:256
#16	0x10833d31e in JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) at ~/Code/safari/OpenSource/Source/JavaScriptCore/jit/JITCodeInlines.h:38
#17	0x10833d9b9 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/interpreter/Interpreter.cpp:891
#18	0x1085f003c in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/runtime/CallData.cpp:41
#19	0x1085f012a in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/runtime/CallData.cpp:48
#20	0x1085f041e in JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) at ~/Code/safari/OpenSource/Source/JavaScriptCore/runtime/CallData.cpp:69
#21	0x117f756db in WebCore::JSExecState::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) at ~/Code/safari/OpenSource/Source/WebCore/bindings/js/JSExecState.h:74
#22	0x117fbec54 in WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) at ~/Code/safari/OpenSource/Source/WebCore/bindings/js/JSEventListener.cpp:175
#23	0x118586eec in WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtr<WebCore::RegisteredEventListener, WTF::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, WTF::CrashOnOverflow, 16ul>, WebCore::EventTarget::EventInvokePhase) at ~/Code/safari/OpenSource/Source/WebCore/dom/EventTarget.cpp:301
#24	0x1185828c2 in WebCore::EventTarget::fireEventListeners(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) at ~/Code/safari/OpenSource/Source/WebCore/dom/EventTarget.cpp:242
#25	0x118e67481 in WebCore::DOMWindow::dispatchEvent(WebCore::Event&, WebCore::EventTarget*) at ~/Code/safari/OpenSource/Source/WebCore/page/DOMWindow.cpp:2013
#26	0x118e716a5 in WebCore::DOMWindow::dispatchLoadEvent() at ~/Code/safari/OpenSource/Source/WebCore/page/DOMWindow.cpp:1962
#27	0x1184a46f8 in WebCore::Document::dispatchWindowLoadEvent() at ~/Code/safari/OpenSource/Source/WebCore/dom/Document.cpp:4487
#28	0x11849ccb3 in WebCore::Document::implicitClose() at ~/Code/safari/OpenSource/Source/WebCore/dom/Document.cpp:2945
#29	0x118d032fb in WebCore::FrameLoader::checkCallImplicitClose() at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:951
#30	0x118d02d94 in WebCore::FrameLoader::checkCompleted() at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:892
#31	0x118d02e0d in WebCore::FrameLoader::loadDone(WebCore::LoadCompletionType) at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:794
#32	0x118dfe896 in WebCore::CachedResourceLoader::loadDone(WebCore::LoadCompletionType, bool) at ~/Code/safari/OpenSource/Source/WebCore/loader/cache/CachedResourceLoader.cpp:1317
#33	0x118d77a0d in WebCore::SubresourceLoader::notifyDone(WebCore::LoadCompletionType) at ~/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:742
#34	0x118d75778 in WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) at ~/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:642
#35	0x118d5b775 in WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*) at ~/Code/safari/OpenSource/Source/WebCore/loader/ResourceLoader.cpp:682
#36	0x116f1e6d4 in -[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]::$_7::operator()() at ~/Code/safari/OpenSource/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:314
#37	0x116f1e5b9 in WTF::Function<void ()>::CallableWrapper<-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]::$_7>::call() at ~/Builds/Debug/usr/local/include/wtf/Function.h:101
#38	0x1073076dd in WTF::Function<void ()>::operator()() const at ~/Builds/Debug/usr/local/include/wtf/Function.h:56
#39	0x1073364dd in WTF::dispatchFunctionsFromMainThread() at ~/Code/safari/OpenSource/Source/WTF/wtf/MainThread.cpp:115
#40	0x107339245 in ::-[JSWTFMainThreadCaller call]() at ~/Code/safari/OpenSource/Source/WTF/wtf/cocoa/MainThreadCocoa.mm:54

… and eventually we hit the ASSERT():

#2	0x118ed4d38 in WebCore::FrameView::didDestroyRenderTree() at ~/Code/safari/OpenSource/Source/WebCore/page/FrameView.cpp:607
#3	0x1184a1616 in WebCore::Document::destroyRenderTree() at ~/Code/safari/OpenSource/Source/WebCore/dom/Document.cpp:2418
#4	0x1184a18f0 in WebCore::Document::prepareForDestruction() at ~/Code/safari/OpenSource/Source/WebCore/dom/Document.cpp:2465
#5	0x118ec82a0 in WebCore::Frame::setView(WTF::RefPtr<WebCore::FrameView, WTF::DumbPtrTraits<WebCore::FrameView> >&&) at ~/Code/safari/OpenSource/Source/WebCore/page/Frame.cpp:240
#6	0x112a3ac5d in WebFrameLoaderClient::transitionToCommittedForNewPage() at ~/Code/safari/OpenSource/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:1466
#7	0x118d0d669 in WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*) at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:2149
#8	0x118d0c700 in WebCore::FrameLoader::commitProvisionalLoad() at ~/Code/safari/OpenSource/Source/WebCore/loader/FrameLoader.cpp:1976
#9	0x118ca4e2c in WebCore::DocumentLoader::commitIfReady() at ~/Code/safari/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:357
#10	0x118cab27c in WebCore::DocumentLoader::commitLoad(char const*, int) at ~/Code/safari/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:964
#11	0x118cab225 in WebCore::DocumentLoader::dataReceived(char const*, int) at ~/Code/safari/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:1113
#12	0x118caba96 in WebCore::DocumentLoader::dataReceived(WebCore::CachedResource&, char const*, int) at ~/Code/safari/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:1086
#13	0x118dec46b in WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) at ~/Code/safari/OpenSource/Source/WebCore/loader/cache/CachedRawResource.cpp:136
#14	0x118dec249 in WebCore::CachedRawResource::updateBuffer(WebCore::SharedBuffer&) at ~/Code/safari/OpenSource/Source/WebCore/loader/cache/CachedRawResource.cpp:73
#15	0x118d76f62 in WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::RefPtr<WebCore::SharedBuffer, WTF::DumbPtrTraits<WebCore::SharedBuffer> >&&, long long, WebCore::DataPayloadType) at ~/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:455
#16	0x118d77092 in WebCore::SubresourceLoader::didReceiveBuffer(WTF::Ref<WebCore::SharedBuffer, WTF::DumbPtrTraits<WebCore::SharedBuffer> >&&, long long, WebCore::DataPayloadType) at ~/Code/safari/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:435
#17	0x118d5b70c in WebCore::ResourceLoader::didReceiveBuffer(WebCore::ResourceHandle*, WTF::Ref<WebCore::SharedBuffer, WTF::DumbPtrTraits<WebCore::SharedBuffer> >&&, int) at ~/Code/safari/OpenSource/Source/WebCore/loader/ResourceLoader.cpp:676
#18	0x116f1d9a1 in -[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]::$_5::operator()() at ~/Code/safari/OpenSource/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:280
#19	0x116f1d809 in WTF::Function<void ()>::CallableWrapper<-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]::$_5>::call() at ~/Builds/Debug/usr/local/include/wtf/Function.h:101
#20	0x1073076dd in WTF::Function<void ()>::operator()() const at ~/Builds/Debug/usr/local/include/wtf/Function.h:56
#21	0x1073364dd in WTF::dispatchFunctionsFromMainThread() at ~/Code/safari/OpenSource/Source/WTF/wtf/MainThread.cpp:115
#22	0x107339245 in ::-[JSWTFMainThreadCaller call]() at ~/Code/safari/OpenSource/Source/WTF/wtf/cocoa/MainThreadCocoa.mm:54

The reason things are bad is that the flag was off when the animations were created, but it was on when the code that tears down animations runs and so we don't have a chance to remove the animations from CSSAnimationController as we should have. And so when this ASSERT() checks that there are no animations left on the animation controller upon destroying the page, the state is bad.
Comment 1 Antoine Quint 2018-10-26 06:07:44 PDT
Created attachment 353178 [details]
Patch
Comment 2 WebKit Commit Bot 2018-10-26 11:17:02 PDT
Comment on attachment 353178 [details]
Patch

Clearing flags on attachment: 353178

Committed r237468: <https://trac.webkit.org/changeset/237468>
Comment 3 WebKit Commit Bot 2018-10-26 11:17:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-10-26 11:33:47 PDT
<rdar://problem/45594319>