[regression] pinch to zoom not working reliably

Bug #1531517 reported by Bill Filler
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
kevin gunn
Mir
Fix Released
Critical
Andreas Pokorny
0.18
Fix Released
Critical
Andreas Pokorny
mir (Ubuntu)
Fix Released
Critical
Andreas Pokorny
qtmir (Ubuntu)
Won't Fix
High
Daniel d'Andrada

Bug Description

in the last few days (using rc-proposed 221 on krillin) pinch to zoom gestures do not work reliably anymore.

Appears to be system wide as there have been reports in the follow apps that all use PinchArea from QML:

- Camera: pinch to zoom in viewfinder stops working, pinch to zoom in Photo Roll to zoom a photo stops working
- Gallery: open a photo and pinch to zoom doesn't work
- Webbrowser: pinch to zoom on a web page not working

Could be mir/qtmir related

Related branches

Bill Filler (bfiller)
Changed in qtmir (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
importance: Undecided → High
Changed in canonical-devices-system-image:
milestone: none → ww02-2016
assignee: nobody → kevin gunn (kgunn72)
importance: Undecided → High
tags: added: regression-proposed
Gerry Boland (gerboland)
Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in canonical-devices-system-image:
status: New → Confirmed
Revision history for this message
Gerry Boland (gerboland) wrote :

<bfiller> greyback: easiest way for me to repro is to open a picture in camera photo roll then pinch to zoom and unzoom, double tapping also gets it into the state, usually first time it works then not after that

Revision history for this message
Gerry Boland (gerboland) wrote :

In my testing it does appear the pinch gesture is failing to be recognized more frequently than before. In camera photo roll, if I zoom in, then try to zoom out immediately, often that zoom-out fails.

Revision history for this message
Gerry Boland (gerboland) wrote :

Bug more pronounced on Bq than Mako

Changed in qtmir (Ubuntu):
assignee: Gerry Boland (gerboland) → Daniel d'Andrada (dandrader)
status: Confirmed → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Might be related to bug 1530940

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

I can pinch to zoom just fine on my Nexus 7 (r330, flashed today). Trying on krillin...

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

It's horrible in krillin indeed.
And not so great in the Nexus 7 actually. There's a stark difference compared to doing a pinch to zoom on my touchscreen Xenial laptop running gallery-app. Which points to something in qtbuntu, qtmir or mir (or a combination of those).

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Interesting that if you lay a finger, wait a second, then drag with a second finger you always succeed.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

And then, in that same touchscreen laptop, running gallery-app in a unity8-mir session yields a bad pinch-to-zoom experience.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

From the attachment you can see that mir giving a bogus event stream.
When you lay two fingers on the screen at roughly the same time (like when doing a pinch gesture) it's common for mir to not generate or send the "down" event for the first touch point.

qtmir has a basic event stream sanity check and validation. It detects this problem and transforms the action=change for the first touch event with id=0 into a action=down instead. But then we end up with an input event with *two* pressed touch points, which at least makes sense but I think Qt does not like that. It probably expects a single touch up/down per event, like android. I could make qtmir's event stream validator more sophisticated and have it split those two touch down actions into two separate input events, but mir should really send us a clean event stream in the first place.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

My guess is that this regression is related to mir changing from android-input to libinput.

Changed in qtmir (Ubuntu):
status: In Progress → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mir (Ubuntu):
status: New → Confirmed
Revision history for this message
dinamic (dinamic6661) wrote :

same on MX4 rc-proposed

Changed in mir:
importance: Undecided → High
status: New → Confirmed
Changed in mir (Ubuntu):
importance: Undecided → High
Changed in mir:
milestone: none → 0.19.0
summary: - pinch to zoom not working reliably
+ [regression] pinch to zoom not working reliably
tags: added: regression
tags: added: input
kevin gunn (kgunn72)
Changed in mir:
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Changed in mir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

dandrader:
It's been a useful quirk of Android input until now that multi-touch gestures get separate events for each finger, but I think we all need to ensure our client code does not assume that's always true.

It wasn't a design choice of Mir's, but just something we inherited from Android. There's a good argument that Mir's semantics should not change, because it annoys people obviously. On the other hand it would be difficult to keep all the quirks of Android input in the transition to libinput. And I think the semantics of receiving a single event where two fingers go down at once is perfectly valid. We should all be writing client code that expects that might happen.

kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
importance: High → Critical
Changed in mir:
importance: High → Critical
Changed in mir (Ubuntu):
importance: High → Critical
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Re: [Bug 1531517] Re: [regression] pinch to zoom not working reliably

On 12/01/2016 05:39, Daniel van Vugt wrote:
> dandrader:
> It's been a useful quirk of Android input until now that multi-touch gestures get separate events for each finger, but I think we all need to ensure our client code does not assume that's always true.
>
> It wasn't a design choice of Mir's, but just something we inherited from
> Android. There's a good argument that Mir's semantics should not change,
> because it annoys people obviously. On the other hand it would be
> difficult to keep all the quirks of Android input in the transition to
> libinput. And I think the semantics of receiving a single event where
> two fingers go down at once is perfectly valid. We should all be writing
> client code that expects that might happen.
>

If you read my message carefully you will see that Mir is not even doing
that (two fingers down on the same event). It was qtmir that was mending
the event stream to do so. Mir was completely missing the down event for
the first touch. So all of the blue you got a "touch 1 move + touch 2
down" (no touch 1 down beforehand).

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

Ah yes the android input transport is biting us again. We are still bound to the limitation of that encoding. That encoding means - only one down/up touch id per event. No matter what libinput reads or qtmir sanitizes.. , as long as the transport from server to nested server or from nested server to client chops of the information of every additional down or up the gesture will break. I will keep the fix close to the encoding so we can get rid of it easier...

Changed in canonical-devices-system-image:
status: Confirmed → In Progress
kevin gunn (kgunn72)
Changed in mir:
status: Confirmed → In Progress
Changed in mir (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.19.0

Changed in mir:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.18.1+16.04.20160115-0ubuntu1

---------------
mir (0.18.1+16.04.20160115-0ubuntu1) xenial; urgency=medium

  [ Andreas Pokorny ]
  * New upstream release 0.18.1 (https://launchpad.net/mir/+milestone/0.18.1)
    - No ABI changes. Bug fix release only.
    - Bug fixed:
      . [regression] pinch to zoom not working reliably (LP: #1531517)

  [ CI Train Bot ]
  * No-change rebuild.

 -- kevin gunn <email address hidden> Fri, 15 Jan 2016 11:45:05 +0000

Changed in mir (Ubuntu):
status: In Progress → Fix Released
kevin gunn (kgunn72)
Changed in mir:
status: Fix Committed → Fix Released
Changed in mir:
status: Fix Released → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.