Bug 304439 - Nepomuk fails to index some images
Summary: Nepomuk fails to index some images
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: fileindexer (show other bugs)
Version: git master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 12:52 UTC by Hrvoje Senjan
Modified: 2013-02-07 05:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of failed image (228.13 KB, image/jpeg)
2012-08-02 12:53 UTC, Hrvoje Senjan
Details
Bug #304439 patch (896 bytes, patch)
2012-08-03 07:54 UTC, Ignacio Serantes
Details
New example (250.34 KB, image/jpeg)
2012-08-03 11:03 UTC, Hrvoje Senjan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hrvoje Senjan 2012-08-02 12:52:22 UTC
As the title says, some images can't be indexed due to some properties

Reproducible: Always

Steps to Reproduce:
1. Try to index some images with nepomukfileindexer (i'm gonna attach example image)

Actual Results:  
Image metadata isn't indexed

Expected Results:  
Should be indexed

Result of xmlindexer on the image:
xmlindexer troutmask_3.jpg 
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
 <file uri='troutmask_3.jpg' mtime='1337651610'>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url'>troutmask_3.jpg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#isPartOf'></value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName'>troutmask_3.jpg</value>
  <value name='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#Photo</value>
  <value name='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified'>1337651610</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize'>233607</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType'>image/jpeg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType'>image/jpeg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hasHash'>:rrnuv</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#orientation'>0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#flash'>0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#focalLength'>0/1000000</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureTime'>0/1000000</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#apertureValue'>0/1000000</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureBiasValue'>0/1000000</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#meteringMode'>0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#isoSpeedRatings'>0 0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width'>1252</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height'>1252</value>
  <value name='http://strigi.sf.net/ontologies/0.9#depth'>0</value>
 </file>
</metadata>

Rdfindexer result:
<:rzxdh>
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hashAlgorithm> 
                "SHA1";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hashValue> 
                "141ae439848b63c8c260202028832e0767bdfe8d";
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
                "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileHash".
<troutmask_3.jpg>
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize> 
                "233607";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#isPartOf> 
                "";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified> 
                "1337651610";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> 
                "image/jpeg",
                "image/jpeg";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url> 
                "troutmask_3.jpg";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName> 
                "troutmask_3.jpg";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hasHash> 
                ":rzxdh";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height> 
                "1252";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width> 
                "1252";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#apertureValue> 
                "0/1000000";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureBiasValue> 
                "0/1000000";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureTime> 
                "0/1000000";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#flash> 
                "0";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#focalLength> 
                "0/1000000";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#isoSpeedRatings> 
                "0 0";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#meteringMode> 
                "0";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#orientation> 
                "0";
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
                "http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#Photo",
                "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject".
Comment 1 Hrvoje Senjan 2012-08-02 12:53:02 UTC
Created attachment 72901 [details]
Example of failed image
Comment 2 Vishesh Handa 2012-08-02 13:25:49 UTC
Thanks a lot for the bug report.

If it's not too much trouble, could you also please run nepomukindexer on the file, and provide the output? Please make sure you have kdebugdialog enabled.
Comment 3 Hrvoje Senjan 2012-08-02 13:30:31 UTC
Sure:
nepomukindexer(10755)/nepomuk (strigi service) Nepomuk2::clearIndexedData: (QUrl("file:///home/hrvoje/Music/Vinyl/Captain Beefheart/troutmask_3.jpg") )
Failed to convert '0 0' to literal of type 'http://www.w3.org/2001/XMLSchema#integer'.
Comment 4 Ignacio Serantes 2012-08-03 06:54:00 UTC
Confirmed in my system with attached file. The problem is the two values returned by   http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#isoSpeedRatings.

As in jpegendanalyzer there is no code to handle this value seems like the problem is in exiv2 library but I don't know if this is a bug in library or a problem with the file exif.
Comment 5 Ignacio Serantes 2012-08-03 07:54:54 UTC
Created attachment 72917 [details]
Bug #304439 patch
Comment 6 Ignacio Serantes 2012-08-03 07:56:11 UTC
Comment on attachment 72917 [details]
Bug #304439 patch

Please, try this patch on libstreamanalyzer.
Comment 7 Hrvoje Senjan 2012-08-03 10:05:41 UTC
Ignacio, your patch fixes the issue with attached image, i'll try with others i have trouble indexing (that will take a while)
Thanks :)
Comment 8 Hrvoje Senjan 2012-08-03 11:03:52 UTC
Created attachment 72920 [details]
New example

This one also fails (with patch):
Failed to convert '0/0' to literal of type 'http://www.w3.org/2001/XMLSchema#float'
Rdfindexer:
<:sthtx>
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hashAlgorithm> 
                "SHA1";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hashValue> 
                "195909d4630fa401516ab0636b22518a77761cd5";
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
                "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileHash".
<:uqkwg>
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hashAlgorithm> 
                "SHA1";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hashValue> 
                "91c7977c821d20d8036937ebee13bbcd1ad6b565";
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
                "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileHash".
<esquivel-lp.jpg>
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentCreated> 
                "1168469724";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize> 
                "256346";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#isPartOf> 
                "";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified> 
                "1337189468";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> 
                "image/jpeg",
                "image/jpeg";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url> 
                "esquivel-lp.jpg";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName> 
                "esquivel-lp.jpg";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hasHash> 
                ":sthtx";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height> 
                "964";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width> 
                "968";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureBiasValue> 
                "0/0";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureTime> 
                "65539/131072";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#flash> 
                "0";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#focalLength> 
                "0/0";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#meteringMode> 
                "5";
        <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#orientation> 
                "1";
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
                "http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#Photo",
                "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject".
<esquivel-lp.jpg/thumbnail.tif>
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize> 
                "12480";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#isPartOf> 
                "esquivel-lp.jpg";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified> 
                "1337189468";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> 
                "image/tiff",
                "image/tiff";
        <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url> 
                "esquivel-lp.jpg/thumbnail.tif";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#colorDepth> 
                "8";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName> 
                "thumbnail.tif";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hasHash> 
                ":uqkwg";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height> 
                "64";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#horizontalResolution> 
                "75";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#verticalResolution> 
                "75";
        <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width> 
                "64";
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
                "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RasterImage".

xmlindexer:
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
 <file uri='esquivel-lp.jpg/thumbnail.tif' mtime='1337189468'>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url'>esquivel-lp.jpg/thumbnail.tif</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#isPartOf'>esquivel-lp.jpg</value>
  <value name='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RasterImage</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified'>1337189468</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize'>12480</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType'>image/tiff</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType'>image/tiff</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName'>thumbnail.tif</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width'>64</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height'>64</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hasHash'>:xjxmu</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#colorDepth'>8</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#horizontalResolution'>75</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#verticalResolution'>75</value>
  <value name='http://strigi.sf.net/ontologies/0.9#depth'>1</value>
 </file>
 <file uri='esquivel-lp.jpg' mtime='1337189468'>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url'>esquivel-lp.jpg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#isPartOf'></value>
  <value name='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#Photo</value>
  <value name='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified'>1337189468</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize'>256346</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType'>image/jpeg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType'>image/jpeg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName'>esquivel-lp.jpg</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width'>968</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height'>964</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#hasHash'>:zsjfd</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentCreated'>1168469724</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#orientation'>1</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#flash'>0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#focalLength'>0/0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureTime'>65539/131072</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#exposureBiasValue'>0/0</value>
  <value name='http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#meteringMode'>5</value>
  <value name='http://strigi.sf.net/ontologies/0.9#depth'>0</value>
 </file>
</metadata>
Comment 9 Ignacio Serantes 2012-08-05 21:27:21 UTC
This is a different bug so, please, open a new bug report.
Comment 10 Hrvoje Senjan 2012-08-05 21:42:55 UTC
Alright, but it is the same issue, altough a different cause :)
Thanks for fixing that first one, 99% of non-inxeded pictures got properly imported to nepomuk with that patch
Comment 11 Vishesh Handa 2012-12-27 09:23:25 UTC
Tested with the new indexer in 4.10, the image file gets indexed :)
Comment 12 Jos van den Oever 2013-02-07 05:25:56 UTC
Git commit b6dc8d4c14135c2fddb1143106d90cbb3acf94b7 by Jos van den Oever.
Committed on 07/02/2013 at 06:11.
Pushed by vandenoever into branch 'master'.

Fix for non valid values in Exif field ISOSpeedRatings
reported in bug https://bugs.kde.org/show_bug.cgi?id=304439

M  +5    -0    plugins/endplugins/jpegendanalyzer.cpp

http://commits.kde.org/libstreamanalyzer/b6dc8d4c14135c2fddb1143106d90cbb3acf94b7