Closed Bug 1676301 Opened 2 years ago Closed 2 years ago

Assertion failure: f && f->PresShell() && !f->PresShell()->IsResolutionUpdated(), at src/layout/base/nsLayoutUtils.cpp:771

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox83 --- wontfix
firefox84 --- wontfix
firefox85 --- fixed

People

(Reporter: tsmith, Assigned: tnikkel)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase, Whiteboard: [bugmon:confirmed])

Attachments

(2 files)

Attached file testcase.html

Assertion failure: f && f->PresShell() && !f->PresShell()->IsResolutionUpdated(), at src/layout/base/nsLayoutUtils.cpp:771

#0 0x7f8352d8f2cd in nsLayoutUtils::NotifyPaintSkipTransaction(unsigned long) src/layout/base/nsLayoutUtils.cpp:771:5
#1 0x7f834fb72598 in mozilla::layers::ClientLayerManager::EndTransactionInternal(void (*)(mozilla::layers::PaintedLayer*, gfxContext*, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, mozilla::layers::DrawRegionClip, mozilla::gfx::IntRegionTyped<mozilla::gfx::UnknownUnits> const&, void*), void*, mozilla::layers::LayerManager::EndTransactionFlags) src/gfx/layers/client/ClientLayerManager.cpp:353:7
#2 0x7f834fb73c98 in mozilla::layers::ClientLayerManager::EndEmptyTransaction(mozilla::layers::LayerManager::EndTransactionFlags) src/gfx/layers/client/ClientLayerManager.cpp:440:8
#3 0x7f8352d176a2 in mozilla::PresShell::Paint(nsView*, nsRegion const&, mozilla::PaintFlags) src/layout/base/PresShell.cpp:6298:25
#4 0x7f83529e733f in nsViewManager::ProcessPendingUpdatesPaint(nsIWidget*) src/view/nsViewManager.cpp:460:18
#5 0x7f83529e6e33 in nsViewManager::ProcessPendingUpdatesForView(nsView*, bool) src/view/nsViewManager.cpp:395:22
#6 0x7f83529e879f in nsViewManager::ProcessPendingUpdates() src/view/nsViewManager.cpp:1018:5
#7 0x7f8352cd6e31 in nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:2382:11
#8 0x7f8352cde231 in TickDriver src/layout/base/nsRefreshDriver.cpp:374:13
#9 0x7f8352cde231 in mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) src/layout/base/nsRefreshDriver.cpp:353:7
#10 0x7f8352cde11c in mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:368:5
#11 0x7f8352cdd6c8 in RunRefreshDrivers src/layout/base/nsRefreshDriver.cpp:829:5
#12 0x7f8352cdd6c8 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:747:16
#13 0x7f8352cdcfd0 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyParentProcessVsync() src/layout/base/nsRefreshDriver.cpp:649:7
#14 0x7f8352cdca49 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&) src/layout/base/nsRefreshDriver.cpp:570:9
#15 0x7f83530a19a7 in mozilla::layout::VsyncChild::RecvNotify(mozilla::VsyncEvent const&) src/layout/ipc/VsyncChild.cpp:55:16
#16 0x7f834f349e65 in mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PVsyncChild.cpp:187:54
#17 0x7f834f0fc2fd in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PBackgroundChild.cpp:6268:32
#18 0x7f834edba27e in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) src/ipc/glue/MessageChannel.cpp:2150:25
#19 0x7f834edb6a3f in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) src/ipc/glue/MessageChannel.cpp:2074:9
#20 0x7f834edb7e46 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) src/ipc/glue/MessageChannel.cpp:1922:3
#21 0x7f834edb8a6b in mozilla::ipc::MessageChannel::MessageTask::Run() src/ipc/glue/MessageChannel.cpp:1953:13
#22 0x7f834e4b98ef in mozilla::RunnableTask::Run() src/xpcom/threads/TaskController.cpp:450:16
#23 0x7f834e4b7f5a in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) src/xpcom/threads/TaskController.cpp:720:26
#24 0x7f834e4b7004 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) src/xpcom/threads/TaskController.cpp:579:15
#25 0x7f834e4b71b7 in mozilla::TaskController::ProcessPendingMTTask(bool) src/xpcom/threads/TaskController.cpp:373:36
#26 0x7f834e4bd1b9 in operator() src/xpcom/threads/TaskController.cpp:123:37
#27 0x7f834e4bd1b9 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_4>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:577:5
#28 0x7f834e4ce6c7 in nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1197:14
#29 0x7f834e4d440a in NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:513:10
#30 0x7f834edbfb14 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:109:5
#31 0x7f834ed31a53 in MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:334:10
#32 0x7f834ed3196d in RunHandler src/ipc/chromium/src/base/message_loop.cc:327:3
#33 0x7f834ed3196d in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:309:3
#34 0x7f8352a2d348 in nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:137:27
#35 0x7f8354234a83 in XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:913:20
#36 0x7f834edc0929 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:237:9
#37 0x7f834ed31a53 in MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:334:10
#38 0x7f834ed3196d in RunHandler src/ipc/chromium/src/base/message_loop.cc:327:3
#39 0x7f834ed3196d in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:309:3
#40 0x7f8354234668 in XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:744:34
#41 0x55644863ea27 in content_process_main src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28
#42 0x55644863ea27 in main src/browser/app/nsBrowserApp.cpp:304:18
Flags: in-testsuite?

A Pernosco session is available here: https://pernos.co/debug/DovRjzdCt5eP0GWGzPUi3Q/index.html

Bugmon Analysis:
Removing bugmon keyword as no further action possible.
Please review the bug and re-add the keyword for further analysis.

Keywords: bugmon
Whiteboard: [bugmon:confirmed]
Component: Graphics: Layers → Panning and Zooming

I looked at the pernosco session. There's a call to mozilla::PresShell::SetResolutionAndScaleTo (this=0x55a55dc62870, aResolution=1, aOrigin=mozilla::ResolutionChangeOrigin::MainThreadRestore) which sets the mResolutionUpdated flag but since the resolution is 1.0 I guess we can get away with a paint-skip transaction instead of a full transaction. And I don't totally understand the point of the assert but I'm thinking it's asserting that if the resolution changed we can't do a paint-skip transaction. So in this case the assert is wrong. Or maybe we should not set the flag when the resolution being set is 1.0 and there's no pre-existing resolution.

S4 since it's a debug-only assert and the production code seems to be fine.

Severity: -- → S4
Priority: -- → P3

FWIW the fuzzers do hit this issue somewhat frequently so it would be nice to get it out of the way.

We incorrectly set it when going from the mResolution.isNothing() to the *mResolution == 1.f case.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

I couldn't reproduce the assert with the testcase but this patch should fix it based on kats' description.

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fd892f351e9f
Only set mResolutionUpdated if we are changing the resolution. r=kats
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Flags: in-testsuite? → in-testsuite+

== Change summary for alert #27926 (as of Thu, 03 Dec 2020 04:42:11 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
11% sessionrestore sessionrestore macosx1014-64-shippable-qr e10s stylo webrender 1,323.47 -> 1,178.58
4% sessionrestore sessionrestore macosx1014-64-shippable-qr e10s stylo webrender 1,251.54 -> 1,204.42

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=27926

That's surprising. Are you sure about that?

Flags: needinfo?(aionescu)

No, the graph is pretty unstable, it is unclear where exactly the improvement popped in. Did some extra retriggers.

Flags: needinfo?(aionescu)
Flags: needinfo?(aionescu)

(In reply to Timothy Nikkel (:tnikkel) from comment #11)

That's surprising. Are you sure about that?

Got it. Bug 1667237 caused it.

Flags: needinfo?(aionescu)
You need to log in before you can comment on or make changes to this bug.