hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.77k stars 446 forks source link

mate-panel will restart with copyq #1201

Closed jing2uo closed 5 years ago

jing2uo commented 5 years ago

Describe the bug

mate-applet-appmenu can provide global menu on mate-panel, but when I open copyq, mate-panel will restart very often. copyq will lost focus, I cant select any item (

To Reproduce Steps to reproduce the behavior:

  1. add mate-applet-appmenu to mate-panel
  2. open copyq
  3. select any item
  4. See error

Expected behavior copyq work normal with appmenu

Screenshots

The screenshot is not convenient to see the problem, I recorded this video...

2019-08-22 10-44-29.flv.zip

Version, OS and Environment (Get details from copyq version command if possible.)

Additional context copyq and mate-panel work fine when appmenu-applet was deleted.

there is some log in ~/.xsession-errors :

https://gist.github.com/jing2uo/73717ae774f0bf08e1e9eb8e26f88524

hluk commented 5 years ago
  1. add mate-applet-appmenu to mate-panel
  2. open copyq

What's mate-applet-appmenu? Can you explain in more details how to reproduce this?

I see tray icon in the panel but don't experience any issues when opening menu or main window.

This is probably an issue in Mate tray icon/menu integration (or in Qt framework).

jing2uo commented 5 years ago

mate-applet-appment will provide global menu, like os x ,all applications's menu will display on the top panel. repo: https://github.com/rilian-la-te/vala-panel-appmenu

if you have debian+mate environment, this is the steps to reproduce :
1 .apt install mate-applet-appmenu appmenu-qt appmenu-gtk2-module appmenu-gtk3-module appmenu-gtk-module-common

  1. right click on the mate-panel, add to panel .... select global menu
  2. open copyq ,you will find the menu is on mate-panel, not copyq's main window, looks like this: image
  3. when select any item in copyq , mate-panel will restart very often. tray icon is ok, but whole mate-panel will open-close-open-close …

I am sorry that my English is not good. CopyQ is awesome and greatly helped me, thanks for your work !

jing2uo commented 5 years ago

Other QT5 applications works normal , like Virtualbox goldendict vlc zeal ...

hluk commented 5 years ago

Thanks for detailed description.

I cannot reproduce this on Ubuntu 18.04 -- most probably different component versions and theming.

image

What do you see in the context menu (when you right click a clipboard item in CopyQ)? The Item menu contains basically the same entries.

I am inclined to close this issue since it's problem with some other component related to appmenu.

hluk commented 5 years ago

Oh, never mind, I can reproduce the crashes occasionally, I'll try to investigate further.

hluk commented 5 years ago

Looks like /usr/lib/mate-panel/appmenu-mate crashes when the menus contain separators (maybe at some point when these are being removed).

Not sure what to do with this - looks like this needs to be fixed elsewhere.

jing2uo commented 5 years ago

Can the log in ~/.xsession-errors provide some help?

https://gist.github.com/jing2uo/73717ae774f0bf08e1e9eb8e26f88524

hluk commented 5 years ago

Can the log in ~/.xsession-errors provide some help?

Nope. As I mentioned the workaround would be to remove separators in menus which would make the menus less clear.

You better report the bug for vala-panel-appmenu.

jing2uo commented 5 years ago

image Is this the separator you said?

hluk commented 5 years ago

Is this the separator you said?

Yes. If I remove it from menu [1] everything seems to work.

[1] I.e. remove all addSeparator() calls.

jing2uo commented 5 years ago

I check the menu of chromium / goldendict / caja, these apps also have the separators..

hluk commented 5 years ago

Yeah, I noticed that also Qt Creator has also menus with separators. Perhaps the important difference is that in CopyQ the Item menu is dynamic so sometimes (e.g. selecting other clipboard item or tab) the menu is cleared and the menu entries with separators are created again.

hluk commented 5 years ago

Seems like there is some data race in the appmenu (it's constructing the menu while CopyQ is updating it).

jing2uo commented 5 years ago

So, should I submit a bug to appmenu ? or, you will fix this . 🏵️

hluk commented 5 years ago

So, should I submit a bug to appmenu ? or, you will fix this .

If you can, please submit bug report for appmenu. I really have no idea how to fix this in CopyQ, unless I just remove all menu separators (and that's not a good idea).

hmnd commented 4 years ago

@jing2uo Did you end up creating a bug report for appmenu perhaps? If so, could you link it please? I appear to be experiencing the same issue now with budgie-panel.

pa-0 commented 2 months ago

FYI looks like this was fixed in the vala-panel source: Vala-Panel Commits