This regressed with https://trac.webkit.org/changeset/227430. This is happening on the iOS Simulator Debug WK2 bot, on fast/visual-viewport/viewport-dimensions.html (but only when running multiple tests together, e.g. all of fast/visual-viewport, rather than just the one test): ASSERTION FAILED: !self.zoomToScaleCompletionHandler /Volumes/Data/slave/ios-simulator-11-debug/build/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm(129) : -[TestRunnerWKWebView zoomToScale:animated:completionHandler:] 1 0x10c01fd6d WTFCrash 2 0x10a7789f1 -[TestRunnerWKWebView zoomToScale:animated:completionHandler:] 3 0x10a781b90 WTR::UIScriptController::zoomToScale(double, OpaqueJSValue const*) 4 0x10a739221 WTR::JSUIScriptController::zoomToScale(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) 5 0x10b0e7327 long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*) 6 0x7e38d9c4034 7 0x10b0636e1 llint_entry 8 0x10b0636e1 llint_entry 9 0x10b05b5f2 vmEntryToJavaScript 10 0x10b9e9c6e JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) 11 0x10b98f0cd JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::ExecState*, JSC::JSObject*) 12 0x10bc42427 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) 13 0x10bc425b0 JSC::profiledEvaluate(JSC::ExecState*, JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) 14 0x10b0e5fa3 JSEvaluateScript 15 0x10a779fb4 WTR::UIScriptContext::runUIScript(WTF::String const&, unsigned int) 16 0x10a7755a9 WTR::TestInvocation::runUISideScript(OpaqueWKString const*, unsigned int) 17 0x10a7729f0 WTR::TestInvocation::runUISideScriptAfterUpdateCallback(OpaqueWKError const*, void*) 18 0x1153d9937 WKPageCallAfterNextPresentationUpdate::$_6::operator()(WebKit::CallbackBase::Error) const 19 0x1153d989a WTF::Function<void (WebKit::CallbackBase::Error)>::CallableWrapper<WKPageCallAfterNextPresentationUpdate::$_6>::call(WebKit::CallbackBase::Error) 20 0x114607b81 WTF::Function<void (WebKit::CallbackBase::Error)>::operator()(WebKit::CallbackBase::Error) const 21 0x114a8b2ba WebKit::GenericCallback<>::performCallbackWithReturnValue() 22 0x114a82b75 WebKit::GenericCallback<>::performCallback() 23 0x114a81dc2 WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&) 24 0x114a8dce0 void IPC::callMemberFunctionImpl<WebKit::RemoteLayerTreeDrawingAreaProxy, void (WebKit::RemoteLayerTreeDrawingAreaProxy::*)(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&), std::__1::tuple<WebKit::RemoteLayerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction>, 0ul, 1ul>(WebKit::RemoteLayerTreeDrawingAreaProxy*, void (WebKit::RemoteLayerTreeDrawingAreaProxy::*)(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&), std::__1::tuple<WebKit::RemoteLayerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) 25 0x114a8d9f0 void IPC::callMemberFunction<WebKit::RemoteLayerTreeDrawingAreaProxy, void (WebKit::RemoteLayerTreeDrawingAreaProxy::*)(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&), std::__1::tuple<WebKit::RemoteLayerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction>, std::__1::integer_sequence<unsigned long, 0ul, 1ul> >(std::__1::tuple<WebKit::RemoteLayerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction>&&, WebKit::RemoteLayerTreeDrawingAreaProxy*, void (WebKit::RemoteLayerTreeDrawingAreaProxy::*)(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&)) 26 0x114a8d7fe void IPC::handleMessage<Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree, WebKit::RemoteLayerTreeDrawingAreaProxy, void (WebKit::RemoteLayerTreeDrawingAreaProxy::*)(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&)>(IPC::Decoder&, WebKit::RemoteLayerTreeDrawingAreaProxy*, void (WebKit::RemoteLayerTreeDrawingAreaProxy::*)(WebKit::RemoteLayerTreeTransaction const&, WebKit::RemoteScrollingCoordinatorTransaction const&)) 27 0x114a8d594 WebKit::RemoteLayerTreeDrawingAreaProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 28 0x114809c28 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) 29 0x1146fa5b4 WebKit::ChildProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&) 30 0x1151859ba WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 31 0x115185ab4 non-virtual thunk to WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) https://build.webkit.org/results/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/r227482%20(2286)/fast/visual-viewport/viewport-dimensions-stderr.txt
It looks like we need to change [TestRunnerWKWebView zoomToScale:animated] so that it doesn't set self.zoomToScaleCompletionHandler when it's going to immediately call that completion handler. I'll upload a patch.
Created attachment 332170 [details] Patch
Created attachment 332178 [details] Patch Uploading again to re-trigger the mac-debug EWS bot
Comment on attachment 332178 [details] Patch Clearing flags on attachment: 332178 Committed r227563: <https://trac.webkit.org/changeset/227563>
All reviewed patches have been landed. Closing bug.
<rdar://problem/36838395>