Bug 133121

Summary: REGRESSION (r169065): Mountain Lion run-api-tests failures: ASSERTION FAILED: Uncaught exception - -[NSRegularLegacyScrollerImp setPresentationValue:]: unrecognized selector sent to instance 0x7ff51aa38000
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bdakin, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch thorton: review+

Description David Kilzer (:ddkilzer) 2014-05-20 07:21:40 PDT
Six tests fail due to an assertion on Mountain Lion debug builds:

Note: Google Test filter = AcceptsFirstMouse.WebKit2
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from AcceptsFirstMouse
[ RUN      ] AcceptsFirstMouse.WebKit2
2014-05-20 05:42:46.798 WebProcess[64421:303] -[NSRegularLegacyScrollerImp setPresentationValue:]: unrecognized selector sent to instance 0x7fe03220d700
ASSERTION FAILED: Uncaught exception - -[NSRegularLegacyScrollerImp setPresentationValue:]: unrecognized selector sent to instance 0x7fe03220d700
0
/Volumes/Data/slave/mountainlion-debug/build/Source/WebCore/platform/mac/BlockExceptions.mm(36) : void ReportBlockedObjCException(NSException *)
1   0x10ee8de40 WTFCrash
2   0x106a0035d ReportBlockedObjCException(NSException*)
3   0x1082de1cd WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(WebCore::ScrollbarThemeClient*)
4   0x1082de218 WebCore::ScrollbarThemeMac::paint(WebCore::ScrollbarThemeClient*, WebCore::GraphicsContext*, WebCore::IntRect const&)
5   0x1082d48b7 WebCore::Scrollbar::paint(WebCore::GraphicsContext*, WebCore::IntRect const&)
6   0x108089319 WebCore::paintScrollbar(WebCore::Scrollbar*, WebCore::GraphicsContext&, WebCore::IntRect const&)
7   0x1080890f0 WebCore::RenderLayerCompositor::paintContents(WebCore::GraphicsLayer const*, WebCore::GraphicsContext&, unsigned int, WebCore::FloatRect const&)
8   0x1071b4428 WebCore::GraphicsLayer::paintGraphicsLayerContents(WebCore::GraphicsContext&, WebCore::FloatRect const&)
9   0x1071c314c WebCore::GraphicsLayerCA::platformCALayerPaintContents(WebCore::PlatformCALayer*, WebCore::GraphicsContext&, WebCore::FloatRect const&)
10  0x1071c319f non-virtual thunk to WebCore::GraphicsLayerCA::platformCALayerPaintContents(WebCore::PlatformCALayer*, WebCore::GraphicsContext&, WebCore::FloatRect const&)
11  0x1087a3783 WebCore::drawLayerContents(CGContext*, WebCore::PlatformCALayer*, WTF::Vector<WebCore::FloatRect, 5ul, WTF::CrashOnOverflow>&)
12  0x1087a3dc4 -[WebLayer drawInContext:]
13  0x7fff95ab3df0 CABackingStoreUpdate_
14  0x7fff95ab2aa6 CA::Layer::display_()
15  0x1087a4266 -[WebSimpleLayer display]
16  0x7fff95ab2425 CA::Layer::display_if_needed(CA::Transaction*)
17  0x7fff95ab1c3f CA::Layer::layout_and_display_if_needed(CA::Transaction*)
18  0x7fff95aa7417 CA::Context::commit_transaction(CA::Transaction*)
19  0x7fff95aa71e7 CA::Transaction::commit()
20  0x7fff95aa7003 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
21  0x7fff902db417 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
22  0x7fff902db381 __CFRunLoopDoObservers
23  0x7fff902b6104 CFRunLoopRunSpecific
24  0x7fff8ed5ceb4 RunCurrentEventLoopInMode
25  0x7fff8ed5cc52 ReceiveNextEventCommon
26  0x7fff8ed5cae3 BlockUntilNextEventMatchingListInMode
27  0x7fff90a85533 _DPSNextEvent
28  0x7fff90a84df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
29  0x7fff90a7c1a3 -[NSApplication run]
30  0x1048bfeaf WebKit::WebContentProcessMainDelegate::startRunLoop()
31  0x1048beeaf int WebKit::ChildProcessMain<WebKit::WebProcess, WebKit::WebContentProcessMainDelegate>(int, char**)
/Volumes/Data/slave/mountainlion-debug/build/Tools/TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm:57: Failure
Value of: [[view hitTest:pointInsideSelection] acceptsFirstMouse:mouseEventInsideSelection]
  Actual: false
Expected: true
[  FAILED  ] AcceptsFirstMouse.WebKit2 (2626 ms)
[----------] 1 test from AcceptsFirstMouse (2626 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2626 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] AcceptsFirstMouse.WebKit2

 1 FAILED TEST
  YOU HAVE 5 DISABLED TESTS


Tests that failed:
  AcceptsFirstMouse.WebKit2
Tests that timed out:
  WebKit2.NewFirstVisuallyNonEmptyLayoutFrames
  WebKit2.ResizeReversePaginatedWebView
  WebKit2.ScrollByLineCommands
  WebKit2.ScrollPinningBehaviors
  WebKit2.SpacebarScrolling


<http://build.webkit.org/builders/Apple%20MountainLion%20Debug%20WK1%20%28Tests%29/builds/14043/steps/run-api-tests/logs/stdio>
Comment 1 David Kilzer (:ddkilzer) 2014-05-20 07:26:30 PDT
This regression occurred when run-api-tests was broken on Mountain Lion due to Bug 132954, which caused breakage starting in r169042 until it was fixed in r169078.
Comment 2 David Kilzer (:ddkilzer) 2014-05-20 07:34:28 PDT
http://trac.webkit.org/log/trunk/?rev=169078&stop_rev=169041
Comment 3 David Kilzer (:ddkilzer) 2014-05-20 07:41:39 PDT
Looks like a regression from r169065:

Bug 133077: Scrollbars display incorrectly after switching between fast and slow scrolling mode, affects Find and real sites
​<https://bugs.webkit.org/show_bug.cgi?id=133077>
<rdar://problem/16888608>
<http://trac.webkit.org/changeset/169065>

Beth, should the call to -setPresentationValue: not be called on Mountain Lion, or does NSRegularLegacyScrollerImp need a stub method implemented that does nothing?
Comment 4 Beth Dakin 2014-05-20 11:20:49 PDT
(In reply to comment #3)
> Looks like a regression from r169065:
> 
> Bug 133077: Scrollbars display incorrectly after switching between fast and slow scrolling mode, affects Find and real sites
> ​<https://bugs.webkit.org/show_bug.cgi?id=133077>
> <rdar://problem/16888608>
> <http://trac.webkit.org/changeset/169065>
> 
> Beth, should the call to -setPresentationValue: not be called on Mountain Lion, or does NSRegularLegacyScrollerImp need a stub method implemented that does nothing?

I think we should just not call it for Mountain Lion. I can post a patch shortly.
Comment 5 Beth Dakin 2014-05-20 11:47:07 PDT
Created attachment 231779 [details]
Patch
Comment 6 Beth Dakin 2014-05-20 11:59:05 PDT
Created attachment 231781 [details]
Patch

The other ifdef will work, but this one is better and it matches the ifdef in Scrollbar::supportsUpdateOnSecondaryThread().
Comment 7 Beth Dakin 2014-05-20 12:32:03 PDT
Thanks Tim! http://trac.webkit.org/changeset/169124