Actions aren't sending state over the bus

Bug #1348334 reported by Ken VanDine on 2014-07-24
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Indicator Location
Fix Released
High
Charles Kerr
location-service
Fix Released
High
Thomas Voß
platform-api
High
Thomas Voß
indicator-location (Ubuntu)
Undecided
Unassigned
location-service (Ubuntu)
Undecided
Unassigned
platform-api (Ubuntu)
Undecided
Unassigned

Bug Description

Trying to use QDBusActionGroup it toggle gps enabled in system-settings I found that the enabled state isn't being sent. Same is true when toggling from inside the indicator.

Related branches

Charles Kerr (charlesk) on 2014-07-24
Changed in indicator-location:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Charles Kerr (charlesk)
Charles Kerr (charlesk) on 2014-07-24
Changed in indicator-location:
status: Triaged → Confirmed
Charles Kerr (charlesk) wrote :

So, there are a couple of parts to this bug.

1. com.ubuntu.location.Service can't be started by DBus, so indicator-location's ua_location_service_controller_*() function calls are failing. This is what tvoss meant on Friday when he said this was related to a bug he was working on, but although #1338610 does fix the platform-api crash, we still need to make sure that com.ubuntu.location.Service can be found s.t. these calls actually work. IMO this is the primary bug because none of this works if c.u.l.Service isn't available.

2. When ua_location_service_controller_enable_gps() fails as a result of 1., the UI's switch falls out of sync with indicator-location-service, so to the user it /looks/ like GPS is turned on even when it isn't. I think this is how it's happening:
2a. user clicks on a ubuntu-ui-toolkit switch control
2b. unity8 toggles the switch control to give the user visual feedback
2c. unity8 passes the toggle information back to indicator-location-service
2d. indicator-location-service's UAL call fails, so the service state doesn't change
2e. since the service's state doesn't change, nothing gets posted to unity8 to fix the incorrect visuals set in 2b
IMO the fix to here is for the UI to resync its state a moment after it sends the information back to the service. On the one hand, this is a lesser bug since its trigger will go away when 1. is fixed. On the other hand, this bug could come back in the future, as it's possible for any indicator UI switch control.

Charles Kerr (charlesk) on 2014-07-30
Changed in platform-api:
assignee: nobody → Thomas Voß (thomas-voss)
Charles Kerr (charlesk) wrote :

Thomas' location-service solves the problem of indicator-location-service's UAL call failing (step 2d in the sequence above).

Now we've moved on to the point of failure being step 2e: it looks like the location-service state is changing, but a bug in platform-api appears to be not notifying the change listeners that have registered with it.

In fact, it looks like ua_location_service_controller_set_status_changed_handler() is a no-op as implemented in ubuntu/application/common/application/location/controller.cpp...

Thomas Voß (thomas-voss) wrote :

While I agree that the call to the location service just shouldn't fail, I also think that indicator-location-service should communicate back the result of the transaction, thus keeping the UI in sync with the backend.

Changed in platform-api:
status: New → Confirmed
importance: Undecided → High
Changed in platform-api:
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package location-service - 2.0.1+14.10.20140811-0ubuntu1

---------------
location-service (2.0.1+14.10.20140811-0ubuntu1) utopic; urgency=low

  [ thomas-voss ]
  * Make sure that state property changes are correctly reported to the
    bus. (LP: #1348334)

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Mon, 11 Aug 2014 10:21:20 +0000

Changed in location-service (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package platform-api - 2.2.0+14.10.20140808-0ubuntu1

---------------
platform-api (2.2.0+14.10.20140808-0ubuntu1) utopic; urgency=low

  [ thomas-voss ]
  * Implement installation of changed handlers. Subscribe to state
    properties. (LP: #1348334)
 -- Ubuntu daily release <email address hidden> Fri, 08 Aug 2014 02:07:56 +0000

Changed in platform-api (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-location - 13.10.0+14.10.20140808-0ubuntu1

---------------
indicator-location (13.10.0+14.10.20140808-0ubuntu1) utopic; urgency=low

  [ Charles Kerr ]
  * Fix bug that let controller-ualc's state get out of sync with the
    platform-api's ualc state. (LP: #1348334)

  [ CI bot ]
  * Resync trunk
 -- Ubuntu daily release <email address hidden> Fri, 08 Aug 2014 02:03:44 +0000

Changed in indicator-location (Ubuntu):
status: New → Fix Released
Changed in platform-api:
status: In Progress → Fix Released
Changed in indicator-location:
status: Confirmed → Fix Released
Changed in location-service:
status: New → Fix Released
assignee: nobody → Thomas Voß (thomas-voss)
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers