Bug 331435 - Extreme hard drive activity while browsing folders with pictures
Summary: Extreme hard drive activity while browsing folders with pictures
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 4.10.4
Platform: Slackware Linux
: NOR minor
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 412155 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-23 16:54 UTC by lp.allard.1
Modified: 2019-10-07 03:53 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lp.allard.1 2014-02-23 16:54:05 UTC
THis had not happened with previous Gwenview versions (shipping with Slackware 14 & 13.37).  Whenever I browse folders with pictures with Gwenview, the hard drive seems to be under extreme load for minutes at a time.  Even after I leave gwenview, this continues for seconds then stops.  

I have verified this was caused by gwenview (or a KDE subcomponent) and yes, it happens only when I use gwenview.

I fear this will prematurely kill the HDD.

Reproducible: Always

Steps to Reproduce:
1.Start gwenview
2.Browse folders on local hard drive with pictures
Actual Results:  
Look at the HDD controller's light being lit up solid for minutes and the hard drive "scratching" also intensively.

Gwenview is also very sluggish and unresponsive.  Almost impossible to use routinely.

Expected Results:  
None of the above behaviors, like with previous Gwenview versions

I tried launching GV from CLI, I do not see any errors or whatever else indicating problems except a few messages about GV not being able to create thumbnails for certain files:

bash-4.2$ gwenview
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
gwenview(7199)/kdeui (kdelibs): Attempt to use QAction "edit_redo" with KXMLGUIFactory! 
gwenview(7199)/kdeui (kdelibs): Attempt to use QAction "edit_undo" with KXMLGUIFactory! 
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2
gwenview(7199) Gwenview::ThumbnailThread::loadThumbnail: Could not generate thumbnail for file "file:///home/lp.allard.1/file-storage/pictures/photo-album/last_summer_vacations1.jpg" 
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2

Slackware64-14.1
Gwenview 4.10.4 - KDE 4.10.5
Comment 1 lp.allard.1 2014-02-23 17:07:39 UTC
(In reply to comment #0)

I just noticed:  when the HDD is working hard, I see these messages in the console:

gwenview(7199) KSambaSharePrivate::testparmParamValue: We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf
Error loading services.
" 
gwenview(7199) KSambaSharePrivate::findSmbConf: KSambaShare: Could not find smb.conf! 
gwenview(7199) Gwenview::LoadingDocumentImplPrivate::loadMetaInfo: QImageReader::read() using format hint "jpg" failed: "Unknown error" 
gwenview(7199) Gwenview::LoadingDocumentImplPrivate::loadMetaInfo: QImageReader::read() without format hint failed: "Unsupported image format" 
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x0
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x0
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2
Error: Directory Image: Next pointer is out of bounds; ignored.
Warning: unknown JFIF revision number 2.01
Warning: unknown JFIF revision number 2.01
Warning: unknown JFIF revision number 2.01
Warning: unknown JFIF revision number 2.01
Warning: unknown JFIF revision number 2.01
Warning: unknown JFIF revision number 2.01
Warning: Directory Photo, entry 0x0000 has unknown Exif (TIFF) type 0; setting type size 1.
Error: Directory (Last IFD item) with 10240 entries considered invalid; not read.
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Ignoring IPTC information encoded in the Exif data.
Warning: Directory Photo, entry 0x0000 has unknown Exif (TIFF) type 0; setting type size 1.
Error: Directory (Last IFD item) with 10240 entries considered invalid; not read.
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Ignoring IPTC information encoded in the Exif data.
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Ignoring IPTC information encoded in the Exif data.
Warning: Unsupported date format
Warning: Directory Image, entry 0x0001 has unknown Exif (TIFF) type 0; setting type size 1.
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Error: Directory Samsung2 with 23072 entries considered invalid; not read.
Error: Directory Samsung2 with 23072 entries considered invalid; not read.
Warning: Unsupported date format
Corrupt JPEG data: 6746 extraneous bytes before marker 0xd6
Warning: Photoshop IRB data is not padded to even size
Warning: Photoshop IRB data is not padded to even size
Warning: Photoshop IRB data is not padded to even size
Warning: Photoshop IRB data is not padded to even size
Warning: Unsupported date format
Warning: Photoshop IRB data is not padded to even size
Warning: Photoshop IRB data is not padded to even size
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Corrupt JPEG data: 15167 extraneous bytes before marker 0xda
Error: Directory NikonPreview: Next pointer is out of bounds; ignored.
Error: Offset of directory NikonPreview, entry 0x0000 is out of bounds: Offset = 0x10020004; truncating the entry
Warning: Directory NikonPreview, entry 0x0006 has unknown Exif (TIFF) type 259; setting type size 1.
Error: Offset of directory NikonPreview, entry 0x0006 is out of bounds: Offset = 0x00010006; truncating the entry
Warning: Directory NikonPreview, entry 0x0000 has unknown Exif (TIFF) type 282; setting type size 1.
Error: Offset of directory NikonPreview, entry 0x0000 is out of bounds: Offset = 0x00010000; truncating the entry
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported time format
Error: XMP Toolkit error 201: XML parsing failure
Warning: Failed to decode XMP metadata.
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported time format
Warning: Unsupported date format
Warning: Unsupported date format
Warning: Unsupported time format
Error: Directory Canon: Next pointer is out of bounds; ignored.
gwenview(7199)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:


So I guess the hard drive activity is gwenview trying to read ahead the metadata.. Can I deactivate this?  I only want thumbnails, nothing else.
Comment 2 Andrew Crouthamel 2018-11-11 04:35:57 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Andrew Crouthamel 2018-11-21 04:33:04 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 4 lp.allard.1 2018-11-23 00:32:39 UTC
Hello,  sorry for not replying on your reply of 2018-11-11 I didnt see the email notification yet.  This bug report is very old, and I have moved on from slackware about 3 1/2 years ago.

I still use Gwenview although on Mint now (Gwenview 4.14.0 pre / KDE 4.14.2) on Mint Rosa 17.3

I still fgind Gwenview inefficvient on directories with large amounts of files, especially when opening/browsing  folders on my Freenas server.  Thumbnails are slow loading and while this is happening Gwenview is very unresponsive and slow, often needs to be killed or wait for several minutes until it becomes responsive again.

Closing it also requires several minutes, and crashes are not exceptional.

I will try to make a crash trace and report back
Comment 5 Tom Moebert 2019-05-17 17:43:55 UTC
FYI: A patch is now available: https://phabricator.kde.org/D21260
Comment 6 Nate Graham 2019-05-21 17:35:19 UTC
Git commit 1ae75b39c952eb2a41ed6292a6ee27fc26666e29 by Nate Graham, on behalf of Tom Moebert.
Committed on 21/05/2019 at 17:31.
Pushed by ngraham into branch 'master'.

Accelerate thumnailgenerator when loading JpegContent

Summary:
JpegContent::load() is extensively called by the ThumbnailGenerator. Its major purpose is to retrieve EXIF data from a file, if available also an embedded thumbnail. This change memory maps the file, rather than reading it all in using QFile::readAll(). This should also explain the heavy load pointed out in https://bugs.kde.org/show_bug.cgi?id=331435 .

Reviewers: #gwenview, ngraham

Reviewed By: #gwenview, ngraham

Subscribers: ngraham, cfeck, #gwenview

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D21260

M  +43   -3    lib/jpegcontent.cpp

https://commits.kde.org/gwenview/1ae75b39c952eb2a41ed6292a6ee27fc26666e29
Comment 7 Nate Graham 2019-10-07 03:53:20 UTC
*** Bug 412155 has been marked as a duplicate of this bug. ***