Mir

[regression] libmirclient crashes when calling mir_surface_set_event_handler() twice [InputTransport.cpp:110: android::InputChannel::InputChannel(const String8&, int): Assertion `false && "\"result != 0\""' failed.]

Bug #1438160 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Chris Halse Rogers
mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Calling mir_surface_set_event_handler() twice results in assertion failure and crash...

        mir_surface_set_event_handler(surf, &delegate);
        mir_surface_set_event_handler(surf, &delegate);

3rd_party/android-input/android/frameworks/base/services/input/InputTransport.cpp:110: android::InputChannel::InputChannel(const String8&, int): Assertion `false && "\"result != 0\""' failed.

Related branches

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks like it might be a regression from the Dispatcher stuff...

            auto input_dispatcher = input_platform->create_input_receiver(surface.fd(0),
                                                                          keymapper,
                                                                          handle_event_callback); <----- Crash
            input_thread = std::make_shared<md::SimpleDispatchThread>(input_dispatcher);

Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
status: In Progress → Triaged
assignee: Daniel van Vugt (vanvugt) → nobody
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I mean it crashes in create_input_receiver:

    auto input_dispatcher = input_platform->create_input_receiver(surface.fd(0), keymapper, handle_event_callback);
    input_thread = std::make_shared<md::SimpleDispatchThread>(input_dispatcher);

summary: - Calling mir_surface_set_event_handler() twice results in assertion
- failure, crash
+ libmirclient crashes when calling mir_surface_set_event_handler() twice
+ [InputTransport.cpp:110: android::InputChannel::InputChannel(const
+ String8&, int): Assertion `false && "\"result != 0\""' failed.]
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: libmirclient crashes when calling mir_surface_set_event_handler() twice [InputTransport.cpp:110: android::InputChannel::InputChannel(const String8&, int): Assertion `false && "\"result != 0\""' failed.]

Found it. The regression appeared in:

------------------------------------------------------------
revno: 2358 [merge]
author: Christopher James Halse Rogers <email address hidden>, Christopher James Halse Rogers <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Tue 2015-03-03 01:02:37 +0000
message:
  Provide a Dispatchable from the InputPlatform.

  We'll want to manually dispatch the input when clients get to do their own
  event dispatch.

  Approved by PS Jenkins bot, Kevin DuBois, Alexandros Frantzis, Andreas Pokorny, Robert Carr.
------------------------------------------------------------

summary: - libmirclient crashes when calling mir_surface_set_event_handler() twice
- [InputTransport.cpp:110: android::InputChannel::InputChannel(const
- String8&, int): Assertion `false && "\"result != 0\""' failed.]
+ [regression] libmirclient crashes when calling
+ mir_surface_set_event_handler() twice [InputTransport.cpp:110:
+ android::InputChannel::InputChannel(const String8&, int): Assertion
+ `false && "\"result != 0\""' failed.]
tags: added: regression
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bumped to High. Seems there is no simple workaround that clients can use.

Changed in mir:
importance: Medium → High
Changed in mir:
status: Triaged → In Progress
assignee: nobody → Chris Halse Rogers (raof)
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.13.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.13.1+15.10.20150520-0ubuntu1

---------------
mir (0.13.1+15.10.20150520-0ubuntu1) wily; urgency=medium

  [ Cemil Azizoglu ]
  * New upstream release 0.13.1 (https://launchpad.net/mir/+milestone/0.13.1)
    - 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::add_touch (LP: #1437357)

 -- CI Train Bot <email address hidden> Wed, 20 May 2015 21:20:15 +0000

Changed in mir (Ubuntu):
status: New → 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.