Bug 353327

Summary: large images freeze KDE
Product: [Unmaintained] kio Reporter: Guy Mac <guymac>
Component: thumbnailAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: major CC: cfeck, frank78ac, nate
Priority: NOR    
Version First Reported In: 4.14.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Guy Mac 2015-09-29 17:58:41 UTC
Dolphin is trying to generate a preview or index a 473 MB JP2 image I have in a local folder, even with 6 GB of RAM and quad-hyperthreaded core i7 it freezes Dolphin and KDE becomes unresponsive for ~10 minutes until, I guess it gave up. I work with science data stored in JP2 and many of our files are 10x larger than even this.

Reproducible: Always



Expected Results:  
Dolphin should have a feature to skip local files above a certain limit, or to use a low priority background process that does not try to map the entire file into memory at once.
Comment 1 Frank Reininghaus 2015-09-29 20:09:00 UTC
Thanks for the bug report. Dolphin itself does not generate previews - this is done by an external thumbnailer process. Do you see the same problem if you enable previews in other KDE applications, like in the file dialog of, e.g., KWrite?

(In reply to Guy Mac from comment #0)
> Expected Results:  
> Dolphin should have a feature to skip local files above a certain limit, or
> to use a low priority background process that does not try to map the entire
> file into memory at once.

No, the thumbnailer (which is an external process that is not part of Dolphin) should be fixed such that it either creates a preview quickly and with low memory usage, or skips the file if it finds that this is not possible.

I'm not familiar with the internals of the image thumbnailers, but I think that access to a problematic file might be needed in order to investigate the problem. Could you tell us how to get such a file?
Comment 2 Christoph Feck 2015-10-10 23:11:54 UTC
> unresponsive for ~10 minutes

How long do other applications need to load the image?
Comment 3 Nate Graham 2018-06-29 20:49:14 UTC
Please answer Christoph's question, if you're able to.

Also, is this still an issue with KDE Frameworks 5.47?
Comment 4 Christoph Feck 2018-06-29 20:56:28 UTC
If you can still reproduce with recent software versions, please report this issue directly to Qt developers via https://bugreports.qt.io/

Loading of JPEG-2000 images now has code in Qt qimageformats

https://cgit.kde.org/kimageformats.git/commit/?id=e5fce91de6ef72f15c7d31b16b2494f534c7157c

http://code.qt.io/cgit/qt/qtimageformats.git/tree/src/plugins/imageformats/jp2