global menu disappear in digikam after first use

Bug #778418 reported by Romano Giannetti
76
This bug affects 14 people
Affects Status Importance Assigned to Milestone
appmenu-qt
New
Undecided
Unassigned
appmenu-qt (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: unity

Hi,

I have my natty desktop set to use unity as per default, but my application of choose to edit photos is digiKam. The problem is that digiKam has a very strange interaction with the global menu.

When you start digiKam the album view is showed, and all is ok. If you select a photo and choose "edit" (F4) all is working as it should, global menu is here.
But if you exit from the editor, select another photo, and enters the editor again (f4) the menu is gone. Nor global, nor local. You have to restart digiKam to have it back.
Starting with "UBUNTU_MENUPROXY= digikam" does not change anything.
Starting with "APPMENU_DISPLAY_BOTH=1 digikam" makes the program usable again; I will attach a screenshot where the local menu is visible and the global is missing (albeit being the cursor on the right spot, and the name of the application has hid away correctly).

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Here is the screenshot.

description: updated
Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi,

same Problem here on two machines. I am also interestet in a fix.

Ted Gould (ted)
affects: unity → appmenu-qt
Revision history for this message
Tim Penhey (thumper) wrote :

I also see this with Quassel, Konsole and KMail, so I'm guessing it is any QT menu.

Revision history for this message
Aurélien Gâteau (agateau) wrote :

I can't reproduce it here. Could you try this?

- Install libdbusmenu-tools

- Start digiKam

- Open a gnome-terminal

- Run:
  /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-before.json
  Cursor should turn into a crosshair, click digiKam window

- Reproduce the bug

- Go back to the terminal and run:
  /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-after.json
  Click on the menubar-less digiKam window

- Attach digikam-before.json and digikam-after.json to this bug report

Changed in appmenu-qt:
status: New → Incomplete
Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

reproducible here. Note that the problem is in the "image editor window", and only the second time you pop it up.
Could do only half of your instruction, got an error the second time:

(0)pern:~/software/bugs/digikam% /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-before.json
(0)pern:~/software/bugs/digikam% /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-after.json

** (dbusmenu-dumper:16577): 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
(1)pern:~/software/bugs/digikam

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi,
here is the file digikam-before.json

digikam-after.json is an empty file.

by running: /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-after.json

i got this output in the terminal:

** (dbusmenu-dumper:21026): 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

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Aurelien, do you need more info? the probem is easily reproduced here.

Omer Akram (om26er)
affects: unity (Ubuntu) → appmenu-qt (Ubuntu)
Revision history for this message
Aurélien Gâteau (agateau) wrote :

Thanks for the info, will try to reproduce again.

Changed in appmenu-qt:
status: Incomplete → New
Revision history for this message
stianst (stianst) wrote :

I've been having this problem as well. It seems like if both the main window and the editor are maximized the global menu doesn't disappear from the editor. If the editor is not maximized the global menu sometimes disappear straight away, and sometimes after opening/closing the editor a few times.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Another reason to advocate for global menu only for maximized windows --- see bug #794888

Revision history for this message
stianst (stianst) wrote :

My bad seems the editor menu disappears when maximized as well :(

Revision history for this message
Mark Baas (mark-baas123) wrote :

I am having the same issue in an application I am developing. Seems that switching (QMain)Windows causes the appmenu to get confused. I even tried rebuilding the menus after usually losing it, made no difference.

From the error the dbus-dumper gives, I assume that appmenu lost the window to which the menu belonged, so just as a workaround it would be very very usefull if you'd implement a method in appmenu-qt to force rebuild/associate of the menubar.

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

the Digikam editor is working when i turn off the global menu by starting digikam with

 QT_X11_NO_NATIVE_MENUBAR=1 digikam

but this wastes place on the display.

Changed in appmenu-qt (Ubuntu):
status: New → Confirmed
Revision history for this message
Hamish Downer (mishd) wrote :

I have now upgraded to Ubuntu 11.10. If I don't set any environment variable then I get the behaviour originally mentioned - the menu bar for the editor appears only the first time the editor is launched. However if I set either APPMENU_DISPLAY_BOTH=1 or QT_X11_NO_NATIVE_MENUBAR=1 then the digikam editor *never* has a menu item.

So at this point the only way I've found to launch the editor twice with menus is to quit digikam entirely. Which given the long amount of time digikam takes to start up is rather annoying.

Revision history for this message
Hamish Downer (mishd) wrote :

Just checked and

APPMENU_DISPLAY_BOTH=1 gedit

still works as you would expect. So it is not the case that the option to display the menu in the window has been taken away.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Uf --- if this is confirmed, could be an upgrade show-stopper for me.

In another bug, Aaron Roydhouse suggested two different tricks to get rid of the global menu:

  http://www.addictivetips.com/ubuntu-linux-tips/how-to-disable-global-menu-in-ubuntu-11-10-tip/
   Uninstall the global menus: sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt

  http://www.webupd8.org/2011/03/disable-appmenu-global-menu-in-ubuntu.html
    Set an environment variable: UBUNTU_MENUPROXY=0

Maybe one of this works? Anyone from digiKam developers listening?

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi,

after updating to Ubuntu 11.10 the described behaviour vanished magically.
I'm using digikam with global menue and everything is working fine in the moment.

But i agree with Hamish Downer, that it is in the moment not possible to start digikam without global menu.

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi,

i think i'm getting crazy.
Since updating Ubuntu from 11.04to 11.10 working with digikam ist fine. Yesterday iwrote it in my post and today the menu in the image Editor vanished again. Starting digikam with APPMENU_DISPLAY_BOTH=1 digikam does not change anything. digikam starts with global menue and the menue in the Imageeditor vanished while working.

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi all,

today i removed "appmenu-qt"
All applications based on qt will start now without lgobal menu.
All other apllications are starting with global menue furthermore.
Digikam is working now, but i rather like to have global menu.

Stefan

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

I can confirm that the problem is still here in 11.10. Nasty.

In my case it seems that using "QT_X11_NO_NATIVE_MENUBAR=1 digikam" to start the app works --- not nice, but a workaround.

Revision history for this message
Leonardo Silva Amaral (leleobhz) wrote :

Maybe a duplicated or same-reason-bug of https://bugs.launchpad.net/unity/+bug/775278 ?

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Now I have switched to gnome-shell, and I have a similar problem: when editing a photo, the editor comes out without menu nor statusbar. If you press two times ctrl-m you have the menu back, and if you disable/enable the statusbar, it comes out. It is impossible to minimize the windows.
All seems fixed by tge "trick" of "QT_X11_NO_NATIVE_MENUBAR=1 digikam".
Anyone working on this? I know that Gnome is not the native desktop for digikam, but I think these glitches should be fixed...

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Hmmm, no, the aforementioned trick does not reliably work. Sometime yes, sometime no. It has stopped working after I have changed digikam form a virtual desktop to another one. Could be related?

Revision history for this message
Aurélien Gâteau (agateau) wrote :

I think this bug is the same as https://bugs.launchpad.net/appmenu-qt/+bug/775278 . I have a PPA build fixing this: can any Precise user give a try to: https://launchpad.net/~agateau/+archive/appmenu-qt ? If it works I can build an Oneiric version as well.

Revision history for this message
Aurélien Gâteau (agateau) wrote :

More info: if this bug is really the same as https://bugs.launchpad.net/appmenu-qt/+bug/775278 then it should only happen on Unity (not KDE) and only if you keep the editor window closed for more than 5 seconds.

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi Aurelien,

i'm intersted to test the fix, but i have only oneiric systems i368 and amd64.
If you can build an oneirc package i will test it.

Revision history for this message
Roland Geider (menschenfresser) wrote :

It does look like the menu doesn't disappear if the editor window is closed less than 5 seconds

Revision history for this message
Aurélien Gâteau (agateau) wrote :

Package for Oneiric should start building in a few hours in the same PPA.

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi Aurelien,

your fix works fine on oneiric amd64.
I will test it tomorrow on i386

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

@Aurélien:

it works for me on oneiric i386, gnome shell. Thank you very much!
(BTW please tell on this bug report when we should "purge" the ppa and come back to the normal distro package! Thanks!)

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

Hi Aurelien

your patch ist working on oneiric i386 as well.
Do you wish some specila test?

Thank you for your work!

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Hands up. Unfortunately the editing windows stopped again working for me, using gnome-shell. Toolbox disappears, and now even the right-hand toolbox has disappeared and I cannot see it again.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

What happens is that the editor window is unable to exit from full-screen mode. If I select "exit full screen mode", the window flashes, than go back to full screen and menus disappears.
Maybe some interaction with unity compiz plugin, even if using gnome-shell? Will try and report.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Killed maximus, seems to work now.
Die maximus die.

Revision history for this message
Stefan Zeyen (stefan-zeyen) wrote :

i have no problems here using digikam with gnome-shell and i cant reproduce the bugs mentioned in comment #32 and #33, but i don't use maximus. Seems to be a problemt with maximus.

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.