Bug 457532 - Stop generating thumbnails for broken/incomplete files
Summary: Stop generating thumbnails for broken/incomplete files
Status: CONFIRMED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: 22.04.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-05 17:58 UTC by Lemuel Simon
Modified: 2023-01-28 17:21 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lemuel Simon 2022-08-05 17:58:35 UTC
SUMMARY
Currently, the generator will endlessly attempt to make thumbnails for pictures or videos that are corrupted or currently downloading. Downloading a video and looking at the file (while downloading) in Dolphin skyrockets CPU usage and abuses I/O bandwidth, making HDD users' system practically unusable unless they exit the program (Dolphin, File Picker,etc). Can a timeout be implemented as a safeguard?


STEPS TO REPRODUCE
1. Open Dolphin or File Picker with thumbnails enabled.
2. Go to a directory with images/videos.
3. Find at least one broken image.

OBSERVED RESULT
If there is at least one broken image, the thumbnailer will abuse the CPU and Disk I/O, freezing the computer indefinitely.

EXPECTED RESULT
In the event of a broken image, try loading a preview for a set amount of time (5~10 seconds?) before displaying a 'broken image' placeholder and cancelling the operation.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.14.21-150400.24.11-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3320M CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000
Manufacturer: LENOVO
Product Name: 2347G2U
System Version: ThinkPad T430

ADDITIONAL INFORMATION
One could argue that the proposed behavior would be bad for slower media (SMB, Optical Media, etc), but I'm thinking that the logic can be applied specifically to images that 'fail' to be parsed/loaded correctly (if that is even possible).