Bug 105096 - Assertion in repaintRect optimization in updateLayerPositionsAfterScroll
Summary: Assertion in repaintRect optimization in updateLayerPositionsAfterScroll
Status: RESOLVED DUPLICATE of bug 103432
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 103747
  Show dependency treegraph
 
Reported: 2012-12-15 10:52 PST by Jonathan Liu
Modified: 2013-01-29 17:15 PST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Liu 2012-12-15 10:52:33 PST
Running the Qt 5 fancybrowser example debug build, opening https://groups.google.com/forum/?fromgroups=#!topic/webgl-dev-list/mPwx3jUGCPg and then scrolling using the mouse wheel results in a crash:

warning: ASSERTION FAILED: m_repaintRect == renderer()->clippedOverflowRectForRe
paint(renderer()->containerForRepaint())

warning: rendering\RenderLayer.cpp(554) : void WebCore::RenderLayer::updateLayer
PositionsAfterScroll(WebCore::RenderGeometryMap*, WebCore::RenderLayer::UpdateLa
yerPositionsAfterScrollFlags)
Comment 1 Antonio Gomes 2012-12-15 11:41:17 PST
This is not Qt specific though. i am able to hit it with EFL scrolling with mouae wheel as well.
Comment 2 Allan Sandfeld Jensen 2013-01-07 07:34:28 PST
Longer backtrace:

0x00007ffff50cf88e in WebCore::RenderLayer::updateLayerPositionsAfterScroll (this=0x32476b8, geometryMap=0x7fffffffb880, flags=13) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:759
759             ASSERT(m_repaintRect == renderer()->clippedOverflowRectForRepaint(renderer()->containerForRepaint()));
(gdb) 
(gdb) bt
#0  0x00007ffff50cf88e in WebCore::RenderLayer::updateLayerPositionsAfterScroll (this=0x32476b8, geometryMap=0x7fffffffb880, flags=13) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:759
#1  0x00007ffff50cf95f in WebCore::RenderLayer::updateLayerPositionsAfterScroll (this=0x26a5498, geometryMap=0x7fffffffb880, flags=13) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:764
#2  0x00007ffff50cf95f in WebCore::RenderLayer::updateLayerPositionsAfterScroll (this=0x325fc58, geometryMap=0x7fffffffb880, flags=13) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:764
#3  0x00007ffff50cf95f in WebCore::RenderLayer::updateLayerPositionsAfterScroll (this=0x26b7358, geometryMap=0x7fffffffb880, flags=13) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:764
#4  0x00007ffff50cf95f in WebCore::RenderLayer::updateLayerPositionsAfterScroll (this=0x26b7c98, geometryMap=0x7fffffffb880, flags=5) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:764
#5  0x00007ffff50cf68c in WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll (this=0x26b7c98) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:722
#6  0x00007ffff50d4a72 in WebCore::RenderLayer::scrollTo (this=0x26b7c98, x=0, y=60) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:2049
#7  0x00007ffff50d744b in WebCore::RenderLayer::setScrollOffset (this=0x26b7c98, offset=...) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:2387
#8  0x00007ffff4f3691c in WebCore::ScrollableArea::scrollPositionChanged (this=0x26b7c98, position=...) at /src/webkit/Source/WebCore/platform/ScrollableArea.cpp:154
#9  0x00007ffff4f36bb7 in WebCore::ScrollableArea::setScrollOffsetFromAnimation (this=0x26b7c98, offset=...) at /src/webkit/Source/WebCore/platform/ScrollableArea.cpp:199
#10 0x00007ffff4f38805 in WebCore::ScrollAnimator::notifyPositionChanged (this=0x32a4950) at /src/webkit/Source/WebCore/platform/ScrollAnimator.cpp:144
#11 0x00007ffff4f3816d in WebCore::ScrollAnimator::scroll (this=0x32a4950, orientation=WebCore::VerticalScrollbar, step=1, multiplier=60) at /src/webkit/Source/WebCore/platform/ScrollAnimator.cpp:70
#12 0x00007ffff4f36758 in WebCore::ScrollableArea::scroll (this=0x26b7c98, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60) at /src/webkit/Source/WebCore/platform/ScrollableArea.cpp:124
#13 0x00007ffff50dc3d8 in WebCore::RenderLayer::scroll (this=0x26b7c98, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60) at /src/webkit/Source/WebCore/rendering/RenderLayer.cpp:3305
#14 0x00007ffff504a076 in WebCore::RenderBox::scroll (this=0x26b7bc8, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:613
#15 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x26b7288, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#16 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x26b75e8, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#17 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x325f638, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#18 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x325f9f8, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#19 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x32600c8, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#20 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x26a6618, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#21 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x323a1b8, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#22 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x3299688, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#23 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x3284c68, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#24 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x3285b58, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#25 0x00007ffff504a163 in WebCore::RenderBox::scroll (this=0x3285df8, direction=WebCore::ScrollDown, granularity=WebCore::ScrollByPixel, multiplier=60, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/rendering/RenderBox.cpp:624
#26 0x00007ffff4ddb2ff in WebCore::scrollNode (delta=-60, granularity=WebCore::ScrollByPixel, positiveDirection=WebCore::ScrollUp, negativeDirection=WebCore::ScrollDown, node=0x2cec270, stopNode=0x7fffffffc3c0) at /src/webkit/Source/WebCore/page/EventHandler.cpp:276
#27 0x00007ffff4de3d76 in WebCore::EventHandler::defaultWheelEventHandler (this=0x5e0528, startNode=0x2cec270, wheelEvent=0x39939d0) at /src/webkit/Source/WebCore/page/EventHandler.cpp:2374
#28 0x00007ffff496b079 in WebCore::Node::defaultEventHandler (this=0x2cec270, event=0x39939d0) at /src/webkit/Source/WebCore/dom/Node.cpp:2492
#29 0x00007ffff493237a in WebCore::EventDispatcher::dispatchEventPostProcess (this=0x7fffffffc660, event=..., preDispatchEventHandlerResult=0x0) at /src/webkit/Source/WebCore/dom/EventDispatcher.cpp:354
#30 0x00007ffff4931d50 in WebCore::EventDispatcher::dispatchEvent (this=0x7fffffffc660, prpEvent=...) at /src/webkit/Source/WebCore/dom/EventDispatcher.cpp:269
#31 0x00007ffff492f974 in WebCore::EventDispatchMediator::dispatchEvent (this=0x2198450, dispatcher=0x7fffffffc660) at /src/webkit/Source/WebCore/dom/EventDispatchMediator.cpp:52
#32 0x00007ffff49cb646 in WebCore::WheelEventDispatchMediator::dispatchEvent (this=0x2198450, dispatcher=0x7fffffffc660) at /src/webkit/Source/WebCore/dom/WheelEvent.cpp:132
#33 0x00007ffff4930b61 in WebCore::EventDispatcher::dispatchEvent (node=0x2cec270, mediator=...) at /src/webkit/Source/WebCore/dom/EventDispatcher.cpp:135
#34 0x00007ffff496aa4a in WebCore::Node::dispatchWheelEvent (this=0x2cec270, event=...) at /src/webkit/Source/WebCore/dom/Node.cpp:2407
#35 0x00007ffff4de3c19 in WebCore::EventHandler::handleWheelEvent (this=0x5e0528, e=...) at /src/webkit/Source/WebCore/page/EventHandler.cpp:2348
Comment 3 Allan Sandfeld Jensen 2013-01-07 10:07:41 PST
It turns out m_canSkipRepaintRectsUpdateOnScroll is set to true (because the renderer is a table cell), which is why the rects are not recalculated. The repaint rect however do change on the scroll, so m_canSkipRepaintRectsUpdateOnScroll seems to be falsely set here.

The assertion was recently introduced in r135746, but an incorrect m_canSkipRepaintRectsUpdateOnScroll seems to have just been ignore before then. Simon what are you hoping to catch with this assertion, and any idea how a table cell could end up breaking the cached repaint rect?
Comment 4 Simon Fraser (smfr) 2013-01-07 10:44:12 PST
(In reply to comment #3)
> It turns out m_canSkipRepaintRectsUpdateOnScroll is set to true (because the renderer is a table cell), which is why the rects are not recalculated. The repaint rect however do change on the scroll, so m_canSkipRepaintRectsUpdateOnScroll seems to be falsely set here.
> 
> The assertion was recently introduced in r135746, but an incorrect m_canSkipRepaintRectsUpdateOnScroll seems to have just been ignore before then. Simon what are you hoping to catch with this assertion, and any idea how a table cell could end up breaking the cached repaint rect?

The assertion was to catch instances where the cached repaint rect is wrong, even though we expect it to be correct. This could have happened before my change that added the assertion.
Comment 5 Simon Fraser (smfr) 2013-01-29 16:11:35 PST
The google groups example seems to be asserting because of the m_canSkipRepaintRectsUpdateOnScroll logic that Julien added.
Comment 6 Simon Fraser (smfr) 2013-01-29 16:14:11 PST
... for bug 71550.
Comment 7 Simon Fraser (smfr) 2013-01-29 17:15:14 PST

*** This bug has been marked as a duplicate of bug 103432 ***