Some apps don't integrate to appmenu after having their windows closed

Bug #718926 reported by Marcos Magalhães on 2011-02-14
176
This bug affects 34 people
Affects Status Importance Assigned to Milestone
Application Menu Indicator
Fix Released
Undecided
Unassigned
BAMF
High
Unassigned
Unity
Fix Released
Medium
Jason Smith
Unity Foundations
Medium
Ted Gould
appmenu-gtk (Ubuntu)
Undecided
Unassigned
bamf (Ubuntu)
High
Unassigned
indicator-appmenu (Ubuntu)
High
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: appmenu-gtk

Some applications (I identified this on transmission and liferea) that can be closed and run on background through indicators don't have their menu showing up correctly when their windows are reopened. The menus don't show up on the app window as expected, but the appmenu panel only shows a "File" menu with "Close" option instead. This happens in both unity and gnome-panel running indicator-applet-appmenu.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: appmenu-gtk 0.1.93-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-3.30-generic-pae 2.6.38-rc4
Uname: Linux 2.6.38-3-generic-pae i686
Architecture: i386
Date: Mon Feb 14 16:50:39 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 LANGUAGE=pt_BR:pt:en_GB:en
 LANG=pt_BR.UTF-8
 LC_MESSAGES=pt_BR.utf8
 SHELL=/bin/bash
SourcePackage: appmenu-gtk

Related branches

Burt P. (pburt0) wrote :

Confirmed on Alpha2 LiveCD.

Chris Coulson (chrisccoulson) wrote :

Not had a chance to check if this is because of appmenu-gtk or indicator-appmenu yet, but it's easily reproducible for applications that can hide their windows (like empathy and banshee)

Changed in appmenu-gtk (Ubuntu):
importance: Undecided → High
status: New → Triaged
Chris Coulson (chrisccoulson) wrote :

This is probably a bit of both actually. I'd imagine what is happening is that indicator-appmenu frees the resources associated with the menu once the window disappears, and the application never re-registers a new menu once it's window is displayed again (that's just a guess though)

On Wed, 2011-02-16 at 16:53 +0000, Chris Coulson wrote:
> This is probably a bit of both actually. I'd imagine what is happening
> is that indicator-appmenu frees the resources associated with the menu
> once the window disappears, and the application never re-registers a new
> menu once it's window is displayed again (that's just a guess though)

Yeah, so this is probably because we're deleting the menus when the
window disappears. It is most likely hidden. We need to put those
menus in a purgatory instead of destroying them. indicator-appmenu
issue.

Omer Akram (om26er) wrote :

moved to indicator-appmenu per Ted's comment.

affects: appmenu-gtk → indicator-appmenu
Changed in indicator-appmenu:
status: New → Confirmed
affects: appmenu-gtk (Ubuntu) → indicator-appmenu (Ubuntu)
Kalle Valo (kvalo) on 2011-02-21
Changed in indicator-appmenu:
status: Confirmed → Triaged
importance: Undecided → High
Chris Coulson (chrisccoulson) wrote :

The issue here is that Empathy unmaps it's toplevel window when you press the close button, so from the POV of BAMF and indicator-appmenu - the window has been closed and the menu resources should be freed.

I've just tested a fix for this in appmenu-gtk which seems to be working well (although it's full of debug printf's right now, which is why i've not pushed it anywhere). it basically hooks on to the map/unmap signals on the toplevel window (rather than realized/destroyed) which causes the menu to be removed/rebuilt when the top-level window is unmapped/mapped.

Chris Coulson (chrisccoulson) wrote :

I've attached an appmenu-gtk branch which fixes this.

Fixed in appmenu-gtk 0.1.94-0ubuntu2 according to http://launchpad.net/distros/ubuntu/natty/+source/appmenu-gtk/0.1.94-0ubuntu2
Besides, I can't seem to trigger the bug anymore after the update.

kaij74 (kaij74) wrote :

For me appmenu-gtk 0.1.94-0ubuntu2 fixed nothing. In fact i can reproduce this issue with every single application.

kaij74 (kaij74) wrote :

If you never minimize any application everything works fine. Open let's say 3 applications and keep minimizing and maximizing them and you will loose menus very soon. One or two minimize and maximize is enough.

Ted Gould (ted) wrote :

It seems that indicator-appmenu is loosing the window. For me this takes about 20 times of minimizing, but I have been able to reproduce it. When I call dbusmenu-dumper I get this:

$ /usr/lib/libdbusmenu/dbusmenu-dumper

** (dbusmenu-dumper:7660): WARNING **: Unable to call 'GetMenuForWindow' on registrar: GDBus.Error:com.canonical.AppMenu.Error: Window not found
ERROR: could not find a menu for the pointed window

Ted Gould (ted) wrote :

Okay, so I've now got a log from unity-panel-service. I think this is the relevant part. I had a terminal open and that wasn't causing a problem. Once I was just switching between Firefox and the desktop it happened more readily. I believe that "96469227" is Firefox (which lost its menus) and "98610656" is my terminal.

(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 0
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Active window is: NULL
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 0
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Active window is: NULL
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 0
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from desktop

** (unity-panel-service:8071): WARNING **: Failed to fetch type: Method "WindowType" with signature "" on interface "org.ayatana.bamf.window" doe

(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Removing menus for 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Active window is: NULL
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 0
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Looking for parent window on XID 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 96469227
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Switching to menus from XID 98610656
(unity-panel-service:8071): Indicator-Appmenu-DEBUG: Unable to get MWM functions for: 98610656

How exactly did you reach that? Recently, another bug showed up that involves minimizing apps (not closing them), and according to chrisccoulson, it has a different cause.

Ted Gould (ted) wrote :

Okay, so after investigating the code a bit it seemed that we had to be getting a "view-closed" signal from BAMF. Took a dbus-monitor log and found out that BAMF is infact sending a stray view closed signal. Reassigning this bug.

Ted Gould (ted) wrote :
affects: indicator-appmenu (Ubuntu) → bamf (Ubuntu)
affects: indicator-appmenu → bamf
Changed in bamf:
status: Triaged → Confirmed
Ted Gould (ted) wrote :

To get the log from the unity-panel-service you can do this:

  $ killall unity-panel-service ; /usr/lib/unity/unity-panel-service

It might take a couple tries as Unity will try to restart it. Your shell needs to be faster :)

Didier Roche (didrocks) on 2011-03-11
Changed in unity:
status: New → Triaged
Changed in bamf:
status: Confirmed → Triaged
David Barth (dbarth) on 2011-03-22
Changed in unity-foundations:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Ted Gould (ted)
milestone: none → unity-3.6.8
Changed in unity:
assignee: nobody → Jason Smith (jassmith)
importance: Undecided → Medium
Changed in unity-foundations:
assignee: Ted Gould (ted) → nobody
Changed in unity:
milestone: none → 3.8
Chris Coulson (chrisccoulson) wrote :

This appears to be a compiz bug. Attaching gdb to bamf shows that the window is being removed from the client list (and then immediately readded) when it is restored

Changed in unity-foundations:
milestone: unity-3.6.8 → unity-3.8.0-beta
Greg A (etulfetulf) wrote :

I see this with Banshee. Opening it from the sound menu and the appmenu works, but open it from the Unity launcher and we get this bug.

Oleg Grom (gromescu) wrote :

I can confirm the bug only for qt4 apps (skype, clementine etc.) minimized to indicator applet or in notification area in Gnome. Gtk apps seem to be working correctly.
/Natty with latest updates.

Didier Roche (didrocks) on 2011-03-28
Changed in unity:
milestone: 3.8 → 3.8.2
Didier Roche (didrocks) on 2011-04-01
Changed in unity:
milestone: 3.8.2 → 3.8.4
cgarre (cgarre) wrote :

happens very consistently with firefox 4 ...

David Barth (dbarth) on 2011-04-04
Changed in unity-foundations:
milestone: unity-3.8.2 → unity-3.8.4
PEIGNOT Kévin (kpeignot) wrote :

It seems I have this bug too...

Narcissus (narcissus) wrote :

I consistently get this the first time I minimize Firefox or Thunderbird.

Ted Gould (ted) on 2011-04-06
Changed in indicator-appmenu:
status: New → In Progress
Ted Gould (ted) on 2011-04-06
Changed in indicator-appmenu:
status: In Progress → Fix Committed
milestone: none → 0.2.0
Didier Roche (didrocks) on 2011-04-07
Changed in unity:
milestone: 3.8.4 → 3.8.6
Ted Gould (ted) on 2011-04-07
Changed in indicator-appmenu:
status: Fix Committed → Fix Released
Changed in indicator-appmenu (Ubuntu):
status: New → Fix Committed
importance: Undecided → High
David Barth (dbarth) on 2011-04-07
Changed in unity-foundations:
status: Triaged → Fix Released
assignee: nobody → Ted Gould (ted)

To clarify a bit about the complex status of this bug. The bug exists
in BAMF (caused by WNCK) to the pointer where it gives a "glitch" with
close and open. We've worked around it in indicator-appmenu, so that
task has been closed, but the bug still exists in BAMF so should remain
open.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-appmenu - 0.2.0-0ubuntu1

---------------
indicator-appmenu (0.2.0-0ubuntu1) natty; urgency=low

  * New upstream release.
    ∘ Adding a check of the indicator environment to hide the menu stubs
      under Unity (LP: #703555)
    ∘ Send about-to-show on menus that don't have any children currently
      (LP: #619811)
    ∘ Work around bugs in signaling by delaying the destruction of menu
      caches for five seconds (LP: #718926)
    ∘ Disconnecting client signal handlers on displose (LP: #738561)
    ∘ Remove menuitem signals on root changes (LP: #743404)
 -- Ted Gould <email address hidden> Thu, 07 Apr 2011 11:01:06 -0500

Changed in indicator-appmenu (Ubuntu):
status: Fix Committed → Fix Released
Jason Smith (jassmith) on 2011-04-07
Changed in unity:
status: Triaged → Fix Released
Alex Launi (alexlauni) on 2011-04-07
Changed in unity:
milestone: 3.8.6 → 3.8.4
Didier Roche (didrocks) on 2011-04-08
Changed in bamf:
status: Triaged → Fix Released
Didier Roche (didrocks) wrote :

Tracking the bamf bug in another report

Changed in bamf (Ubuntu):
status: Triaged → Fix Released

Still happen to me in firefox, appindicator-menu 0.2.1. To reproduce: minimize firefox, switch to another wievport with for example thunderbird maximized, and when you go back, no menu.

Sometime you can have it back by forcing a menu change, for example, switching to a viewport and give focus to another application with a global menu.

David Kaplan (dmkaplan) wrote :

I seem to be having the same behavior using Firefox in Oneiric even though the bug says a fix has been released. I will attach a screenshot showing firefox without a global menu bar.

Launchpad Janitor (janitor) wrote :
Download full text (3.6 KiB)

This bug was fixed in the package appmenu-gtk - 12.10.3daily12.11.28-0ubuntu1

---------------
appmenu-gtk (12.10.3daily12.11.28-0ubuntu1) raring; urgency=low

  [ Mathieu Trudel-Lapierre ]
  * debian/control:
    - Update to use trailing commas at the end of dependency lists.
    - Reorganize Build-Depends for clarity.
    - Drop Build-Depends on cdbs and bump debhelper to (>= 9).
    - Update Vcs-Bzr, Vcs-Browser and add notice to uploaders.
    - Add a Build-Depends on gnome-common.
  * debian/compat: bump compat level to 9.
  * debian/rules:
    - Migrate from cdbs to dh9 sequencer.
    - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL.
    - Override dh_autoreconf to call autogen.sh and not run configure.

  [ Didier Roche ]
  * Automatic snapshot from revision 162 (bootstrap)

  [ Sebastien Bacher ]
  * Pidgin menu items for accounts are not updated on the menubar when
    disabling them (LP: #598494)
  * Dynamic menu is empty (Epiphany) (LP: #601943)
  * doesn't display icons (LP: #598528)
  * Please blacklist "IBM Notes" (LP: #1077095)
  * Weird sub-menu associated with Anjuta's File -> Quit entry (LP:
    #599817)
  * [Master] Application is showing a partial menu (LP: #594228)
  * Tabs menu in gnome-terminal does not display correctly (LP: #592848)
  * [Master] Menu items are out of order. (LP: #594230)
  * g_object_add_weak_pointer: assertion `G_IS_OBJECT (object)' failed
    (LP: #1026160)
  * Gimp: menu item missing (LP: #598623)
  * Firefox supposedly crashing with appmenu-gtk (LP: #600880)
  * Missing "Network Button" for wifi inputs (LP: #788640)

  [ Michael Terry ]
  * appmenu-gtk breaks dynamically created Emacs Gtk+ menus (LP:
    #673302)
  * Regression - Menubar appears/disappears when launching an app (LP:
    #971459)

  [ Ted Gould ]
  * the xsession script should set the variable only if the needed file
    is installed (LP: #674047)
  * (various) crashed with SIGSEGV in
    g_atomic_int_exchange_and_add()/g_variant_unref/?libappmenu.so/g_sim
    ple_async_result_complete (LP: #703988)
  * Shotwell - menubar not updated when switching back to a category
    (LP: #729203)
  * appmenu-gtk leaks references (LP: #830260)
  * crashes with SIGSEGV in do_rebuild() when running under valgrind
    (LP: #726388)
  * Some apps don't integrate to appmenu after having their windows
    closed (LP: #718926)
  * appmenu-gtk 0.1.96-0ubuntu1 prevents desktop global menu (desktop
    appmenu in unity panel) from appearing (LP: #733050)
  * gnome-display-properties crashed with SIGSEGV in g_object_set() (LP:
    #729065)

  [ Charles Kerr ]
  * Regression - Menubar appears/disappears when launching an app (LP:
    #971459)
  * Call GTK functions without gdk lock (LP: #797188)

  [ Ken VanDine ]
  * Duplicate separator items in app menus (LP: #594867)
  * Add support for keyboard shortcuts in menus (LP: #591293)
  * Fall back to stock menu if the applet isn't in the panel (LP:
    #607285)
  * Shotwell - menubar not updated when switching back to a category
    (LP: #729203)
  * crashes with SIGSEGV in do_rebuild() when running under valgrind
    (LP: #726388)
  * gnome-display-properties crashed with SIGSEGV in g_object_set() (LP:
    #72...

Read more...

Changed in appmenu-gtk (Ubuntu):
status: New → Fix Released
Changed in unity (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers