<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>302074</bug_id>
          
          <creation_ts>2012-06-17 16:52:41 +0000</creation_ts>
          <short_desc>[PATCH] Thumnailer keeps running after exiting gwenview</short_desc>
          <delta_ts>2012-10-19 13:26:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>gwenview</product>
          <component>general</component>
          <version>Git (add output of &quot;git log -1 --oneline&quot; to description)</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Benni Hill">benni</reporter>
          <assigned_to name="Gwenview Bugs">gwenview-bugs-null</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/gwenview/3dbd4e95c9494d4ae5ed51ebfbfa75efeceff97f</cf_commitlink>
          <cf_versionfixedin>2.9.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1266456</commentid>
    <comment_count>0</comment_count>
    <who name="Benni Hill">benni</who>
    <bug_when>2012-06-17 16:52:41 +0000</bug_when>
    <thetext>Git Version: e4e135c Fix images not showing after viewing a video

When thumbnailing a folder for which gwenview hasn&apos;t created thumbnails yet, the thumbnailer keeps running after exiting gwenview. This is at least an annoying behaviour since this blocks unmounting of flash drives, etc.

I marked this as critical since it might be possible that the user won&apos;t notice that unmounting had failed and therefore he would remove his external device (-&gt; data loss?).

Reproducible: Always

Steps to Reproduce:
1. Open a folder for which gwenview has not created thumbnails yet.
2. When gwenview starts to thumbnail the images, hit control+q or similar to exit it
3. main window disappears

Actual Results:  
A gwenview process keeps running and thumbnailing all the images in the queue.

Expected Results:  
Gwenview should have exited immediately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1266458</commentid>
    <comment_count>1</comment_count>
      <attachid>71892</attachid>
    <who name="Benni Hill">benni</who>
    <bug_when>2012-06-17 16:54:45 +0000</bug_when>
    <thetext>Created attachment 71892
stop-thumbnailer-when-exiting

The patch deletes the ThumbnailLoadJob when ThumbnailView is deleted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1270775</commentid>
    <comment_count>2</comment_count>
    <who name="Aurelien Gateau">agateau</who>
    <bug_when>2012-06-28 16:20:35 +0000</bug_when>
    <thetext>Hi,

I agree it is a problem, but your patch just caused an assert here:

ASSERT: &quot;qMetaTypeGuiHelper&quot; in file /home/aurelien/kdesrc/qt/src/corelib/kernel/qmetatype.cpp, line 1384
libpng error: Write Error
gwenview(7376) Gwenview::storeThumbnailToDiskCache: Could not save thumbnail 
QFile::at: Cannot set file position 0 
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = gwenview path = /home/aurelien/opt/k4m/bin pid = 7376

I think we need a safer way to stop the job. I think clearing the item list in the job destructor would be a better fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1280373</commentid>
    <comment_count>3</comment_count>
      <attachid>72860</attachid>
    <who name="Benni Hill">benni</who>
    <bug_when>2012-08-01 00:05:34 +0000</bug_when>
    <thetext>Created attachment 72860
wait for sThumbnailCache to finish

Phew!
I think ThumbnailLoadJob has to wait for sThumbnailCache to finish. I don&apos;t know why, but somehow the QImage that is to be stored to disk seems to disappear (sometimes).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1280781</commentid>
    <comment_count>4</comment_count>
    <who name="Aurelien Gateau">agateau</who>
    <bug_when>2012-08-02 16:08:55 +0000</bug_when>
    <thetext>Git commit 3dbd4e95c9494d4ae5ed51ebfbfa75efeceff97f by Aurélien Gâteau, on behalf of Benni Hill.
Committed on 02/08/2012 at 18:06.
Pushed by gateau into branch &apos;KDE/4.9&apos;.

Stop thumbnailing when Gwenview exits.

This is important as it blocks unmounting of flash drives.
FIXED-IN: 2.9.1

M  +1    -0    lib/thumbnailloadjob.cpp
M  +1    -0    lib/thumbnailview/thumbnailview.cpp

http://commits.kde.org/gwenview/3dbd4e95c9494d4ae5ed51ebfbfa75efeceff97f</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>71892</attachid>
            <date>2012-06-17 16:54:45 +0000</date>
            <delta_ts>2012-08-01 00:05:34 +0000</delta_ts>
            <desc>stop-thumbnailer-when-exiting</desc>
            <filename>0001-stop-thumbnailer-when-exiting.patch</filename>
            <type>text/plain</type>
            <size>679</size>
            <attacher name="Benni Hill">benni</attacher>
            
              <data encoding="base64">RnJvbSBmNjVlYjMxOTJjZmU5MjdkZTMzNGYzNjJiM2ZiM2U2NzdjNzdiZGFmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/QmVuamFtaW49MjBMPUMzPUI2d2U/PSA8YmVu
amFtaW4ubG9ld2VAZnJlZW5ldC5kZT4KRGF0ZTogU3VuLCAxNyBKdW4gMjAxMiAxODoyODowNCAr
MDIwMApTdWJqZWN0OiBbUEFUQ0hdIHN0b3AgdGh1bWJuYWlsZXIgd2hlbiBleGl0aW5nCgotLS0K
IGxpYi90aHVtYm5haWx2aWV3L3RodW1ibmFpbHZpZXcuY3BwIHwgICAgMSArCiAxIGZpbGUgY2hh
bmdlZCwgMSBpbnNlcnRpb24oKykKCmRpZmYgLS1naXQgYS9saWIvdGh1bWJuYWlsdmlldy90aHVt
Ym5haWx2aWV3LmNwcCBiL2xpYi90aHVtYm5haWx2aWV3L3RodW1ibmFpbHZpZXcuY3BwCmluZGV4
IDExZTE4N2YuLmQwMGFjZjIgMTAwNjQ0Ci0tLSBhL2xpYi90aHVtYm5haWx2aWV3L3RodW1ibmFp
bHZpZXcuY3BwCisrKyBiL2xpYi90aHVtYm5haWx2aWV3L3RodW1ibmFpbHZpZXcuY3BwCkBAIC0z
ODcsNiArMzg3LDcgQEAgVGh1bWJuYWlsVmlldzo6VGh1bWJuYWlsVmlldyhRV2lkZ2V0KiBwYXJl
bnQpCiAKIFRodW1ibmFpbFZpZXc6On5UaHVtYm5haWxWaWV3KCkKIHsKKyAgICBkZWxldGUgZC0+
bVRodW1ibmFpbExvYWRKb2I7CiAgICAgZGVsZXRlIGQ7CiB9CiAKLS0gCjEuNy45LjUKCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>72860</attachid>
            <date>2012-08-01 00:05:34 +0000</date>
            <delta_ts>2012-08-01 00:05:34 +0000</delta_ts>
            <desc>wait for sThumbnailCache to finish</desc>
            <filename>stopThumbnailer.patch</filename>
            <type>text/plain</type>
            <size>750</size>
            <attacher name="Benni Hill">benni</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL2xpYi90aHVtYm5haWxsb2Fkam9iLmNwcCBiL2xpYi90aHVtYm5haWxsb2Fk
am9iLmNwcAppbmRleCA4MjcyMmNkLi45YzlhMmVlIDEwMDY0NAotLS0gYS9saWIvdGh1bWJuYWls
bG9hZGpvYi5jcHAKKysrIGIvbGliL3RodW1ibmFpbGxvYWRqb2IuY3BwCkBAIC00MjQsNiArNDI0
LDcgQEAgVGh1bWJuYWlsTG9hZEpvYjo6flRodW1ibmFpbExvYWRKb2IoKQogICAgIGlmICghc1Ro
dW1ibmFpbENhY2hlLT5pc1J1bm5pbmcoKSkgewogICAgICAgICBzVGh1bWJuYWlsQ2FjaGUtPnN0
YXJ0KCk7CiAgICAgfQorICAgIHNUaHVtYm5haWxDYWNoZS0+d2FpdCgpOwogfQogCiB2b2lkIFRo
dW1ibmFpbExvYWRKb2I6OnN0YXJ0KCkKZGlmZiAtLWdpdCBhL2xpYi90aHVtYm5haWx2aWV3L3Ro
dW1ibmFpbHZpZXcuY3BwIGIvbGliL3RodW1ibmFpbHZpZXcvdGh1bWJuYWlsdmlldy5jcHAKaW5k
ZXggNTI1YTQ3Zi4uOTM2NmJmZCAxMDA2NDQKLS0tIGEvbGliL3RodW1ibmFpbHZpZXcvdGh1bWJu
YWlsdmlldy5jcHAKKysrIGIvbGliL3RodW1ibmFpbHZpZXcvdGh1bWJuYWlsdmlldy5jcHAKQEAg
LTMyOSw2ICszMjksNyBAQCBUaHVtYm5haWxWaWV3OjpUaHVtYm5haWxWaWV3KFFXaWRnZXQqIHBh
cmVudCkKIAogVGh1bWJuYWlsVmlldzo6flRodW1ibmFpbFZpZXcoKQogeworICAgIGlmKGQtPm1U
aHVtYm5haWxMb2FkSm9iKSBkZWxldGUgZC0+bVRodW1ibmFpbExvYWRKb2I7CiAgICAgZGVsZXRl
IGQ7CiB9CiAK
</data>

          </attachment>
      

    </bug>

</bugzilla>