Comment 4 for bug 1720331

Revision history for this message
James Henstridge (jamesh) wrote :

So I think I've got things sorted out by (a) switching to call SetReportCrashes async to avoid blocking the UI, and (b) not calling SetReportCrashes if we're asked to set it to the current (cached) value of the property.

I've noticed that if whoopsie-preferences exits while the privacy panel is open, I get a bit of a bounce when toggling the switch next. This seems to be due to whoopsie-preferences sending out a stray change notification signal on start up:

    method call time=1507538340.672978 sender=:1.1499 -> destination=com.ubuntu.WhoopsiePreferences serial=30 path=/com/ubuntu/WhoopsiePreferences; interface=com.ubuntu.WhoopsiePreferences; member=SetReportCrashes
       boolean false
    signal time=1507538340.756225 sender=:1.1507 -> destination=(null destination) serial=9 path=/com/ubuntu/WhoopsiePreferences; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
       string "com.ubuntu.WhoopsiePreferences"
       array [
          dict entry(
             string "ReportMetrics"
             variant boolean true
          )
          dict entry(
             string "ReportCrashes"
             variant boolean true
          )
       ]
       array [
       ]
    method call time=1507538340.756590 sender=:1.1499 -> destination=:1.1507 serial=31 path=/com/ubuntu/WhoopsiePreferences; interface=org.freedesktop.DBus.Properties; member=GetAll
       string "com.ubuntu.WhoopsiePreferences"
    method call time=1507538340.757395 sender=:1.1499 -> destination=com.ubuntu.WhoopsiePreferences serial=32 path=/com/ubuntu/WhoopsiePreferences; interface=com.ubuntu.WhoopsiePreferences; member=SetReportCrashes
       boolean true
    signal time=1507538341.034321 sender=:1.1507 -> destination=(null destination) serial=14 path=/com/ubuntu/WhoopsiePreferences; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
       string "com.ubuntu.WhoopsiePreferences"
       array [
          dict entry(
             string "ReportCrashes"
             variant boolean false
          )
       ]
       array [
       ]
    method call time=1507538341.035076 sender=:1.1499 -> destination=:1.1507 serial=33 path=/com/ubuntu/WhoopsiePreferences; interface=com.ubuntu.WhoopsiePreferences; member=SetReportCrashes
       boolean false

So essentially whoopsie-preferences is sending out an unsolicited PropertiesChanged signal on startup with the initial values before processing the SetReportCrashes method call. Then gnome-control-center responds by trying to match the switch state leading to the bounce.

So I guess I'll have to dive into the whoopsie-preferences code to see if I can silence the stray signal.