Bug 442187 - Smb4K 3.1.0 still has frustrating, old usability glitches and bugs (explained in description). Kills usability.
Summary: Smb4K 3.1.0 still has frustrating, old usability glitches and bugs (explained...
Status: CONFIRMED
Alias: None
Product: Smb4k
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Reinholdt
URL:
Keywords:
Depends on: 442877
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-08 18:07 UTC by flan_suse
Modified: 2023-03-25 22:55 UTC (History)
1 user (show)

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


Attachments
greyed-out-mounted-shares-tray-icon (101.53 KB, image/png)
2021-10-19 23:51 UTC, flan_suse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description flan_suse 2021-09-08 18:07:47 UTC
SUMMARY:

Even before using version 3.1.0, SmbK4 has, and continues to suffer from the same GUI glitches that are not simply "aesthetic" but also break mounts and basic usage.

These *continue* to be an issue on multiple computers, Intel and Nvidia GPU, latest stable KDE branch.

I believe the reason they were never submitted as "bugs" is because it's hard to really provide a "crash" or debug logs. It's all in the behavior of Smb4K. There's no distinctive pattern. (I'm hoping the developers might be able to clue in on something.)

These glitches involves "phantom" mounts that don't show up in Smb4K's tray menu nor main window, nor menu bars; yet they exist in the mtab (proven by invoking "mount" in a terminal) and in Dolphin's shortcuts.

These glitches involves "Unmount All" and "Unmount" being greyed out in the tray context menu, yet working normally from the main window.

These glitches affect bookmarks (not truthfully displaying which ones are available.)


---


SYSTEM INFORMATION:

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.14.0-0-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Smb4K: 3.1.0

(The same exact glitches and breakages also happen on a different computer running Nvidia graphics.)


---


I can demonstrate with videos and screenshots if needed.

I can explain how to look out for these glitches yourself.

I can provide logs if applicable.

However, I think if a developer experiences these themselves, it will make more sense than simply trying to explain it.


---


DESCRIPTION:

* Occasionally (and I'd argue "too often" for an application that deals with SMB network shares), currently mounted shares will show up in Dolphin and the mtab, yet are NOT displayed in Smb4K's main window nor tray context menu. There is NO MEANS to unmount the share(s) by using Smb4K. You either have to completely quit the application or use admin privileges to manually unmount them in a terminal.

* Occasionally, the tray icon context menu does NOT reflect what the main window displays. For example, if I have shares currently mounted (which ARE visible in the main window), they do NOT show up in the tray icon menu. If I wish to browser them or unmount them, I must do it from the main window, since the current mounts in the tray icon are either greyed out or missing!

* Almost always it's glitchy to use the tray icon context menu, since hovering over bookmarks doesn't reveal anything... until I move my mouse cursor up and down to get Smb4K to go "Oh! Right... your bookmarks... okay here they are!" Why the delay and ritual? Why not just immediately present me with the list of my bookmarks? It's as if moving up and down the context menu forces the loading of entries in a sub-menu.

* The above glitches affect overall usage and stability of using your desktop, since they deal with mounts. Things are greyed out or missing when they shouldn't be. Nothing obviously indicates whether or not a share is currently mounted. The only way to know for sure is to run "mount" in a terminal. I often have to fully quit and re-launch Smb4K to "shake off" some glitches when they occur.


--- 


It's been like this for a while, well before 3.1.0, so my hunch tells me it's to do with base code that the updates were built on top of? I waited until after 3.1.0 was released, due to reading developer notes how 3.1.0 would introduce some big changes. I figured it was being re-coded from the ground up and naturally these bugs would not be an issue anymore.
Comment 1 Alexander Reinholdt 2021-09-09 08:54:31 UTC
Thank you for reporting this. I will try to reproduce and fix the listed issues as soon as possible.
Comment 2 flan_suse 2021-09-18 18:42:51 UTC
Video #1, more to come!

I can only record these when the bugs randomly occur. This is one of many examples (of which I went into more detail in my initial post above.)

https://imgur.com/a/wjd6vch

What you see here is I cannot even mount shares anymore; not from the main window, not from the try, not from bookmarks, not from mount dialog.

The entire program freezes! And when I check "mounts" in the terminal, no such mount for the SMB share exists.

I cannot click on any buttons in the Smb4K application. I can still use my computer normally, just not Smb4K. The only way to exit is to either use the tray icon or send a "kill" command.

Once this bug is triggered, I must log out of  KDE completely if I want to be able to use Smb4K again! I cannot simply re-launch the program. If I do, and I try to mount a share, the same freeze happens. :(

Once again, I believe these are long-lived bugs that have to do with some of the older core code. The same issues existed prior to version 3.1.
Comment 3 Alexander Reinholdt 2021-09-20 14:45:33 UTC
Thank you for providing the video.

Does the freeze only happen after mounting (unmounting) some shares? Or also when no shares at all have been mounted (or unmounted) before?
Comment 4 flan_suse 2021-09-20 18:30:24 UTC
(In reply to Alexander Reinholdt from comment #3)
> Thank you for providing the video.
> 
> Does the freeze only happen after mounting (unmounting) some shares? Or also
> when no shares at all have been mounted (or unmounted) before?

That particular video was if I tried to mount *any* share, whether from Bookmarks or manually with the Mount Dialog. I had no previously mounted shares. (I recorded a short video, since to show every combination would have resulted in a lengthy video.)

To confirm this was not a CIFS/SMB issue, I could still successfully mount my shares in the command line manually using "mount -t cifs".

Exiting and re-opening Smb4K did not resolve this issue. It wasn't until I logout and log back in (or reboot the PC) that I could start using Smb4K normally again.

When the other issues occur, I'll try to have a video screencapture ready.

Ironically, the video showed one of the less common bugs.

The more common ones are:

* tray icon context menu does not reflect main window

* displaying Bookmarks from the tray icon requires you to move the mouse cursor up and down to force the list to display

* "phantom" mounts that show up in the main window, yet don't exist in mtab nor are they *really* mounted. Quitting Smb4K is the only way to fix the main window showing fake mounts
Comment 5 flan_suse 2021-09-20 22:19:19 UTC
Video #2: Tray-icon doesn't reveal Bookmarks unless you "dance" with the mouse cursor either by moving over the Bookmarks menu, moving it away, and then moving it back, or by simply exit the tray context menu and trying it again.


https://imgur.com/a/WGs2NP9


Sometimes it takes *extra* attempts and an even *longer* delay than what you see in the video capture.

The same phenomenon happens with the "Mounted Shares" menu. So it's not exclusive only to the "Bookmarks" menu.
Comment 6 flan_suse 2021-09-20 22:24:19 UTC
UPDATE ON VIDEO #2:

This issue doesn't exist if I move my system tray to the LEFT SIDE of my panel.

So it seems that when you first hover the mouse cursor over the "Bookmarks" or "Mounted Shares" menu, it expands it "off screen" on the right side. But when you dance with the mouse and try again, it correctly identifies that there is no "viewable area" to the right, so it correctly presents the sub-menu to the left.

When I try again with the KDE system tray on the left of the panel, then there's no issue since it defaults to expanding the sub-menu to the right side where there is plenty of visible space. :)

I hope that helps narrow down that particular issue with the system tray.

(This only concerns a very specific issue which has nothing to do with the other video and list of bugs in the initial report.)

More videos to come, ask if there's any more information I can provide!
Comment 7 Alexander Reinholdt 2021-09-22 07:16:42 UTC
Git commit 2a98352625ecdde057e19cd6e4f8dc63a9879d04 by Alexander Reinholdt.
Committed on 22/09/2021 at 07:14.
Pushed by areinholdt into branch 'master'.

Implement a non-blocking sleep to wait for the shell process to finish.

M  +12   -2    helpers/smb4kmounthelper.cpp

https://invent.kde.org/network/smb4k/commit/2a98352625ecdde057e19cd6e4f8dc63a9879d04
Comment 8 Alexander Reinholdt 2021-09-22 07:56:19 UTC
(In reply to flan_suse from comment #6)

I did some testing with other applications that implement a status icon via KStatusNotifierIcon and also have submenus. Yakuake, for example, shows the same glitch you reported. So it seems that the problem lies within the systemtray itself. However, the trash icon seems to behave correctly.

I will have a look on how to fix or work around the problem. Maybe the code of the trash icon helps.
Comment 9 flan_suse 2021-09-22 14:14:29 UTC
Glad we could narrow down the submenu issue. =)

> Git commit 2a98352625ecdde057e19cd6e4f8dc63a9879d04 by Alexander Reinholdt.

Since I'm by no means a developer, is that commit in related to the submenu issue, or the freeze issue from video #1?

(I still have more videos to capture, related to the other issues. The most concerning one is the "phantom mounts" and the mis-match between what the main window claims is mounted vs. what the tray claims is mounted.)
Comment 10 Alexander Reinholdt 2021-09-23 06:15:47 UTC
(In reply to flan_suse from comment #9)
> Glad we could narrow down the submenu issue. =)
> 
> > Git commit 2a98352625ecdde057e19cd6e4f8dc63a9879d04 by Alexander Reinholdt.
> 
> Since I'm by no means a developer, is that commit in related to the submenu
> issue, or the freeze issue from video #1?

This is related to the freeze. I changed the way the mount helper waits for the mount process to finish. Now, the application should net freeze anymore even if the mount process hangs. Also, I implemented an automatic termination after 5 seconds, in case a process hangs.
Comment 11 Alexander Reinholdt 2021-09-23 08:38:58 UTC
Git commit 1856b7c9fe046189ba3952ab89ba7ec5fbac7473 by Alexander Reinholdt.
Committed on 23/09/2021 at 08:37.
Pushed by areinholdt into branch '3.1'.

Merge changes made to the mount helper from master into 3.1.

M  +212  -252  helpers/smb4kmounthelper.cpp
M  +4    -4    helpers/smb4kmounthelper.h

https://invent.kde.org/network/smb4k/commit/1856b7c9fe046189ba3952ab89ba7ec5fbac7473
Comment 12 Alexander Reinholdt 2021-09-24 06:38:44 UTC
(In reply to flan_suse from comment #9)
> Glad we could narrow down the submenu issue. =)

I did not find a way to convince the submenus to always open on the correct side. I will open a bug report against KStatusNotifierItem.
Comment 13 Alexander Reinholdt 2021-09-28 16:02:21 UTC
The problem with the freezing main window should be fixed in Smb4K 3.1.1. Could you please confirm this?
Comment 14 flan_suse 2021-09-28 16:55:37 UTC
(In reply to Alexander Reinholdt from comment #13)
> The problem with the freezing main window should be fixed in Smb4K 3.1.1.
> Could you please confirm this?

I'm unable to get it to freeze again. I'll let you know if it happens, but so far it seems snappy and consistent. =) Awesome!

---

As for the tray icon context menu, hopefully the upstream bug gets fixed.

---

There's still the issue of inconsistent tray versus main window, which I will capture on video when it happens again.
Comment 15 flan_suse 2021-10-19 23:51:20 UTC
Created attachment 142640 [details]
greyed-out-mounted-shares-tray-icon

>These glitches involves "Unmount All" and "Unmount" being greyed out in the tray context menu, yet working normally from the main window.

Since this bug is less predictable compared to the others, it's tricky to catch in real-time. However, this is what it looks like.

(I will also attach the screenshot to the bug report.)


---


The test share is not in my Bookmarks. I manually go to the Tray -> right-click -> Open Mount Dialog

It mounts correctly.

Browseable with Dolphin.

Works from the Smb4K Main Window.

However, you will notice "Mounted Shares" from the Tray icon is "greyed out" as if nothing is currently mounted.

This screenshot was taken with Smb4K version 3.1.1.
Comment 16 Alexander Reinholdt 2021-10-23 05:39:36 UTC
(In reply to flan_suse from comment #15)
> The test share is not in my Bookmarks. I manually go to the Tray ->
> right-click -> Open Mount Dialog
> 
> It mounts correctly.
> 
> Browseable with Dolphin.
> 
> Works from the Smb4K Main Window.
> 
> However, you will notice "Mounted Shares" from the Tray icon is "greyed out"
> as if nothing is currently mounted.
> 
> This screenshot was taken with Smb4K version 3.1.1.

Thank you for providing the screenshot. I could reproduce this issue in the meantime and will search for the error now.
Comment 17 Alexander Reinholdt 2021-10-27 04:09:31 UTC
(In reply to flan_suse from comment #15)
> Created attachment 142640 [details]
> greyed-out-mounted-shares-tray-icon
> 
> >These glitches involves "Unmount All" and "Unmount" being greyed out in the tray context menu, yet working normally from the main window.
> 
> Since this bug is less predictable compared to the others, it's tricky to
> catch in real-time. However, this is what it looks like.

This bug is quite nasty. I thought I fixed it here and now it reappears with the refactored / reworked code as well.

I have got the impression that it only appears when the main window is minimized, the shares menu has never been opened before in the tray's popup menu and the first share is mounted. Is that also your experience?
Comment 18 flan_suse 2021-10-27 18:36:55 UTC
(In reply to Alexander Reinholdt from comment #17)

> Is that also your experience?

Not always. I'm trying to find a clear pattern, but it's more random than I first assumed. :(

It can happen when the Main Window is minimized (or hidden to tray), but sometimes it will not happen.

At first I thought it was unique to non-bookmarked shares, but it can happen to any share.

I'm going to try some more tests on my end.

If you discover a pattern or hint, I can try to re-produce it on my end as well. (I'm using two different PCs, one with Intel Iris Xe GPU and the other with Nvidia GPU, and Smb4K behaves the same way on both computers.)
Comment 19 Alexander Reinholdt 2021-11-02 05:42:27 UTC
Continuing my tests, I found out that the shares are obviously correctly added to the menu (the number of actions in the menu is correct), but they are not displayed. What causes this issue, I haven't found out yet, though. Even repainting the whole menu did not fix it. I suspect that I am missing something...
Comment 20 flan_suse 2021-11-02 13:28:43 UTC
(In reply to Alexander Reinholdt from comment #19)

Could it be due to something upstream (Qt / KDE)?

However, I have never noticed this behaviour anywhere else except for Smb4K, so it might not be upstream.
Comment 21 Alexander Reinholdt 2021-11-03 05:38:37 UTC
Git commit 092fdfaf0ba32f3d7774a7a78d71d02c65f4e9e9 by Alexander Reinholdt.
Committed on 03/11/2021 at 05:38.
Pushed by areinholdt into branch 'master'.

To fixed a display glitch in the shares menu, where the first mounted share might not be shown.
Refactored code on the way.

M  +186  -102  smb4k/smb4ksharesmenu.cpp
M  +29   -4    smb4k/smb4ksharesmenu.h

https://invent.kde.org/network/smb4k/commit/092fdfaf0ba32f3d7774a7a78d71d02c65f4e9e9
Comment 22 Alexander Reinholdt 2021-11-03 05:43:09 UTC
(In reply to flan_suse from comment #20)
> (In reply to Alexander Reinholdt from comment #19)
> 
> Could it be due to something upstream (Qt / KDE)?
> 
> However, I have never noticed this behaviour anywhere else except for Smb4K,
> so it might not be upstream.

After further testing, it became obvious to me that the shares menu was not correctly resized. The code now forces an adjustment of the size each time a share is mounted and added to the menu. So far, I did not see the glitch anymore.

I committed the code to master and will backport it to the 3.1 branch soon.
Comment 23 Alexander Reinholdt 2021-11-12 06:19:10 UTC
Git commit 0187849ec06324ec37ac3fc0da4bd9cad2e863d5 by Alexander Reinholdt.
Committed on 12/11/2021 at 06:18.
Pushed by areinholdt into branch 'master'.

Refactored the bookmark menu to overcome the same glitch the shares menu suffered from.
This is still work in progress.

M  +11   -10   core/smb4kbookmarkhandler.cpp
M  +14   -0    core/smb4kbookmarkhandler.h
M  +506  -249  smb4k/smb4kbookmarkmenu.cpp
M  +42   -12   smb4k/smb4kbookmarkmenu.h

https://invent.kde.org/network/smb4k/commit/0187849ec06324ec37ac3fc0da4bd9cad2e863d5
Comment 24 Alexander Reinholdt 2021-11-15 18:00:37 UTC
Git commit 0f4e619c94f6591f988e27d5afb40e076dc1e173 by Alexander Reinholdt.
Committed on 15/11/2021 at 18:00.
Pushed by areinholdt into branch 'master'.

Further improved code of the bookmark and the shares menu.

M  +11   -16   smb4k/smb4kbookmarkmenu.cpp
M  +12   -17   smb4k/smb4ksharesmenu.cpp

https://invent.kde.org/network/smb4k/commit/0f4e619c94f6591f988e27d5afb40e076dc1e173
Comment 25 Alexander Reinholdt 2021-11-18 20:46:34 UTC
Git commit 14f06271f5e6a8939258d22574b23f3f253cf7e3 by Alexander Reinholdt.
Committed on 18/11/2021 at 20:46.
Pushed by areinholdt into branch 'master'.

Implement a better fix for bug 442187: Process all events after the shares / bookmarks
were added.
Fix null pointer access crash in the bookmarks menu.
Applied clang-format.

M  +33   -30   smb4k/smb4kbookmarkmenu.cpp
M  +1    -1    smb4k/smb4kbookmarkmenu.h
M  +10   -10   smb4k/smb4ksharesmenu.cpp

https://invent.kde.org/network/smb4k/commit/14f06271f5e6a8939258d22574b23f3f253cf7e3
Comment 26 Alexander Reinholdt 2021-12-06 05:03:44 UTC
Git commit 50ada05e1220584bfa492678a9e502c16f359134 by Alexander Reinholdt.
Committed on 06/12/2021 at 05:03.
Pushed by areinholdt into branch 'master'.

It seems that menu()->adjustSize() is needed to avoid the nasty display glitch.

M  +2    -0    smb4k/smb4kbookmarkmenu.cpp
M  +2    -0    smb4k/smb4ksharesmenu.cpp

https://invent.kde.org/network/smb4k/commit/50ada05e1220584bfa492678a9e502c16f359134