Closed Bug 1448513 Opened 2 years ago Closed Last year

Intermittent gfx/layers/apz/test/mochitest/test_group_touchevents.html | helper_basic_pan.html | check that the window scrolled - got 49, expected 50

Categories

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

x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox-esr60 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- fixed

People

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

References

Details

(Keywords: intermittent-failure, Whiteboard: [gfx-noted][stockwell fixed:product])

Attachments

(1 file, 1 obsolete file)

Filed by: rgurzau [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=169995324&repo=mozilla-central

https://queue.taskcluster.net/v1/task/DksFK17_RiiyRvME922WDg/runs/0/artifacts/public/logs/live_backing.log

23:32:11     INFO -  1582 INFO None1583 INFO TEST-START | gfx/layers/apz/test/mochitest/test_group_touchevents.html
23:32:11     INFO -  GECKO(1172) | ++DOMWINDOW == 26 (000001C505C3E800) [pid = 2868] [serial = 76] [outer = 000001C50372F400]
23:32:11     INFO -  GECKO(1172) | --DOCSHELL 000001C50536A800 == 4 [pid = 2868] [id = {f9001329-489f-40b1-915b-eaf1c47ccb0a}]
23:32:11     INFO -  GECKO(1172) | ++DOCSHELL 000001C5044B1800 == 5 [pid = 2868] [id = {a8d77b26-a693-4570-8c4e-7359c6bb5188}]
23:32:11     INFO -  GECKO(1172) | ++DOMWINDOW == 27 (000001C505C44C00) [pid = 2868] [serial = 77] [outer = 0000000000000000]
23:32:11     INFO -  GECKO(1172) | ++DOMWINDOW == 28 (000001C505C46400) [pid = 2868] [serial = 78] [outer = 000001C505C44C00]
23:32:11     INFO -  GECKO(1172) | ++DOMWINDOW == 29 (000001C505C45000) [pid = 2868] [serial = 79] [outer = 000001C505C44C00]
23:32:11     INFO -  GECKO(1172) | Parent process: flushed APZ repaints, waiting for callback...
23:32:11     INFO -  GECKO(1172) | [Child 2868, Main Thread] WARNING: Unable to find interface object on global: file z:/build/build/src/dom/base/nsGlobalWindowInner.cpp, line 2975
23:32:11     INFO -  GECKO(1172) | [Child 2868, Main Thread] WARNING: Unable to find interface object on global: file z:/build/build/src/dom/base/nsGlobalWindowInner.cpp, line 2975
23:32:12     INFO -  GECKO(1172) | Flushed APZ repaints, waiting for callback...
23:32:12     INFO -  GECKO(1172) | Finished native drag, waiting for transform-end observer...
23:32:12     INFO -  GECKO(1172) | Transform complete; flushing repaints...
23:32:12     INFO -  GECKO(1172) | Flushed APZ repaints, waiting for callback...
23:32:12     INFO -  TEST-INFO | started process screenshot
23:32:12     INFO -  TEST-INFO | screenshot: exit 0
23:32:12     INFO -  Buffered messages logged at 23:32:11
23:32:12     INFO -  1584 INFO TEST-PASS | gfx/layers/apz/test/mochitest/test_group_touchevents.html | Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)
23:32:12     INFO -  1585 INFO must wait for load
23:32:12     INFO -  Buffered messages finished
23:32:12    ERROR -  1586 INFO TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/mochitest/test_group_touchevents.html | helper_basic_pan.html | check that the window scrolled - got 49, expected 50
23:32:12     INFO -      SimpleTest.is@SimpleTest/SimpleTest.js:312:5
23:32:12     INFO -      spawnTest/w.is@gfx/layers/apz/test/mochitest/apz_test_utils.js:243:45
23:32:12     INFO -      checkScroll@gfx/layers/apz/test/mochitest/helper_basic_pan.html:25:3
23:32:12     INFO -      promise callback*flushApzRepaints@gfx/layers/apz/test/mochitest/apz_test_utils.js:138:3
23:32:12     INFO -      transformEnd@gfx/layers/apz/test/mochitest/helper_basic_pan.html:16:5
Component: Mochitest → Graphics: Layers
Product: Testing → Core
Version: Version 3 → unspecified
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Whiteboard: [gfx-noted]
Component: Graphics: Layers → Panning and Zooming
This seems to hit frequently with the test re-enabled on windows10-64-qr. I'll take a quick look.
Assignee: nobody → bugmail
There were 33 failures in the last 7 days, on Windows 10x64 asan (4 failures) and Windows 10x64 QR (29 failures).

Example failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=184084858&repo=mozilla-central&lineNumber=6478

02:56:19     INFO -  1144 INFO TEST-PASS | gfx/layers/apz/test/mochitest/test_group_touchevents.html | Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)
02:56:19     INFO -  1145 INFO must wait for load
02:56:19     INFO -  Buffered messages finished
02:56:19    ERROR -  1146 INFO TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/mochitest/test_group_touchevents.html | helper_basic_pan.html | check that the window scrolled - got 49, expected 50
02:56:19     INFO -      SimpleTest.is@SimpleTest/SimpleTest.js:312:5
02:56:19     INFO -      spawnTest/w.is@gfx/layers/apz/test/mochitest/apz_test_utils.js:254:45
02:56:19     INFO -      checkScroll@gfx/layers/apz/test/mochitest/helper_basic_pan.html:25:3
02:56:19     INFO -      setTimeout handler*repaintDone@gfx/layers/apz/test/mochitest/apz_test_utils.js:122:7
02:56:21     INFO -  GECKO(3604) | Parent process: flushed APZ repaints, waiting for callback...
02:56:21     INFO -  GECKO(3604) | Flushed APZ repaints, waiting for callback...
02:56:21     INFO -  GECKO(3604) | Finished native drag, waiting for transform-end observer...
02:56:21     INFO -  GECKO(3604) | Transform complete; flushing repaints...
02:56:21     INFO -  GECKO(3604) | Flushed APZ repaints, waiting for callback...
02:56:21     INFO -  1147 INFO TEST-PASS | gfx/layers/apz/test/mochitest/test_group_touchevents.html | helper_div_pan.html | check that the div scrolled
Whiteboard: [gfx-noted] → [gfx-noted] [stockwell needswork]
The problem here appears to be that the first touchmove is always consumed to overcome the touch start tolerance amount, regardless of how many pixels were in that touchmove. So if we get a sequence of touchevents like so:

touchstart (18, 108)
touchmove  (18, 105) <-- this is passed to [1]
touchmove  (18, 104) <-- this scrolls by 1 pixel
...
touchmove  (18, 57)  <-- this puts the scroll position at y=48

This is what is happening; we send touch events for 51 pixels (which is the desired 50, plus 1 to overcome the threshold). But the first few get squashed together and so in the end we scroll a few less pixels.

[1] https://searchfox.org/mozilla-central/rev/93d2b9860b3d341258c7c5dcd4e278dea544432b/gfx/layers/apz/src/AsyncPanZoomController.cpp#1305
Presumably this was only happening on windows because that's the only platform on which the touch events were getting squashed together. We do try to send the touch events into the OS so that it's more representative of actual user behaviour, and it could be that windows is more aggressive with the coalescing of events than other platforms.

Anyway, try push with my patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=288ead78f3fbc2df1ea1f28d8537855231b5fec8
Comment on attachment 8987182 [details]
Bug 1448513 - Only do the panThreshold check if the threshold is > 0.

https://reviewboard.mozilla.org/r/252428/#review258918

::: gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js:286
(Diff revision 1)
>  }
>  
> -// A handy constant when synthesizing native touch drag events with the pref
> -// "apz.touch_start_tolerance" set to 0. In this case, the first touchmove with
> -// a nonzero pixel movement is consumed by the APZ to transition from the
> -// "touching" state to the "panning" state, so calls to synthesizeNativeTouchDrag
> +// Note that when calling this function you'll want to make sure that the pref
> +// "apz.touch_start_tolerance" is set to 0, or some of the touchmove will get
> +// consumed to overcome the panning threshold.
> +function synthesizeNativeTouchDrag(aElement, aX, aY, aDeltaX, aDeltaY, aSlop, aObserver = null, aTouchId = 0) {

Whoops, this patch includes an aSlop argument which shouldn't be there... new patch coming in a sec.
Attachment #8987182 - Attachment is obsolete: true
Attachment #8987182 - Flags: review?(botond)
Comment on attachment 8987189 [details]
Bug 1448513 - Only do the panThreshold check if the threshold is > 0.

https://reviewboard.mozilla.org/r/252430/#review258954

Nice cleanup :)
Attachment #8987189 - Flags: review?(botond) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/580bc3d27e23
Only do the panThreshold check if the threshold is > 0. r=botond
https://hg.mozilla.org/mozilla-central/rev/580bc3d27e23
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
No longer blocks: 1446306
Duplicate of this bug: 1446306
Whiteboard: [gfx-noted] [stockwell needswork] → [gfx-noted][stockwell fixed:product]
You need to log in before you can comment on or make changes to this bug.