Items of a menubar built from GMenu do not always work

Bug #1075263 reported by Conscious User on 2012-11-05
This bug affects 30 people
Affects Status Importance Assigned to Milestone
Application Menu Indicator
Fix Released
Lars Karlitski
indicator-appmenu (Ubuntu)

Bug Description

sometime menu items are not working

Test Case:
use the unity menu to do file->quit
run "python" directly again
try to use file->quit

without the fix the menu item doesn't work after a quick restart, after the fix it does

Regression potential:
check that menu correctly represent the focussed applications and that items work as they should


In the attached example, the Quit menu item is supposed to work but sometimes it does not. If you start and quit the example repeatedly, you will eventually witness the Quit item having no effect when clicked.

This is happening with both Python 2 and Python 3, in both Quantal and Precise.

However, it seems to be happening only with the mouse: the keyboard accelerator (Ctrl+q) always works. Calling the action directly from dbus with

gdbus call --session --dest org.gnome.test --object-path /org/gnome/test --method org.gtk.Actions.Activate 'quit' [] {}

also seems to always work.

This issue seems exclusive to menus built with GMenu. Swallowed GtkMenuBars seem to always work fine.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: indicator-appmenu 12.10.3-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Mon Nov 5 15:56:22 2012
InstallationDate: Installed on 2012-10-21 (15 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
SourcePackage: indicator-appmenu
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Conscious User (conscioususer) wrote :
Lars Karlitski (larsu) on 2012-11-05
Changed in indicator-appmenu:
status: New → Triaged
Changed in indicator-appmenu (Ubuntu):
status: New → Confirmed
Changed in indicator-appmenu:
importance: Undecided → High
assignee: nobody → Lars Uebernickel (larsu)
Lars Karlitski (larsu) on 2012-11-06
Changed in indicator-appmenu:
status: Triaged → In Progress
Lars Karlitski (larsu) wrote :

The cause of this is a five-second timeout in indicator-appmenu before it removes closed windows from its internal hash table. When an application restarts within these five seconds and X assigns the app's window the same xid, indicator-appmenu doesn't recognize it as a newly started application. It still shows the menus from the old instance (it has the menu model cashed), but action activations aren't send to the new instance.

The five-second timeout was added due to bamf bug #718926. This has been fixed since then, thus the timeout can be removed (see attached branch).

This is likely the root cause of the remaining issues on bug #1064962.
I would suggest to SRU this to quantal.

Changed in indicator-appmenu (Ubuntu):
importance: Undecided → High
Lars Karlitski (larsu) on 2012-11-12
Changed in indicator-appmenu:
status: In Progress → Fix Committed
no longer affects: indicator-appmenu/12.10
Changed in indicator-appmenu (Ubuntu Quantal):
importance: Undecided → High
status: New → Triaged
Changed in indicator-appmenu (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-appmenu - 12.10.3-0ubuntu3

indicator-appmenu (12.10.3-0ubuntu3) raring; urgency=low

  * Backported r218, should fix menus not working when an application is
    closed and restarted directly (lp: #1075263)
 -- Sebastien Bacher <email address hidden> Mon, 12 Nov 2012 17:16:17 +0100

Changed in indicator-appmenu (Ubuntu):
status: In Progress → Fix Released
Sebastien Bacher (seb128) wrote :

Ok, the fix seems to work fine and no bug was reported since it landed, I've uploaded a quantal backport

description: updated
Changed in indicator-appmenu (Ubuntu Quantal):
status: Triaged → In Progress

This bug is still happening on my laptop, I've created a new bug report here:

Please note that this bug has not been fixed.

Simplehuman (simplehuman) wrote :

I confirm, that it is not fixed

Hello Conscious, or anyone else affected,

Accepted indicator-appmenu into quantal-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in indicator-appmenu (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Luigi Pezzotta (sunshadow86) wrote :

Bug not solved for me in Libreoffice; however, in my case menu items seem to become unresponsive randomly. It's not related to wether I close and re-open an application within 5 seconds. Often menu items are working when I start the application, but after a while they stop responding. Restarting the application usually helps (but not always).

I'm using Quantal 64bit, and I have this problem since updating from Precise. This last update from -proposed didn't change anything for me. Since what I'm experiencing falls in the description of the bug ("Items of a menubar built from GMenu do not always work"), but it's not related to restarting the program within 5 seconds, I don't know if I should change the tag to verification-failed.

Conscious User (conscioususer) wrote :

I can confirm the fix is working for the test case attached, and also for the app that made me notice it in the first place.

@Luigi: the issues you're experiencing seem to be quite different of the ones that motivated this report. I suggest filing a new one.

tags: added: verification-done
removed: verification-needed

Hey guys! Wait!
I did several updates as suggested by Adam Conrad.
The bug is still happening, right now as I'm writing. It is not fixed yet.

Conscious User (conscioususer) wrote :

Julian, if you're talking about LibreOffice, it's unlikely that this bug alone is the cause of your issues. Please follow Bug #1064962 instead.

Yes, and I'm only experiencing this bug on LibreOffice.
How can I know when this issue is fixed?

Conscious User (conscioususer) wrote :

Julian, like I said, please follow the progress of Bug #1064962.

Your issue probably involves more than this specific report, so please stop commenting about it here.

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-appmenu - 12.10.3-0ubuntu2.1

indicator-appmenu (12.10.3-0ubuntu2.1) quantal-proposed; urgency=low

  * Backported r218, should fix menus not working when an application is
    closed and restarted directly (lp: #1075263)
 -- Sebastien Bacher <email address hidden> Mon, 12 Nov 2012 17:16:17 +0100

Changed in indicator-appmenu (Ubuntu Quantal):
status: Fix Committed → Fix Released
Lauren (bailunrui-j) wrote :

I have indicator-appmenu 12.10.3-0ubuntu2.1 and I still have this issue.

jeff (jafrelin) wrote :

Libreoffice stops responding to menu or hot keys - i.e. search or formating commands.

Ubuntu 12.10 3.5.0-25
Libre office (Build ID: 360m1(Build:2))
Works on program restart

Lars Karlitski (larsu) on 2013-09-10
Changed in indicator-appmenu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers