Bug 258837

Summary: Digikam sometimes fails to add Metadata to Nepomuk
Product: [Applications] digikam Reporter: fatgerman
Component: Database-BalooAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, trebor_x
Priority: NOR    
Version: 1.6.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 3.0.0
Sentry Crash Report:
Attachments: debug output of tags which will correctly submitted to nepomuk
debug output of tags which will not correctly submitted

Description fatgerman 2010-12-04 20:30:53 UTC
Version:           1.6.0 (using KDE 4.5.4) 
OS:                Linux

Digikam seems to randomly stop adding metadata tags into nepomuk some time after it has started.


Reproducible: Always

Steps to Reproduce:
It's hard to desrcibe exactly what is happening here because it's a bit random, but I can describe what I did. 

New user, clean install. Start digikam for the first time and configure one collection (in ~/Pictures), with SQLite database files stored in that folder.
Under 'Metadata' options disable 'Save image tags as keywords tags' (I don't think this is relevant though)
Under 'Metadata' enable 'Store metadata from digiKam in Nepomuk' and 'Read metadata from Nepomuk'.
Quit digikam. Copy a few pictures into ~/Pictures (4 folders, with just 3 or 4 images in each, all JPEG).
Restart digiKam. Select an image in the first folder and create a tag "Tag1" and Apply it to the image. View the image in Dolphin and it shows 'Tag1' applied.
Select another image. Create a new tag "Tag2" and apply "Tag1" and "Tag2" to that image. View this image in Dolphin. Dolphin shows no tags applied to this image.

Sometimes I can go through several images before this happens.

I think it is a digiKam problem and not nepomuk because I can add the same tags to the same files from Dolphin and it always works.
Comment 1 Marcel Wiesweg 2010-12-05 20:18:19 UTC
Can you check if you have a process digikamnepomukservice running? Does the random dysfunction correlate with a disappearance of this process?
Comment 2 fatgerman 2010-12-06 12:43:43 UTC
I've got no such process running, either when things are working or when they are not. Does this process only start while files are being tagged? I've failed to find it in any case.

ps -ae | grep digikam
 4589 ?        00:00:04 digikam
 4621 ?        00:00:00 kio_digikamdate
 4622 ?        00:00:00 kio_digikamalbu
Comment 3 fatgerman 2010-12-06 17:13:04 UTC
Today I was doing some more tagging and I noticed that after a while the tagging process started taking a very long time. I noticed then that the kio_digikamdate process was no longer running, and this seemed to coincide with the tags no longer being correctly added to nepomuk.
Comment 4 RSB 2012-04-05 00:01:39 UTC
I have the same problem with person tagging (face recognition). The persons names should be added as tags to nepomuk. But the tags arn't applied to all photos (in nepomuk - tested with dolphin and nepoogle). It are always the same photos which won't be tagged. So this isn't a random behavior. Digikamnepomukservice is running as child process of nepomukservicestub.

I enabled all nepomuk and digikam related debug sources in kdebugdialog. 
For testing I have tagged the two photos with digkam. After that I opened the tag tab and deselected and selected the persons tag a second time. Than I applied.

You can find the output after I applied the tag again in the attached txt files.
Hope this is helpful.
Comment 5 RSB 2012-04-05 00:04:13 UTC
Created attachment 70160 [details]
debug output of tags which will correctly submitted to nepomuk

debug output of tags which will correctly submitted to nepomuk
Comment 6 RSB 2012-04-05 00:05:45 UTC
Created attachment 70161 [details]
debug output of tags which will not correctly submitted
Comment 7 Marcel Wiesweg 2012-10-17 18:44:54 UTC
Git commit b882df3641e6a3b6b0ff35552d1c9cda434e868e by Marcel Wiesweg.
Committed on 17/10/2012 at 18:36.
Pushed by mwiesweg into branch 'master'.

Disable the current implementation of a digikam-nepomuk integration.

By information from the Nepomuk maintainer, the relevant API have been replaced.
Essentially, the current code is at best not functional, at worst polluting your Nepomuk db.
A new implementation needs to be written based on current APIs.
Related: bug 264124, bug 276457, bug 282918, bug 283168, bug 304052, bug 279404, bug 305079

M  +35   -35   CMakeLists.txt
M  +12   -0    utilities/nepomuk/digikamnepomukservice.cpp
M  +13   -0    utilities/nepomuk/digikamnepomukservice.h

http://commits.kde.org/digikam/b882df3641e6a3b6b0ff35552d1c9cda434e868e