New issue
Advanced search Search tips

Issue 653327 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

DCHECK firing in ScrollManager: startNode.layoutObject()

Project Member Reported by skobes@chromium.org, Oct 5 2016

Issue description

Loading attached file with debug build of content_shell on Linux prints:

[1:1:1005/164618:33897571481:FATAL:ScrollManager.cpp(84)] Check failed: startNode.layoutObject(). 
#0 0x7f30c56aeb1e base::debug::StackTrace::StackTrace()
#1 0x7f30c571c95f logging::LogMessage::~LogMessage()
#2 0x7f30bd751958 blink::ScrollManager::recomputeScrollChain()
#3 0x7f30bd752112 blink::ScrollManager::customizedScroll()
#4 0x7f30bd753070 blink::ScrollManager::handleGestureScrollEnd()
#5 0x7f30bd7535c2 blink::ScrollManager::handleGestureScrollEvent()
#6 0x7f30bd733732 blink::EventHandler::handleGestureScrollEvent()
#7 0x7f30bff38038 blink::WebViewImpl::handleGestureEvent()
#8 0x7f30bfe4fc17 blink::PageWidgetDelegate::handleInputEvent()
#9 0x7f30bff39dbd blink::WebViewImpl::handleInputEvent()
#10 0x7f30bff33a4c blink::WebViewFrameWidget::handleInputEvent()
...
 
dialog.html
1.0 KB View Download

Comment 1 by bokan@chromium.org, Oct 6 2016

Cc: -bokan@chromium.org
Labels: Hotlist-Input-Dev
Owner: bokan@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks, I'll take a look

Comment 2 by bokan@chromium.org, Oct 6 2016

There's a few things going on here.

The page blocks on external imports being loaded before doing layout/style so we haven't built the layout tree when the scrolls come in so that's why the DCHECK is firing here. This would normally be ok since the LayoutView should be available on the documentNode but we're actually trying to scroll the HTML element which doesn't yet have a LayoutObject. I think the reason we try to scroll HTML rather than #document is because of some ViewportScrollCallback special-cases where we fall back to documentElement (since it can have an applyScroll). We're missing a short-circuit in the case documentElement doesn't have a LayoutObject. I'll add that.

More worryingly, it seems that we never get a GestureScrollBegin here. CC sees a ScrollBegin but Blink doesn't but the following ScrollUpdate and ScrollEnds are forwarded to Blink. This seems like a problem to me. Dave/Tim, is there a reason for this or is this a routing bug?

Comment 3 by bokan@chromium.org, Oct 6 2016

PS, to repro you need to actually scroll while the page is loading. Once the scrollbar shows up scrolling works just fine.

Comment 4 by bokan@chromium.org, Oct 6 2016

Additionally, in Blink, when we get a ScrollUpdate/End and don't yet have a target we go and do a hit test. That seems error prone to me. Now that we have wheel gestures, is there a reason we shouldn't limit hit testing to ScrollBegin?

Comment 5 by bokan@chromium.org, Oct 7 2016

Status: Started (was: Assigned)

Comment 7 by bokan@chromium.org, Oct 12 2016

Cc: dtapu...@chromium.org tdres...@chromium.org
And I'm wondering why no one's responding to my questions :) +Dave/Tim, see comments 2-4.
It is possible looking at the code that the gesture scroll begin is handled by the compositor but then when it goes to handled the gesture scroll update ScrollAnimated returns it can't handle it. https://cs.chromium.org/chromium/src/ui/events/blink/input_handler_proxy.cc?q=Input_handler_proxy.cc&sq=package:chromium&l=675

And then it could fall into the did_not_handle which will end up sending it to the main thread.

I agree a GSU without a GSB is odd since the GSB should do the hit test.

Comment 9 by bokan@chromium.org, Oct 12 2016

Status: Fixed (was: Started)
Ok, I've filed a new bug under Hotlist-CodeHealth ( issue 655143 ) to make sure GSUs are always framed by a GSB and GSE and to make sure we hit test only on GSB. The DCHECK in this bug should be fixed by the patch above.
Thanks for the quick fix :)

Sign in to add a comment