Bug 497434

Summary: Applying changed view properties as default doesn't work, applying them for all subdirectories takes way too much time and Dolphin reports monstrous number of subdirectories
Product: [Applications] dolphin Reporter: Łukasz Konieczny <ftefrjbhfvasf32>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: daanturo, kfm-devel, p.r.worrall
Priority: NOR    
Version: 24.12.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Monstrous amount of reported subdirectories in Dolphin during the operation of changing view properties

Description Łukasz Konieczny 2024-12-13 22:50:35 UTC
Created attachment 176587 [details]
Monstrous amount of reported subdirectories in Dolphin during the operation of changing view properties

SUMMARY
After update to KDE Gear 24.12, I have noticed new default view properties to show thumbnails even in system directories, like / and /usr/lib/
I wanted to change that. I commanded Dolphin to apply new default view properties to not show thumbnails. I didn't work. All directories, be it system or directories in /home/, still showed thumbnails. Then I tried to change view properties in / and all its subdirectories. It took monstrous for this operation amount of time, notably half an hour, and Dolphin showed, that / has about 2 000 000 subdirectories, which is impossible, because I know, that even number of files in / is equal to about 600 000, so this filesystem can't have 2 000 000 items. Then, when this operation finished, I checked my home directory. It still had thumbnails enabled (and showing directories first, which I dislike). So I repeated the operation for my home directory. This time Dolphin showed about 8 000 000 subdirectories, which is way more impossible. This operation already lasts 45 minutes, while I'm writing this bug report.

STEPS TO REPRODUCE
1. Try to change default view properties or change view properties for the directory subtree.
2. Observe the result.

OBSERVED RESULT
No result of changing default properties. Long time of changing properties for subtrees.

EXPECTED RESULT
Everything works for short time, number of subdirectories is accurate, when I want to change default view properties, this properties are applied to all directories without explicitly changed properties.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.12.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Xe Graphics
Manufacturer: System76
Product Name: Darter Pro
System Version: darp7

ADDITIONAL INFORMATION
Comment 1 Łukasz Konieczny 2024-12-14 11:47:31 UTC
Similar problem with directory counting is in Filelight. And in Properties dialog window in Dolphin. Counting subdirectories never finishes.
Comment 2 Paul Worrall 2024-12-14 15:58:14 UTC
Looks like two separate bugs:
1. For the setting of default view properties: Already reported, see bug #495878
2. For the number of subdirectories, could it be something like a sub-folder containing a symbolic link to one of its parents (i.e. a loop)?  What does `find $HOME -type d | wc -l` report for the number of sub-folders?
Comment 3 Łukasz Konieczny 2024-12-14 16:45:27 UTC
(In reply to Paul Worrall from comment #2)
> Looks like two separate bugs:
> 1. For the setting of default view properties: Already reported, see bug
> #495878
> 2. For the number of subdirectories, could it be something like a sub-folder
> containing a symbolic link to one of its parents (i.e. a loop)?  What does
> `find $HOME -type d | wc -l` report for the number of sub-folders?

I executed your command and I do have such amount of subdirectories. But I don't have in my backup on external drive! So I did an investigation and found, that almost all of these subdirectories are stored in /home/panlukasz/.local/share/dolphin/view_properties/local/home/panlukasz/.local/

This is inception! Bug in Dolphin! When I tried to change view properties in my home directory, Dolphin tried to change these properties also in hidden directories, including directory, in which it stores information about view properties. So it created directory structure for ~/.local/ in ~/.local/share/dolphin/view_properties/local/home/panlukasz/
And it did so recursively, making very deep directory structure
Comment 4 Bug Janitor Service 2024-12-29 03:47:23 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!