Mir

Merge lp:~mir-team/mir/reduce-event-pedantism-for-1437357 into lp:mir

Proposed by Robert Carr
Status: Merged
Approved by: Cemil Azizoglu
Approved revision: no longer in the source branch.
Merged at revision: 2588
Proposed branch: lp:~mir-team/mir/reduce-event-pedantism-for-1437357
Merge into: lp:mir
Diff against target: 22 lines (+4/-1)
1 file modified
src/client/events/event_builders.cpp (+4/-1)
To merge this branch: bzr merge lp:~mir-team/mir/reduce-event-pedantism-for-1437357
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Alan Griffiths Needs Information
Alexandros Frantzis (community) Approve
Alberto Aguirre (community) Approve
Chris Halse Rogers Approve
Review via email: mp+259448@code.launchpad.net

Commit message

It seems it's not reasonable for us to throw an exception here. Android-input doesn't meet it's invariants (it promises it will deliver consistent touches with one touch going up and down at a time). However it seems the variations in the touch stream documented in 1437357 have always been present and a fix is unclear. Therefore removing this exception seems safe (behavior should revert to the previous behavior where we didn't observe any errors) and will reduce the crash.

Description of the change

It seems it's not reasonable for us to throw an exception here. Android-input doesn't meet it's invariants (it promises it will deliver consistent touches with one touch going up and down at a time). However it seems the variations in the touch stream documented in 1437357 have always been present and a fix is unclear. Therefore removing this exception seems safe (behavior should revert to the previous behavior where we didn't observe any errors) and will reduce the crash.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote :

Seems reasonable. How spammy is this log message? I guess not very frequent, as otherwise clients on the relevant devices would die almost immediately?

review: Approve
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

OK.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

OK. I assume our new input stack will not have this problem?

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Where does the problem originate? In our "adopted" input code or outside our control?

I think "error" is an overreaction and "warning" would be better as it doesn't threaten functionality. (Especially if the cause is outside our control.)

review: Needs Information
Revision history for this message
Robert Carr (robertcarr) wrote :

>> Where does the problem originate? In our "adopted" input code or outside our control?
>>
>> I think "error" is an overreaction and "warning" would be better as it doesn't threaten
>> functionality. (Especially if the cause is outside our control.)

I'm not entirely sure yet. It seems the problem can both originate from a broken kernel event stream, or from bugs which cause the InputReader to malform what should have been a functioning input stream...thus I'm not inclined to say it's out of our control.

It actually does threaten functionality...if multiple up downs are encoded in one event the android action masking format will end up erasing some of the actions...I guess this would result in "quirky touch" depending on how valid an input stream the client requires. On the other hand this was apparently always happening and touch has been working pretty well though QtMir had to have a validator of course.

Revision history for this message
Kevin DuBois (kdub) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/events/event_builders.cpp'
2--- src/client/events/event_builders.cpp 2015-05-19 14:02:31 +0000
3+++ src/client/events/event_builders.cpp 2015-05-20 14:31:33 +0000
4@@ -16,6 +16,9 @@
5 * Author: Robert Carr <robert.carr@canonical.com>
6 */
7
8+#define MIR_LOG_COMPONENT "event-builders"
9+
10+#include "mir/log.h"
11 #include "mir/events/event_builders.h"
12 #include "mir/events/event_private.h"
13
14@@ -188,7 +191,7 @@
15
16 if (mev.action != mir_motion_action_move && new_mask != mir_motion_action_move)
17 {
18- BOOST_THROW_EXCEPTION(std::logic_error("Only one touch up/down may be reported per event"));
19+ mir::log_error("Only one touch up/down should be reported per event");
20 }
21 if (new_mask == mir_motion_action_move)
22 return;

Subscribers

People subscribed via source and target branches