Bug 421717 - On X11, Global Menu Disappears After Some Time using Qt Creator
Summary: On X11, Global Menu Disappears After Some Time using Qt Creator
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu widget (show other bugs)
Version: 5.18.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-18 06:54 UTC by Dashon
Modified: 2024-08-18 17:13 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot of disappearing Global Menu (159.50 KB, image/png)
2022-11-27 12:48 UTC, Kunshan Wang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dashon 2020-05-18 06:54:26 UTC
SUMMARY
Been trying to get into qt, but for some reason after an indeterminable amount of time the global menu simply disappears when using Qt Creator and any of it's derivative apps such as Qt Designer or what not. For now I've edited the desktop files to override the global menu.

STEPS TO REPRODUCE
1. Enable Global Menu
2. Open Qt Creator
3. Use it for a bit. I normally create a project and start using the designer

OBSERVED RESULT
After a few minutes or so, poof. It's just gone.

EXPECTED RESULT
For it to still be there when you need it.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20200515
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.1
Kernel Version: 5.6.12-1-default
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-7500U CPU @ 2.70GHz
Memory: 15.4 GiB of RAM

ADDITIONAL INFORMATION
I have my panel set to autohide if that may be of some use.
Comment 1 Kai Uwe Broulik 2020-05-18 08:22:53 UTC
Can you check whether the "kded5" process might have crashed?
Comment 2 Dashon 2020-05-18 08:28:47 UTC
(In reply to Kai Uwe Broulik from comment #1)
> Can you check whether the "kded5" process might have crashed?

How would I go about doing that. Is there a log that I can check?
Comment 3 Dashon 2020-05-18 08:30:08 UTC
(In reply to Kai Uwe Broulik from comment #1)
> Can you check whether the "kded5" process might have crashed?

Looking in system monitor it appears to still be running.
Comment 4 Dashon 2020-07-28 20:41:51 UTC
Also happens with libreoffice it seems.
Comment 5 Leyenda 2020-10-16 13:24:27 UTC
Running Qt Creator with Global Menu on x11, and no problem, Global Menu stays on place after some time of usage.

Not tested on Wayland.

SOFTWARE/OS VERSIONS
Operating System: KDE Neon 20.04
KDE Plasma Version: 5.20
KDE Frameworks Version: 5.75
Qt Version: 5.15
Kernel Version: 5.4.0-51
Comment 6 Kunshan Wang 2022-11-27 12:48:27 UTC
Created attachment 154080 [details]
Screenshot of disappearing Global Menu
Comment 7 Kunshan Wang 2022-11-27 12:52:55 UTC
See the screenshot in my attachment: https://bugs.kde.org/attachment.cgi?id=154080

I can reproduce this issue.  It is reproducible on both Qt Creator and Qt Designer when editing menus in dialogs.

=== Steps to reproduce: ===
0.  Ensure you have a "Global Menu" Applet in any of the panels, and it works properly for other applications, such as Konsole, Dolphin, etc.
1.  Open Qt Designer.  I am using Qt Designer 5.15.7

Now the menu of Qt Designer should already appear on the Global Menu applet.

2.  In the "New Form -- Qt Designer" window, select "Main Window" and click "Create".
3.  Double click the "Type Here" in the menu of the MainWindow being edited.
4.  Type any string, such as "foo".

At this moment the Global Menu applet still displays the menu properly.

5.  Press enter.

Now the menu in the Global Menu applet disappeared.  The Global Menu applet is now blank.

6.  Switch to a different window (using alt+tab, for example)

If that application (such as Konsole) has menu, it will appear now in the Global Menu applet.

7.  Switch back to Qt Designer

The Global Menu once again shows the proper menu of Qt Designer.

=== End of Steps to Reproduce ===

The same problem can be reproduced in QtCreator, too.  The difference is, once the Global Menu disappeared from QtCreator, it remains gone even if I switch to another window and back.  I have to restart QtCreator to make QtCreator show menu in Global Manu again.
Comment 8 Kunshan Wang 2022-11-27 13:17:31 UTC
Some more information:

I am using ArchLinux.
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 6.0.10-arch2-1
OS Type: 64-bit
Processors: 12 × Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 31.2 GiB of RAM
QtCreator version: 9.0.0

## More clues

While I was running Qt Designer and the Global Menu disappeared, I SSH-ed into my computer from another computer (so that I don't need to switch windows and interfere with the Global Menu) and issued the following command:

dbus-send --print-reply --dest=:1.282 /MenuBar/2 com.canonical.dbusmenu.GetLayout int32:0 int32:1 array:string:''

where ":1.282" is my Qt Designer instance.  It still lists the menus of Qt Designer.  So I think the Qt-level QMenuBar widget is still exporting the menu via D-Bus, but the Global Menu applet is not reading from the right place in D-Bus.

## Still more clues

After editing the menu in Qt Designer, the main window of Qt Designer itself seems to have lost focus.  The title bar that reads "Qt Designer" becomes grey, and the decoration buttons (minimize, maximize and close buttons) become grey, too.  And the window I am editing seems to have the focus.

I just need to let any dialog pop up, and the Qt Designer window will regain focus.  For example, I can click on the "open" button on the toolbar and the Global Menu appears again.

I guess editing the menu makes the Global Menu (or the window manager, or whatever) think the "Qt Designer" window is no longer the current/active/focused window.
Comment 9 Grant Byers 2022-12-20 12:03:39 UTC
I'm having the same issue on QT Creator 9.0.1.

Operating System: Garuda Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.12-zen1-1-zen (64-bit)
Graphics Platform: X11

Numerous ways to trigger. For example, within designer, SHIFT+ALT+R (preview). On close of the preview window, menu is gone & only way to recover is to restart the application.
Comment 10 Dashon 2024-07-02 03:53:39 UTC
Just an update, but I have been on Wayland for some time now and I don't believe I have had the issue on there.
Comment 11 Nate Graham 2024-08-09 20:51:46 UTC
Are you still able to reproduce it on X11?
Comment 12 Dashon 2024-08-09 21:20:12 UTC
(In reply to Nate Graham from comment #11)
> Are you still able to reproduce it on X11?

I'll grab an old laptop and find out for ya.
Comment 13 Dashon 2024-08-10 02:33:40 UTC
(In reply to Nate Graham from comment #11)
> Are you still able to reproduce it on X11?

I've had it running all day and haven't had the problem yet on x11. Perhaps someone else will chime in if they are still having the problem on Plasma 6.1.4
Comment 14 Kunshan Wang 2024-08-18 17:13:58 UTC
(In reply to Nate Graham from comment #11)
> Are you still able to reproduce it on X11?

I was using X11 when I posted https://bugs.kde.org/show_bug.cgi?id=421717#c7.  But I am using Plasma Wayland now and I can't reproduce the bug as described in https://bugs.kde.org/show_bug.cgi?id=421717#c7 when running Qt Designer directly.  But I can still reproduce it using those steps if I run `QT_QPA_PLATFORM=xcb designer6`.  That may not be the same bug as Dashon described because I don't need to run Qt Designer for any "indeterminable amount of time".

I guess it is related to https://bugs.kde.org/show_bug.cgi?id=483075 because the thing in common is that when the Global Menu disappears, no window is highlighted in the Icons-only Task Manager.  However, when using Plasma Wayland, the Qt Designer window remain selected in the Icons-only Task Manager after step "5.  Press enter.".