Closed Bug 1697756 Opened 3 years ago Closed 3 years ago

Assertion failure: updateLastScale, at widget/windows/DirectManipulationOwner.cpp:354

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(1 file)

No description provided.
See Also: → 1697091
Blocks: 1630912
Summary: Assertion failure: updateLastScale, at c:/mozilla/src/widget/windows/DirectManipulationOwner.cpp:354 → Assertion failure: updateLastScale, at widget/windows/DirectManipulationOwner.cpp:354

I'm not sure if the weird dmanip behaviour coming from the OS is new (because we have a new bug (bug 1697091) that seems like dmanip has changed what it sends us sometimes), or has always existed. But it seems like a good idea to make the code robust against this.

We can hit this assert in the following way. It seems as though dmanip decides after the first few OnContentUpdate calls if it is processing a pinch or a pan (because we can get a scale that is slightly different from 1 on the first OnContentUpdated call, but after that point never changes at all while the offset is changing fluidly) and if it decides it is a pan then it locks the scale to whatever it's last value was. So if we get a scale that is very close to 1 but not fuzzy equal to 1 on the first OnContentUpdated call we will decide that we are processing a pinch, but dmanip can then decide that it's processing a pan. Once the user lifts their finger dmanip will inform us via OnViewportStatusChanged that it is now in inertia mode, it is allowed to go into inertia for pans but not pinches because we pass DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA but not DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA when we create dmanip here https://searchfox.org/mozilla-central/rev/87a8afd9f57ee4bc542ba0ec3f96a891042b6db7/widget/windows/DirectManipulationOwner.cpp#554 And then dmanip can go straight from inertia to running, this causes us to start a new pinch because our current scale is not fuzzy equal to 1. But also, the current scale has not changed, so it is equal to our last scale, so we have no scale change to send in the pinch start event.

Here is example logging of it happening:

OnInteraction begin
OnViewportStatusChanged RUNNING
OnInteraction type manip
OnContentUpdated scale 0.999979 offsets 0.000000 -48.979168
TransitionToState pinching
OnContentUpdated scale 0.999979 offsets 0.000000 -289.606750
OnContentUpdated scale 0.999979 offsets 0.000000 -482.539948
OnContentUpdated scale 0.999979 offsets 0.000000 -683.334961
OnContentUpdated scale 0.999979 offsets 0.000000 -879.667847
OnContentUpdated scale 0.999979 offsets 0.000000 -1154.831421
OnViewportStatusChanged INERTIA
OnContentUpdated scale 0.999979 offsets 0.000000 -1154.906128
OnContentUpdated scale 0.999979 offsets 0.000000 -1155.755615
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.113037
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.375854
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.582153
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.761841
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.917236
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.057861
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.183228
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.296387
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.403076
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.499146
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.589966
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.674927
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.754517
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.829590
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.901367
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.967529
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.033936
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.091309
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.148804
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.203369
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.256104
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.305298
OnViewportStatusChanged RUNNING
TransitionToState none
OnContentUpdated scale 0.999979 offsets 0.000000 -1147.936279
TransitionToState pinching
Assertion failure: updateLastScale, at widget/windows/DirectManipulationOwner.cpp:354

Example log:

OnInteraction begin
OnViewportStatusChanged RUNNING
OnInteraction type manip
OnContentUpdated scale 0.999979 offsets 0.000000 -48.979168
TransitionToState pinching
OnContentUpdated scale 0.999979 offsets 0.000000 -289.606750
OnContentUpdated scale 0.999979 offsets 0.000000 -482.539948
OnContentUpdated scale 0.999979 offsets 0.000000 -683.334961
OnContentUpdated scale 0.999979 offsets 0.000000 -879.667847
OnContentUpdated scale 0.999979 offsets 0.000000 -1154.831421
OnViewportStatusChanged INERTIA
OnContentUpdated scale 0.999979 offsets 0.000000 -1154.906128
OnContentUpdated scale 0.999979 offsets 0.000000 -1155.755615
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.113037
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.375854
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.582153
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.761841
OnContentUpdated scale 0.999979 offsets 0.000000 -1156.917236
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.057861
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.183228
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.296387
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.403076
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.499146
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.589966
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.674927
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.754517
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.829590
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.901367
OnContentUpdated scale 0.999979 offsets 0.000000 -1157.967529
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.033936
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.091309
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.148804
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.203369
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.256104
OnContentUpdated scale 0.999979 offsets 0.000000 -1158.305298
OnViewportStatusChanged RUNNING
TransitionToState none
OnContentUpdated scale 0.999979 offsets 0.000000 -1147.936279
TransitionToState pinching
Assertion failure: updateLastScale, at widget/windows/DirectManipulationOwner.cpp:354

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1ba213dce36f
Restructure dmanip code so it's not possible to hit MOZ_ASSERT(updateLastScale) in DManipEventHandler::OnContentUpdated. r=botond
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: