Bug 202960 - Dolphin generates thumbnails for images larger than the preset limit
Summary: Dolphin generates thumbnails for images larger than the preset limit
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 15:14 UTC by Falk
Modified: 2009-08-14 21:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Falk 2009-08-07 15:14:50 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Ubuntu Packages

Dolphin tries to generate preview images even if the image is larger as the preset limit, when the information sidebar is enabled.
In my case the images are 2Gb in size. Due to this bug kio_thumbnail uses the whole RAM and swap space trying to the generate a preview for the images. This brings the whole system down to a crawl and it can only be recovered by the OOM killer.

This bug was introduced with the newest KDE release.

Way to reproduce:

1. Click on a folder with images greater than the preset preview image size.
2. Press F11 to show the Informationsidbar.
3. Have a top open to see how kio create thumbnails even if the images are to large

Expected Behaviour

No thumbnails should be generated for images larger than the limit.
Comment 1 Peter Penz 2009-08-13 22:59:08 UTC
Thanks for the report! I cannot reproduce this issue when previewing image files (the size limit is respected in the Information Panel, the tooltips and the views). The size limit is only ignored when creating image previews for directory thumbnails, which is a bug - did you mean this?
Comment 2 Peter Penz 2009-08-13 23:39:35 UTC
SVN commit 1011074 by ppenz:

Respect the maximum file size when creating thumbnails for directories.

BUG: 202960

 M  +11 -2     thumbnail.cpp  
 M  +1 -0      thumbnail.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1011074
Comment 3 Peter Penz 2009-08-13 23:40:27 UTC
SVN commit 1011075 by ppenz:

Backport of SVN commit 1011074: Respect the maximum file size when creating thumbnails for directories.

CCBUG: 202960

 M  +11 -2     thumbnail.cpp  
 M  +1 -0      thumbnail.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1011075
Comment 4 Falk 2009-08-14 14:04:02 UTC
I just checked it and you are right the file size is/was only ignored when dolphin had to create thumbnails for the directories.

Thx for the fast bug fix :)
Comment 5 Brendon Higgins 2009-08-14 14:39:39 UTC
This bug, and bug #203512, make me wonder why the code for generating folder thumbnails, createSubThumbnail(), duplicates functionality that's already part of the get() method. Surely it would be a more robust approach to refactor the code such that the common functionality resides in its own method (or methods) that's called by get() and createSubThumbnail(). :-/ FWIW.
Comment 6 Peter Penz 2009-08-14 20:53:06 UTC
Thanks Brandon for the hint! I'm not the maintainer of the class Thumbnail, but I'll have a look on this if I need to apply another patch in future...
Comment 7 Peter Penz 2009-08-14 21:19:56 UTC
SVN commit 1011482 by ppenz:

Assure that the thumbnails of directory previews don't exceed the cache size. Thanks to Brendon Higgins for the detailed analyses.

BUG: 203512
CCBUG: 202960

 M  +15 -8     thumbnail.cpp  
 M  +6 -0      thumbnail.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1011482
Comment 8 Peter Penz 2009-08-14 21:21:25 UTC
SVN commit 1011483 by ppenz:

Backport of SVN commit 1011482: Assure that the thumbnails of directory previews don't exceed the cache size.
Thanks to Brendon Higgins for the detailed analyses.

BUG: 203512
CCBUG: 202960

 M  +15 -8     thumbnail.cpp  
 M  +6 -0      thumbnail.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1011483