libappindicator does not allow removing icons from the system tray. This leads to Google Chrome leaving 100s of zombie system tray icons in KDE

Bug #1395229 reported by Peter
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libappindicator (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

libappindicator has a bug where if the AppIndicator object is unreffed but the parent application does not exit, the system tray icon is not properly removed from the system tray. On KDE, unreffing AppIndicator moves the system tray icon to the overflow menu. On Unity, unreffing AppIndicator removes the system tray icon from the system tray but not from the list in ApplicationServiceAppstorePrivate::applications in application-service-appstore.c (in the indicator-application component)

Chrome uses libappindicator to display HTML5 notifications in Unity and KDE.
Sample page which generates HTML5 notifications: https://developer.cdn.mozilla.net/media/uploads/demos/e/l/elfoxero/c17223c414d8ddafb7808972b5617d9e/html5-notifications_1400214081_demo_package/index.html
Chrome displays a "bell" icon in the system tray when there are notifications and attempts to remove it (via unreffing the AppIndicator object) whenever there are no pending notifications. Because of this bug, some Chrome users have reported Chrome leaving 100s of zombie system tray icons. Some bug reports: crbug.com/419673 https://bugs.kde.org/show_bug.cgi?id=339184

On Chrome, we have (recently) worked around the libappindicator bug. However, it would be nice if the bug got fixed. If each instance of AppIndicator acquired a DBus well-known name (called g_bus_own_name() ), it seems that the bug would be fixed. Doing this would allow the StatusNotifierWatcher to notice when the AppIndicator object gets destroyed. I have attached a hacky (and probably wrong) patch to libappindicator (libappindicator.diff) which seems to fix the bug.

I have also attached a minimal app (app_indicator_demo.c) which demonstrates the bug.

Revision history for this message
Peter (pkotwicz) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

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