inspector's unity_running is not initialized

Bug #719769 reported by Michael Terry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Medium
Mikkel Kamstrup Erlandsen
libunity
Fix Released
Low
Mikkel Kamstrup Erlandsen
libunity (Ubuntu)
Fix Released
Undecided
Unassigned
unity (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

unity_running is adjusted as unity goes up and down on the bus, but when the inspector singleton is constructed, unity_running is just set to false. It should check the status at construction time as well.

Makes it rather useless at the moment.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Well, that would require a sync dbus call. The idea is that you connect to the notify signal on that property to track updates. You need to do that anyway if you plan to make use of that value.

So I guess the solution here is just documentation?

Revision history for this message
Michael Terry (mterry) wrote :

The inspector constructor already makes sync calls, so I didn't think that was a concern (though I agree it should be).

It's more than just documentation. My understanding is that a client should be able to ask "is unity running?" and they can't right now. unity_running defaults to FALSE and only changes if unity goes down and up again (which, ideally it would never do).

So for all practical purposes, every app that asks gets told unity is not running.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

The only sync call is get_bus() and that doesn't touch the bus in 99.9999% of the times you call it :-)

I realize now, however, that my logic is flawed - I assumed that you can always just listen for "notify::unity-running", but that signal may have fired before you ever connect to it (say - if the inspector was used by a gio module or something). So perhaps a sync call to NameHasOwner is in order here - it wont be that bad because it's a call to the bus daemon and not some random process...

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Fixed in r41

Changed in libunity:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Low
status: New → Fix Committed
Changed in libunity:
milestone: none → 3.4.6
Changed in libunity:
status: Fix Committed → Fix Released
Changed in unity:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Medium
milestone: none → 3.4.6
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libunity - 3.4.6-0ubuntu1

---------------
libunity (3.4.6-0ubuntu1) natty; urgency=low

  * New upstream release.
    - libunity support gobject-introspected languages (LP: #709240)
    - inspector's unity_running is not initialized (LP: #719769)
  * debian/rules:
    - now, try to get a more stable ABI, use a symbols file
    - whip the pyc pyo generated
    - debian/libunity3.symbols
  * ship the gir python override in the gir package, still nice some tweaking
    though
 -- Didier Roche <email address hidden> Thu, 24 Feb 2011 20:10:48 +0100

Changed in libunity (Ubuntu):
status: New → Fix Released
no longer affects: libunity (Ubuntu Quantal)
Changed in unity (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.