Crash because uncaught exception in mir::events::add_touch
| Affects | Status | Importance | Assigned to | Milestone | ||
|---|---|---|---|---|---|---|
| | Canonical System Image |
Critical
|
kevin gunn | |||
| | Mir |
Fix Released
|
Critical
|
Robert Carr | ||
| | 0.13 |
Fix Released
|
Critical
|
Robert Carr | ||
| | mir (Ubuntu) |
Undecided
|
Unassigned | |||
| qtmir (Ubuntu) | ||||||
| | Vivid |
Undecided
|
Daniel d'Andrada | |||
Bug Description
Timo has a crash in which unity8 crashes because a throw exception in mir::events:
libmirclient8 0.12.1+
qtmir-android 0.4.4+15.
Related branches
- Gerry Boland: Approve on 2015-04-16
- PS Jenkins bot: Approve (continuous-integration) on 2015-04-16
-
Diff: 505 lines (+268/-46)7 files modifiedsrc/common/debughelpers.cpp (+47/-0)
src/common/debughelpers.h (+5/-1)
src/platforms/mirserver/CMakeLists.txt (+5/-3)
src/platforms/mirserver/qteventfeeder.cpp (+66/-23)
src/platforms/mirserver/qteventfeeder.h (+4/-1)
tests/mirserver/QtEventFeeder/mock_qtwindowsystem.h (+5/-0)
tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp (+136/-18)
- PS Jenkins bot: Approve (continuous-integration) on 2015-05-20
- Kevin DuBois (community): Approve on 2015-05-20
- Alan Griffiths: Needs Information on 2015-05-20
- Alexandros Frantzis (community): Approve on 2015-05-19
- Alberto Aguirre: Approve on 2015-05-19
- Chris Halse Rogers: Approve on 2015-05-19
-
Diff: 22 lines (+4/-1)1 file modifiedsrc/client/events/event_builders.cpp (+4/-1)
| Albert Astals Cid (aacid) wrote : | #1 |
| Changed in qtmir: | |
| assignee: | nobody → Daniel d'Andrada (dandrader) |
| status: | New → In Progress |
| Changed in qtmir: | |
| status: | In Progress → Fix Released |
| Changed in qtmir (Ubuntu Vivid): | |
| status: | New → Fix Released |
| Changed in canonical-devices-system-image: | |
| status: | New → Fix Released |
| Changed in canonical-devices-system-image: | |
| milestone: | none → ww22-2015 |
| Changed in canonical-devices-system-image: | |
| status: | Fix Released → In Progress |
| importance: | Undecided → High |
| assignee: | nobody → kevin gunn (kgunn72) |
| Daniel d'Andrada (dandrader) wrote : | #4 |
Look at this sequence of events:
Received MirTouchInputEvent(
(id=
(id=
(id=
(id=
(id=
Received MirTouchInputEvent(
(id=
(id=
(id=
(id=
This is unacceptable.
- Touch 608 disappeared from the touch stream without being released
- Touch 609 is released but then is moved in the next event!
You can get this info by adding his line to /usr/share/
initctl set-env QT_LOGGING_
| kevin gunn (kgunn72) wrote : | #5 |
marking this critical, as you can lay your entire hand on the device and get a reboot as reported in the now duped bug 1454711
| Changed in mir: | |
| assignee: | nobody → Robert Carr (robertcarr) |
| importance: | Undecided → Critical |
| Changed in canonical-devices-system-image: | |
| importance: | High → Critical |
| Robert Carr (robertcarr) wrote : | #6 |
I am investigating!
I have a few thoughts:
1. This exception probably should be caught in production (or maybe Mir should just be logging a warning here), this at least
would lead to just quirky behavior with high number of touches (it probably works pretty well...).
2. We should determine whether the kernel driver is outputting a valid stream.
In the case the kernel is outputting an invalid event stream 1 may be the best solution we can get for now. It may be possible to write an event stream validater/
If the kernel is outputting a valid event stream then there must be some problem in the Mir InputReader
| Robert Carr (robertcarr) wrote : | #7 |
15:28 < racarr> It's looking like https:/
15:28 < ubot5> Ubuntu bug 1437357 in Canonical System Image "Crash because uncaught exception in mir::events:
15:29 < racarr> maybe the messed up action mapping
15:29 < racarr> was causing the events to get malformed in the
15:29 < racarr> nested dispatcher?
15:29 < racarr> I dunno
15:29 < racarr> but I ran now
15:29 < racarr> mir server -> nested -> client
15:29 < racarr> (havnet built u8 yet)
15:29 < racarr> and uh
15:30 < racarr> I didn't validate the whole event stream but the crash doesnt occur and now the client is using mir::events:
15:30 < racarr> so either 1. The bug is fixed.
15:30 < racarr> 2. Qtmirs attempt to fix an invalid touch stream is making it more invalid causing the crash
| Robert Carr (robertcarr) wrote : | #8 |
I've confirmed some stuff.
1. The touch stream is invalid to Mir clients...though it seems QtMir is corrupting it further causing the crash (because as I mentioned, prefer-
2. The touch stream seems to be invalid out of the kernel
You can see two slots with ABS_MT_
[1431646178.314365] input: Received event time=1431646178
[1431646178.315485] input: Received event time=1431646178
[1431646178.315693] input: Received event time=1431646178
[1431646178.316354] input: Received event time=1431646178
[1431646178.316657] input: Received event time=1431646178
[1431646178.317064] input: Received event time=1431646178
[1431646178.317152] input: Received event time=1431646178
[1431646178.317992] input: Received event time=1431646178
[1431646178.318252] input: Received event time=1431646178
[1431646178.318603] input: Received event time=1431646178
[1431646178.318907] input: Received event time=1431646178
| Robert Carr (robertcarr) wrote : | #9 |
Err sorry had some confusion between the type A protocol and the type B protocol...so, yet to prove that the kernel stream is invalid :).
| tags: | added: input |
| Changed in mir: | |
| milestone: | none → 0.14.0 |
| status: | New → In Progress |
| Changed in mir: | |
| milestone: | 0.14.0 → 0.13.1 |
| affects: | mir → ubuntu-rtm |
| Changed in ubuntu-rtm: | |
| milestone: | 0.13.1 → none |
| affects: | ubuntu-rtm → mir |
| Changed in mir: | |
| milestone: | none → 0.13.1 |
| PS Jenkins bot (ps-jenkins) wrote : | #10 |
Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.14.0
| Changed in mir: | |
| status: | In Progress → Fix Committed |
| Daniel van Vugt (vanvugt) wrote : | #11 |
And fix committed to lp:mir/0.13 at revision 2542
| Changed in mir: | |
| milestone: | 0.13.1 → 0.14.0 |
| Changed in canonical-devices-system-image: | |
| status: | In Progress → Fix Released |
| Launchpad Janitor (janitor) wrote : | #12 |
This bug was fixed in the package mir - 0.13.1+
---------------
mir (0.13.1+
[ Cemil Azizoglu ]
* New upstream release 0.13.1 (https:/
- ABI summary: No ABI break. Servers and clients do not need rebuilding.
. Mirclient ABI unchanged at 8
. Mircommon ABI unchanged at 4
. Mirplatform ABI unchanged at 7
. Mirserver ABI unchanged at 31
- Bug fixes:
. Can't load app purchase UI without a U1 account (LP: #1450377)
. Crash because uncaught exception in mir::events:
-- CI Train Bot <email address hidden> Wed, 20 May 2015 21:20:15 +0000
| Changed in mir (Ubuntu): | |
| status: | New → Fix Released |
| Changed in mir: | |
| status: | Fix Committed → Fix Released |
| Changed in qtmir: | |
| status: | In Progress → Fix Released |
| Changed in qtmir (Ubuntu Vivid): | |
| assignee: | nobody → Daniel d'Andrada (dandrader) |
| no longer affects: | qtmir |

As bug 1454711 shows, it's still possible to make it crash like that if you rapidly tap with many fingers simultaneously on the screen.
You get that in unity8.log:
""" :exception_ detail: :clone_ impl<boost: :exception_ detail: :error_ info_injector< std::logic_ error> >'
qtmir.mir.input: Would move a touch that wasn't pressed before (id = 15 ). Making it press instead.
qtmir.mir.input: There's a touch (id = 14 ) missing. Releasing it.
qtmir.mir.input: There's a touch (id = 20 ) missing. Releasing it.
qtmir.mir.input: There's a touch (id = 26 ) missing. Releasing it.
qtmir.mir.input: There's a touch (id = 33 ) missing. Releasing it.
qtmir.mir.input: Would move a touch that wasn't pressed before (id = 36 ). Making it press instead.
qtmir.mir.input: There's a touch (id = 35 ) missing. Releasing it.
terminate called after throwing an instance of 'boost:
what(): Only one touch up/down may be reported per event
"""
So mir is sending incomplete touch streams and qtmir tries to clean them up (filling in the gaps) before dispatching those events to apps. But then it doesn't do such a very good job at it and mir complains, throwing an exception