bluetooth "devices" menu item not working in bluetooth indicator

Bug #558841 reported by Kevin Krafthefer on 2010-04-09
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Application Indicators
Fix Released
Fix Released
Fix Released
gnome-bluetooth (Ubuntu)
Karl Lattimer
gtk+2.0 (Ubuntu)
Cody Russell
Sebastien Bacher

Bug Description

Binary package hint: gnome-bluetooth

when clicking on bluetooth icon, i'm presented with a menu that has "devices" grayed out. as of lucid alpha3, this was working fine and would present me with a list of my bluetooth devices. however, this looks to be a regression introduced by the update I did on april 8th.

if i click on preferences, i can browse, connect and disconnect devices just fine and they work; however, "devices" in the bluetooth indicator menu is still grayed out.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-bluetooth 2.30.0-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic
Uname: Linux 2.6.32-19-generic i686
Architecture: i386
Date: Thu Apr 8 18:54:31 2010
ExecutablePath: /usr/bin/bluetooth-applet
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
SourcePackage: gnome-bluetooth

Related branches

Kevin Krafthefer (krafthefer) wrote :

Travis, can you please look into this asap. I'm sure the bug reporter will help you if you need any more details.

Changed in gnome-bluetooth (Ubuntu):
importance: Undecided → High
assignee: nobody → Travis B. Hartwell (nafai)
Travis B. Hartwell (nafai) wrote :

I can reproduce, looking into the cause.

Changed in gnome-bluetooth (Ubuntu):
status: New → Confirmed
Travis B. Hartwell (nafai) wrote :

Sorry for lack of status updates, keep forgetting. :)

I've narrowed it down to the see where the behavior is exhibiting in the code and am exploring whether this is caused by a problem in the gnome-bluetooth code itself or a change/regression in app indicator libraries. I should have the issue itself discovered and hopefully fixed or at least passed to the DX team today.

Changed in gnome-bluetooth (Ubuntu):
status: Confirmed → In Progress
Travis B. Hartwell (nafai) wrote :

Quick update with more details.

First, steps to reproduce this:

1. Make sure you have at least one device paired (but not necessarily
    connected), with your computer.

2. Start with Bluetooth turned off. If you have to turn off
    bluetooth (via the indicator menu), kill bluetooth-applet
    ("killall bluetooth-applet") and then relaunch ("bluetooth-applet

3. Turn on Bluetooth via the indicator menu. The individual menus
    for the devices won't show up and you will only see the "Devices"
    heading in the menu.

Investigation so far:

First, at Ted Gould's suggestion, I ran dbusmenu-dumper to see what
dbusmenu was getting:

/usr/lib/libdbusmenu/dbusmenu-dumper --dbus-name=org.gnome.Bluetooth.applet --dbus-object=/org/ayatana/NotificationItem/bluetooth_manager/Menu

The output of this confirmed that it indeed was not getting the menus
for the devices.

Next, I added debug prints to libappindicator/appindicator.c where
menuitems with labels were being added, in menuitem_iterate() and
container_iterate(). Again, I confirmed that at this level the device
menus were never seen.

I next added debug prints to applet/main.c in gnome-bluetooth to trace
which related functions were being called and also when the top level
devices menus were being added. I have confirmed that they *are*
being added at this level.

Another detail, if I kill the bluetooth-applet while bluetooth is
enabled, and then re-launch it, the device menus do show up.

I'm not sure if there is a signal that isn't being caught or what. At
the end of the function where the menu items are being added, there is
a call to:

 gtk_ui_manager_ensure_update (uimanager);

I think I remember something about this causing issues in the past,
but I'm unsure.

Travis B. Hartwell (nafai) wrote :

I've pastebin'd the bluetooth-applet code:

Here's the appropriate functions to look at:

update_device_list (starts line 749)

add_menu_item (starts line 684)

Travis B. Hartwell (nafai) wrote :

Since the bug report indicated this worked in alpha3, but stopped
working as of April 8th, I started testing versions of libappindicator
starting from the release right after alpha3. This was
0.0.15-0ubuntu1. I checked out the release from
lp:~ubuntu-desktop/indicator-application/ubuntu at each specific
revision and built the packages using dpkg-buildpackage.

The bug was first exhibited for me at package version 0.0.17-0ubuntu1,
which is this branch revision:

I am slightly confused because there doesn't seem to be anything here
that I imagine would cause the kind of breakage being reported.

The one concern I have about this testing method is that I am building
the libappindicator package on an up to date system. Thus, I have
different versions of the libappindicator dependencies than were
likely in the archive at the time of the original package build. This
might affect where the problem first arose.

I think I'll need additional help from either Ted or Cody to figure
out what might be going on here.

Kevin Krafthefer (krafthefer) wrote :

I mentioned that it worked in alpha3 as a best estimate. It is possible that I was on an earlier lucid alpha when it was working; sorry for any confusion.

Travis B. Hartwell (nafai) wrote :

Kevin: that's okay, it was working at alpha3 so that was a good starting point. :)

I hope I'm not being too verbose in my comments, I'm just trying to track where I am and have everything documented so I can get additional help.

Geek87 (geek87) wrote :

I'm not sure my bug is exactly the same but it looks very similar: when I configure a new device, it's shown under the devices section of the bluetooth-applet menu. But if I disable the Bluetooth and enable it again (manualy or after suspending and resuming my computer) the devices section is empty and greyed. I have to kill the bluetooth-applet and launch it again to see my devices in the menu.

Down grading to medium, as there is a work around, use the applet directly and skip the indicator. Still want to get this fixed before we ship, or perhaps in an SRU if possible.

Changed in gnome-bluetooth (Ubuntu):
importance: High → Medium
Sebastien Bacher (seb128) wrote :

Kevin, do you have bluetooth turned off on boot for some reason?
Does it work if you enable bluetooth and restart the bluetooth-applet?

Kevin Krafthefer (krafthefer) wrote :

Sebastien: no, bluetooth is on at boot. However, I should point out that booting on this system (xps m1530) is racey.

I kill -HUP'ed bluetooth-applet, bluetooth remained working but the bluetooth indicator icon never came back.

Chris Van Hoof (vanhoof) wrote :

Just a +1

I can reproduce this using Lucid beta2 (w/ all post beta updates applied). I'm using a Lenovo Ideapad u450p, and I had a bluetooth headset paired and connected. For me to reproduce; no suspend, or service restart was needed, and bluetooth is /enabled/ at boot.

Once I paired the device, and connected to it, the "devices" section remains grey'd out regardless of being connected to a device.

Travis B. Hartwell (nafai) wrote :

I've got what I believe is a somewhat minimal example reproducing this
without the extraneous bluetooth:

I have debug prints showing the menu structure and the ui manager xml
output before and after I add a new menu item to the placeholder
menu. For some reason I can't get the submenu items to add, but I
think the is possibly orthogonal to the original problem.

Hopefully this will be a start to being figuring out what is going on
with the app indicator.

Cody Russell (bratsche) wrote :

This is a patch against gtk+ that I think will solve the issue. Can you apply it and see if it fixes the gnome-bluetooth issue? If so I can work on trying to get it into upstream.

David Barth (dbarth) on 2010-04-23
affects: gnome-bluetooth (Ubuntu) → gtk+2.0 (Ubuntu)
tags: added: patch
Travis B. Hartwell (nafai) wrote :

Cody's above patch for gtk+ (#16) fixes the reported bug. He mentioned that he is going to rework it to make it more acceptable to upstream and then, if I understand correctly, include it in a gtk+ SRU.

Sebastien Bacher (seb128) wrote :

Ok thank you for your work there, reassigning to Cody for now. Cody could you open an upstream bug and give us the reference there? Would be nice to have the change going upstream before backporting it to lucid updates

Changed in gtk+2.0 (Ubuntu):
assignee: Travis B. Hartwell (nafai) → Cody Russell (bratsche)
Sebastien Bacher (seb128) wrote :

Thanks Cody!

Changed in gtk:
status: Unknown → Confirmed

This is still an issue with 10.04 LTS final release.

ben (joshua615) wrote :

applied Cody's patch to the latest source (thanks!), still experiencing a minor issue that could be related: after I turn bluetooth off and back on, the "Visibility" option would disappear until I re-login.

ben (joshua615) wrote :
DoHwan Kim (koxel) wrote :

This problem is still at 5/26..
I don't use indicator-applet..

Craig Barnes (cjbarnes18) wrote :

Have just updated and can confirm that this is still problem.

Nilson Morais (darkstrikerd) wrote :

Same bug here.
Ubuntu 10.04 final release

Sense Egbert Hofstede (sense) wrote :

Now the required signal is available from ppa:ubuntu-desktop/ppa (please not that the real patch is on GNOME Bugzilla, the one attached to this bug report is obsolete) libappindicator needs to be adapted to actually use the 'chield-added' signal.

Changed in indicator-application:
status: New → Confirmed
Changed in indicator-application (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.21.1-1ubuntu1

gtk+2.0 (2.21.1-1ubuntu1) maverick; urgency=low

  * debian/patches/070_mandatory-relibtoolize.patch:
    - refreshed
  * debian/patches/072_indicator_menu_update.patch:
    - change by Cody Russell to send an update event on menu changes,
      should make the bluetooth indicator refresh correctly (lp: #558841)
  * debian/patches/091_bugzilla_tooltip_refresh.patch:
    - refreshed

gtk+2.0 (2.21.1-1) experimental; urgency=low

  * New upstream development release:
    + debian/rules,
      - Update for new API symbols.
    + debian/patches/070_mandatory-relibtoolize.patch:
      - Regenerated for the new version.
 -- Sebastien Bacher <email address hidden> Wed, 02 Jun 2010 15:59:27 +0200

Changed in gtk+2.0 (Ubuntu):
status: In Progress → Fix Released

Hi Cody,

Would it be possible to backport the patch to lucid?


Changed in indicator-application (Ubuntu Lucid):
importance: Undecided → Low
status: New → Triaged
tags: removed: patch
Sebastien Bacher (seb128) wrote :
Download full text (4.3 KiB)

The gtk change is not enough, I tried ted's update for indicator-application, now the devices are correctly updated but the "visible" entry is not, it display such warnings on the command line:

"#0 IA__g_logv (log_domain=<value optimized out>,
    format=0x9690f9 "%s: assertion `%s' failed", args1=0xbfffdf8c "`\355\031")
    at glib2.0/build-area/glib2.0-2.25.7/glib/gmessages.c:555
#1 0x009237e6 in IA__g_log (log_domain=0x19e8ea "LIBDBUSMENU-GLIB",
    format=0x9690f9 "%s: assertion `%s' failed")
    at glib2.0/build-area/glib2.0-2.25.7/glib/gmessages.c:569
#2 0x00923a4b in IA__g_return_if_fail_warning (
    log_domain=0x19e8ea "LIBDBUSMENU-GLIB",
    pretty_function=0x19ed60 "dbusmenu_menuitem_property_set_value",
    expression=0x19e8d1 "DBUSMENU_IS_MENUITEM(mi)")
    at glib2.0/build-area/glib2.0-2.25.7/glib/gmessages.c:584
#3 0x00197a0f in dbusmenu_menuitem_property_set_value (mi=0x80ee678,
    property=0x19149e "visible", value=0xbfffe01c) at menuitem.c:931
#4 0x00197c0e in dbusmenu_menuitem_property_set_bool (mi=0x80ee678,
    property=0x19149e "visible", value=0) at menuitem.c:885
#5 0x0018e65e in widget_notify_cb (widget=0x81044f0, pspec=0x809fef0,
    data=0x80ee678) at libappindicator/app-indicator.c:1239
#6 0x008a9c9c in IA__g_cclosure_marshal_VOID__PARAM (closure=0x8118788,
---Type <return> to continue, or q <return> to quit---
    return_value=0x0, n_param_values=2, param_values=0x80fc6c8,
    invocation_hint=0xbfffe1d0, marshal_data=0x18e550)
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gmarshal.c:531
#7 0x0089b362 in IA__g_closure_invoke (closure=0x8118788, return_value=0x0,
    n_param_values=2, param_values=0x80fc6c8, invocation_hint=0xbfffe1d0)
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gclosure.c:767
#8 0x008b2a8d in signal_emit_unlocked_R (node=<value optimized out>,
    detail=<value optimized out>, instance=0x81044f0, emission_return=0x0,
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gsignal.c:3248
#9 0x008b40f4 in IA__g_signal_emit_valist (instance=0x81044f0, signal_id=1,
    detail=250, var_args=0xbfffe390 "$\205\232")
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gsignal.c:2981
#10 0x008b4856 in IA__g_signal_emit (instance=0x81044f0, signal_id=1,
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gsignal.c:3038
#11 0x0089f901 in g_object_dispatch_properties_changed (object=0x81044f0,
    n_pspecs=1, pspecs=0xbfffe400)
---Type <return> to continue, or q <return> to quit---
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gobject.c:801
#12 0x0089c09f in g_object_notify_dispatcher (object=0x81044f0, n_pspecs=1,
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gobject.c:328
#13 0x008a1e93 in g_object_notify_queue_thaw (object=0x81044f0,
    property_name=0x55a8e0 "visible")
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gobjectnotifyqueue.c:120
#14 IA__g_object_notify (object=0x81044f0, property_name=0x55a8e0 "visible")
    at glib2.0/build-area/glib2.0-2.25.7/gobject/gobject.c:888
#15 0x0041532e in IA__gtk_widget_hide (widget=0x8104...


Sebastien Bacher (seb128) wrote :
Sebastien Bacher (seb128) wrote :
Sebastien Bacher (seb128) wrote :

the candidate gtk sru update is in the ubuntu-desktop ppa now

Changed in gtk+2.0 (Ubuntu Lucid):
assignee: Cody Russell (bratsche) → Sebastien Bacher (seb128)
status: In Progress → Fix Committed
assignee: Sebastien Bacher (seb128) → nobody
importance: Medium → Low
Andrea Caminiti (nrayever) wrote :

Same issue here! I was looking for this bug and finally i found it. I confirm the issue still happens in Lucid Final Release. It happens when i disable manually the bluetooth from the applet. When it is enable again it won't show any device. Hope this bug/papercut is solved for Maverick.

Regards, Andrea.

Sebastien Bacher (seb128) wrote :
Sebastien Bacher (seb128) wrote :

I've uploaded the debdiff now, it's not enough to fix the issue but is required so we should start by testing that it doesn't create any issue until we get the corresponding indicator-application change uploaded later on

Changed in gtk+2.0 (Ubuntu Lucid):
assignee: nobody → Sebastien Bacher (seb128)

Accepted gtk+2.0 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Luca Ferretti (elle.uca) wrote :

Any news about needed changes in indicator-applet? As Sebastien said, the gtk+ patch is not enough to fix this issue.

DoHwan Kim (koxel) wrote :

i upgraded GTK+ to patched version. But the problem is still occured.
Maybe patch is not enough to fix the problem.

Pedro Villavicencio (pedro) wrote :

I cannot reproduce the original bug but I can say that I've been using the gtk+ proposed package for a few days now and did not noticed any regression so far.

Sebastien Bacher (seb128) wrote :

> i upgraded GTK+ to patched version. But the problem is still occured. Maybe patch is not enough to fix the problem.

Right, as indicated by the bug tasks and the comments the gtk change only enable signals to fix the issue that the indicator-application stack needs to use. There is a patch for that in that bug as well but it didn't get uploaded yet since there is still one issue with it leading to warnings and one broken items

Sebastien Bacher (seb128) wrote :

ok, flagging the bug verified now since the update doesn't create issues and we need that change to get the application-indicator update to work

tags: added: verification-done
removed: verification-needed
tags: removed: i386
tags: added: verification
removed: verification-done
tags: added: verification-done
removed: verification
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.20.1-0ubuntu2

gtk+2.0 (2.20.1-0ubuntu2) lucid-proposed; urgency=low

  * debian/
    - use a replaces on gobject-introspection-repository required for karmic
      upgrades (lp: #574837)
  * debian/patches/064_indicator_menu_update.patch:
    - change by Cody Russell to send an update event on menu changes,
      should make the bluetooth indicator refresh correctly (lp: #558841)
 -- Sebastien Bacher <email address hidden> Tue, 01 Jun 2010 16:18:46 +0200

Changed in gtk+2.0 (Ubuntu Lucid):
status: Fix Committed → Fix Released
Sense Egbert Hofstede (sense) wrote :

This bug was fixed in commit 136 of the lp:indicator-application branch and is included in the 0.2.2 release.

Changed in indicator-application:
status: Confirmed → Fix Released
Ted Gould (ted) on 2010-07-08
Changed in indicator-application:
milestone: none → 0.2.2
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-application - 0.2.2-0ubuntu1

indicator-application (0.2.2-0ubuntu1) maverick; urgency=low

  * debian/control, debian/rules:
    - use dh_girepository and gir:Depends to get the gir depends,
      clean the build-depends on gir-repository-dev not required

  [ Ted Gould ]
  * New upstream release.
    ∘ Work with updated container signal names (lp: #558841)
 -- Sebastien Bacher <email address hidden> Thu, 08 Jul 2010 18:12:00 +0200

Changed in indicator-application (Ubuntu):
status: Triaged → Fix Released
Jacopo Lorenzetti (jacopol) wrote :

when will indicator-application 0.0.22 be available in lucid-proposed?

Sebastien Bacher (seb128) wrote :

The current version stills displays some warning after turning bt off and on and the visible item is not listed
Karl could you try to figure what's going on there?

Changed in indicator-application (Ubuntu):
assignee: nobody → Karl Lattimer (karl-qdh)
status: Fix Released → Triaged
Karl Lattimer (karl-qdh) on 2010-07-30
Changed in indicator-application (Ubuntu):
status: Triaged → In Progress
Karl Lattimer (karl-qdh) wrote :

after much digging I've managed to determine that this is probably some kind of race condition between the bluetooth_client_get_model not returning a fully populated model with all the devices in it and the subsequent call to device_changed and how the NULL default_iter in there is used in update_discoverability

This looks like a hard one to fix, there might be the need to wait for the bluetooth client model to be updated before we run device_changed... Or at least respond to the signals in a more robust way, the signals are emitted on the bluetooth client model so it may be possible to work around this.

Karl Lattimer (karl-qdh) wrote :

Will test with using gobject.connect_after as sometimes it fixes things like this

Karl Lattimer (karl-qdh) wrote :

Tracing this down even further I find that it might be related to the same problem present in the ibus indicator in that an object must be visible to emit signals. If this is the case then this is a deeper problem related to the dbus menu stuff which requires more digging into.

Karl Lattimer (karl-qdh) wrote :

This is an updated patch which *kinda* fixes the remaining problem.

Instead of hiding/showing the menu item, we're setting it sensitive/insensitive which appears to not change anything really drastic except the visible checkmenuitem is now always visible and always sensitive when you expect it to be.

Changed in indicator-application (Ubuntu):
status: In Progress → Fix Committed
Changed in gtk:
importance: Unknown → Wishlist
Didier Roche (didrocks) on 2010-09-23
affects: indicator-application (Ubuntu) → gnome-bluetooth (Ubuntu)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-bluetooth - 2.31.90-0ubuntu3

gnome-bluetooth (2.31.90-0ubuntu3) maverick; urgency=low

  * debian/patches/01_use_app_indicator.patch:
    - update by Karl Lattimer to fix more refresh issues (LP: #558841)
 -- Didier Roche <email address hidden> Wed, 22 Sep 2010 16:45:57 +0200

Changed in gnome-bluetooth (Ubuntu):
status: Fix Committed → Fix Released
Scott Kitterman (kitterman) wrote :

Unsubscribing ubuntu-release to get this off the team bug list.

Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in gnome-bluetooth (Ubuntu Lucid):
status: Triaged → Won't Fix
Changed in gtk:
status: Confirmed → Incomplete
Changed in gtk:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.