Bug 420466

Summary: Mouse and Keyboard unresponsive when deleting large sized tree in Disk Usage
Product: [Applications] krusader Reporter: griffiths_andy
Component: disk-usageAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: davide, krusader-bugs-null
Priority: NOR    
Version First Reported In: 2.7.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description griffiths_andy 2020-04-23 15:48:54 UTC
SUMMARY
Identified a large amount of data to delete in the Disk Usage tool. Started delete op. I lose the use of the mouse and keyboard (with exceptions, see below), and I cannot alt-tab to any other running window, or click on any UI element. Other elements of the screen appear to continue working, e.g the clock still updates. I'm not sure if the delete is even running in the background, or why it should choose to lockup like this.

I can use the Win key to bring up the Plasma menu, but it only appears momentarily and then disappears.

I can Ctrl-Alt-F2 to a root shell and kill krusader. Then all returns to normal.

Deleting files via the main panel view does not suffer the same lockup, though is sometimes quite laggy. 

Smaller numbers of files seem to delete OK thru Disk Usage, but still take too long. The above example had me trying to troubleshoot for about 15 minutes before I gave up and rebooted, before I realised that it was Krusader actually causing the issue, because at first I wasn't aware it was related.

The total tree size I was trying to delete is only 4.9MB

STEPS TO REPRODUCE
1. Open Disk Usage
2. Select a large tree of files to delete
3. Delete, and the whole WM locks up, from my perspective
4. Ctrl-Alt-F2 to root terminal and kill Krusader
5. All returns to normal.

OBSERVED RESULT
Lockup of mouse buttons (mouse still moves). Keyboard also unresponsive, except as detailed above

EXPECTED RESULT
Delete should continue in the background

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Davide Gianforte 2020-04-27 12:43:22 UTC
This is a very old behavior, but I've never heard about before.

During deletion from Disk Usage tool, mouse and keyboard are disabled until completion to prevent "strange things".

Also, deletion is made in a way closer to the manual mode: run through each directory and delete all files in it, recurse into directories.

While those "strange things" may not be avoided, at least the deletion process should be faster (the code is 14 years old).

https://cgit.kde.org/krusader.git/tree/krusader/DiskUsage/diskusage.cpp#n629