Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.54k stars 43 forks source link

High delay when invoking the KDE right click menu for the first time after login on Arch #182

Closed PABLEXWorld closed 1 year ago

PABLEXWorld commented 1 year ago

Relevant components

Environment and versions

Bug description The right-click menu on the KDE desktop takes a long time to appear (up to 16 seconds), and causes the entire plasmashell interface to stop responding the first time it is invoked. Disabling "Trigger Syncthing scan" service in Dolphin context menu settings fixes it, and allows the menu to load instantly.

Steps to reproduce

  1. Enable Trigger Syncthing scan service in Dolphin
  2. Reload plasmashell (plasmashell --replace works)
  3. Right click any desktop icon as soon as the desktop appears

Expected behavior Right click menu loads instantly regardless of settings.

Martchus commented 1 year ago

I can't reproduce this. In my case the Syncthing action doesn't show up at all when right-clicking on a desktop icon and thus also doesn't cause a delay. I'm not sure how I'd enable showing the action there even if I wanted. In Dolphin itself I have the action enabled and it works. I've been testing this on openSUSE Tumbleweed and not Arch Linux but it currently has the same KDE and Frameworks versions so this shouldn't matter.

So there are two strange things:

  1. The action shows up in Plasma (and not just Dolphin).
  2. The action blocks the event loop for multiple seconds. Everything that should take longer (e.g. waiting for Syncthing itself) is done asynchronously so that's rather strange.

Does it also take long to load within Dolphin? What's the stderr/stdour of plasmashell as of step 3?

PABLEXWorld commented 1 year ago
  1. In Plasma, after the menu finally appears, the Syncthing menu does appear, and shows either "Syncthing - connecting" or just "Syncthing". But there's no submenu (and the right arrow is missing). After that it no longer shows up on subsequent right clicks.
  2. Dolphin's right click menu works properly, with the submenu available and it loads correctly without delay.
  3. This issue happens to me on both of my two computers, both of them running Arch.

Plasmashell console output below:

[pablexworld@PABLEX-PC ~]$ plasmashell --replace Checking screens: available: (QScreen(0x55a239382290, name="eDP-1")) redundant: QHash() fake: QSet() all: (QScreen(0x55a239382290, name="eDP-1")) kf.plasma.quick: Applet preload policy set to 1 org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job , QUrl) file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:325:17: QML Label: Binding loop detected for property "width" file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:325:17: QML Label: Binding loop detected for property "width" file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:325:17: QML Label: Binding loop detected for property "width" QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job , QUrl) file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:47: TypeError: Cannot read property 'location' of null file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:48: TypeError: Cannot read property 'location' of null file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:49: TypeError: Cannot read property 'location' of null file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:46: TypeError: Cannot read property 'location' of null Failed to register unity service qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. file:///usr/share/plasma/plasmoids/org.kde.plasma.kicker/contents/ui/CompactRepresentation.qml:42: TypeError: Cannot read property 'height' of null file:///usr/share/plasma/plasmoids/org.kde.kscreen/contents/ui/main.qml:30:5: Unable to assign [undefined] to bool Cyclic dependency detected between "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml" and "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/ThumbnailStrip.qml" Cyclic dependency detected between "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml" and "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationHeader.qml" file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml:95: TypeError: Cannot read property 'airplaneModeAvailable' of null org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor" file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment" file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment" file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment" file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment" file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment" file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"

(right click performed)

Cannot initialize model with data QJsonObject(). missing: QJsonValue(string, "urls") Unable to load translation file for "qtutilities" and locale "es_AR". Unable to load translation file for "syncthingconnector" and locale "es_AR". Unable to load translation file for "syncthingmodel" and locale "es_AR". Unable to load translation file for "syncthingfileitemaction" and locale "es_AR". Info: Syncthing config loaded from "/home/pablexworld/.config/syncthing/config.xml" kf.kio.widgets: The "Trigger Syncthing scan" plugin still installs the desktop file for plugin loading. Please use JSON metadata instead, see KAbstractFileItemActionPlugin class docs for instructions. org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout

qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 7 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 26 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 58 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 50 times)

Both point size and pixel size set. Using pixel size. file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/Tooltip.qml:69:9: QML GridLayout (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth" org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 34 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 110 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 102 times)

Both point size and pixel size set. Using pixel size. org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 34 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 162 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 154 times)

Both point size and pixel size set. Using pixel size. org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 34 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 214 times)

qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qt.svg: Cannot open file '/usr/share/icons/Humanity/devices/48/printer.svg', because: No such file or directory qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. (last line repeated 206 times)

Both point size and pixel size set. Using pixel size. QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)

(menu loads)

QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)

PABLEXWorld commented 1 year ago

Minimal VirtualBox VM that reproduces the issue: https://drive.google.com/file/d/1Xi-aGeUechejASI-CxpMMmhvcqwmV9Uh/view?usp=share_link I don't know why the test VM plasmashell blocks for less time compared to my (admittedly more bloated) real systems.

Martchus commented 1 year ago

I've just been booting up my Arch system and I can reproduce the problem there as well. I have no idea what's different between openSUSE Tumbleweed and Arch Linux in that regard. (Likely nothing and it is just the config. I just don't know which part of it.)

Martchus commented 1 year ago

I should have said I can reproduce the menu showing up at all¹. However, it is not slow. It also loads correctly, except for being empty all of the time because the .desktop files aren't considered local files by KFileItem and thus the plugin bails out from doing any further processing. It will establish and maintain a connection to Syncthing, though. I have playing around with the debugger and it doesn't look like there's a difference between whether the plugin is loaded in Dolphin or plasmashell except that it "only" gets .desktop files.

¹ And it only shows when opening the first context menu because suppressing it in case it would be empty anyways also works as expected. Maybe I've just missed that when testing on Tumbleweed.

PABLEXWorld commented 1 year ago

I haven't found what makes the delay be faster or slower, but on both my main computers, it takes 15 seconds to break free, while with the integration turned off, the menu loads instantly.

It's weird, because when I made the test VM to check if I could make a repro environment, it also loaded much faster there than on the host system.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.