Closed Bug 1348291 Opened 5 years ago Closed 5 years ago

Intermittent [@ mozilla::layers::RotatedContentBuffer::SetBufferProvider] | Assertion failure: !aClient || !mDTBuffer || !mDTBuffer->IsValid(), at /home/worker/workspace/build/src/gfx/layers/RotatedBuffer.h:342


(Core :: Graphics: Layers, defect)

Not set



Tracking Status
firefox52 --- wontfix
firefox-esr52 --- wontfix
firefox53 --- fixed
firefox54 --- fixed
firefox55 --- fixed


(Reporter: intermittent-bug-filer, Assigned: nical)


(Keywords: assertion, intermittent-failure)


(1 file)

Assertion failure: !aClient || !mDTBuffer || !mDTBuffer->IsValid(), at /home/worker/workspace/build/src/gfx/layers/RotatedBuffer.h:342
   NFO - #01: mozilla::layers::ContentClientRemoteBuffer::BeginPaint [mfbt/RefPtr.h:308]
[task 2017-03-16T21:32:50.982744Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.983839Z] 21:32:50     INFO - #02: mozilla::layers::ContentClientDoubleBuffered::BeginPaint [gfx/layers/client/ContentClient.cpp:538]
[task 2017-03-16T21:32:50.984591Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.984669Z] 21:32:50     INFO - #03: mozilla::layers::ClientPaintedLayer::PaintThebes [gfx/layers/client/ClientPaintedLayer.cpp:41]
[task 2017-03-16T21:32:50.985328Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.985404Z] 21:32:50     INFO - #04: mozilla::layers::ClientPaintedLayer::RenderLayerWithReadback [gfx/src/nsRegion.h:75]
[task 2017-03-16T21:32:50.986016Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.986675Z] 21:32:50     INFO - #05: mozilla::layers::ClientContainerLayer::RenderLayer [gfx/layers/client/ClientContainerLayer.h:57]
[task 2017-03-16T21:32:50.986722Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.987391Z] 21:32:50     INFO - #06: mozilla::layers::ClientLayerManager::EndTransactionInternal [gfx/layers/client/ClientLayerManager.cpp:358]
[task 2017-03-16T21:32:50.987440Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.988101Z] 21:32:50     INFO - #07: mozilla::layers::ClientLayerManager::EndTransaction [gfx/layers/client/ClientLayerManager.cpp:412]
[task 2017-03-16T21:32:50.988724Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.988793Z] 21:32:50     INFO - #08: nsDisplayList::PaintRoot [layout/painting/nsDisplayList.cpp:2256]
[task 2017-03-16T21:32:50.989404Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.989465Z] 21:32:50     INFO - #09: nsLayoutUtils::PaintFrame [mfbt/RefPtr.h:129]
[task 2017-03-16T21:32:50.990062Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.990128Z] 21:32:50     INFO - #10: mozilla::PresShell::Paint [layout/base/PresShell.cpp:6497]
[task 2017-03-16T21:32:50.990746Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.990813Z] 21:32:50     INFO - #11: nsViewManager::ProcessPendingUpdatesPaint [gfx/src/nsRegion.h:75]
[task 2017-03-16T21:32:50.991433Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.992671Z] 21:32:50     INFO - #12: nsViewManager::ProcessPendingUpdatesForView [view/nsViewManager.cpp:411]
[task 2017-03-16T21:32:50.993717Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.994931Z] 21:32:50     INFO - #13: nsViewManager::ProcessPendingUpdates [view/nsViewManager.cpp:1104]
[task 2017-03-16T21:32:50.995896Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.997019Z] 21:32:50     INFO - #14: nsRefreshDriver::Tick [layout/base/nsRefreshDriver.cpp:2031]
[task 2017-03-16T21:32:50.997987Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:50.999052Z] 21:32:50     INFO - #15: mozilla::RefreshDriverTimer::TickRefreshDrivers [layout/base/nsRefreshDriver.cpp:301]
[task 2017-03-16T21:32:50.999992Z] 21:32:50     INFO - 
[task 2017-03-16T21:32:51.001126Z] 21:32:51     INFO - #16: mozilla::RefreshDriverTimer::Tick [layout/base/nsRefreshDriver.cpp:323]
[task 2017-03-16T21:32:51.002061Z] 21:32:51     INFO - 
[task 2017-03-16T21:32:51.003168Z] 21:32:51     INFO - #17: mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver [layout/base/nsRefreshDriver.cpp:627]
[task 2017-03-16T21:32:51.004106Z] 21:32:51     INFO - 
[task 2017-03-16T21:32:51.005206Z] 21:32:51     INFO - #18: mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync [layout/base/nsRefreshDriver.cpp:529]
[task 2017-03-16T21:32:51.006161Z] 21:32:51     INFO - 
[task 2017-03-16T21:32:51.007289Z] 21:32:51     INFO - #19: mozilla::layout::VsyncChild::RecvNotify [layout/ipc/VsyncChild.cpp:67]
[task 2017-03-16T21:32:51.008233Z] 21:32:51     INFO - 
[task 2017-03-16T21:32:51.009319Z] 21:32:51     INFO - #20: mozilla::layout::PVsyncChild::OnMessageReceived [obj-firefox/ipc/ipdl/PVsyncChild.cpp:155]
[task 2017-03-16T21:32:51.010262Z] 21:32:51     INFO -
Keywords: assertion
matt, nical, could you take a look at this assertion failure. Thanks!
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(matt.woodrow)
This seems to indicate ContentClient::BeginPaint() was called during the previous frame but not ContentClient::EndPaint(). My guess is that we early-returned here without calling EndPaint.
Let's make sure EndPaint is called before returning.
Flags: needinfo?(nical.bugzilla)
Assignee: nobody → nical.bugzilla
Attachment #8850929 - Flags: review?(matt.woodrow)
Attachment #8850929 - Flags: review?(matt.woodrow) → review+
Pushed by
Call EndPaint when painting is skipped if BeginPaint was called. r=mattwoodrow
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
How far back does this bug go?
Flags: needinfo?(matt.woodrow) → needinfo?(nical.bugzilla)
The assertion was added in April 2016, while the code that can cause EndPaint to not be called looks like it's been written in April 2014. back then it might not have been an issue (to not call EndPaint), not sure, but in 2016 it certainly was, at least in the context of taking a snapshot of the page, since the assertion in bug 1262681.
Flags: needinfo?(nical.bugzilla)
This grafts cleanly to Aurora/Beta. Per IRC discussion with nical, it's not entirely clear what user impact this bug has, but it's also a low-risk fix.
Flags: needinfo?(nical.bugzilla)
Comment on attachment 8850929 [details] [diff] [review]
Call end paint if painting is skipped after calling BeginPaint.

Approval Request Comment
[Feature/Bug causing the regression]:
[User impact if declined]: Not sure, most likely bugs related to snapshots, see bug 1262681. This also causes intermittent assertion failures in debug builds.
[Is this code covered by automated tests?]: Not specifically, although automated tests do trip on the bug this is trying to fix intermittently.
[Has the fix been verified in Nightly?]: Landed without making waves, would require baking for a long while before we are 100% sure the intermittent issue is fixed.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: None.
[Is the change risky?]: Not risky.
[Why is the change risky/not risky?]: Very simple patch that makes sure we leave a function in a more consistent state.
[String changes made/needed]: None.
Flags: needinfo?(nical.bugzilla)
Attachment #8850929 - Flags: approval-mozilla-beta?
Attachment #8850929 - Flags: approval-mozilla-aurora?
Comment on attachment 8850929 [details] [diff] [review]
Call end paint if painting is skipped after calling BeginPaint.

Fixes a failing test, seems low risk, let's uplift to beta.
Attachment #8850929 - Flags: approval-mozilla-beta?
Attachment #8850929 - Flags: approval-mozilla-beta+
Attachment #8850929 - Flags: approval-mozilla-aurora?
Attachment #8850929 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.