[Digikam-devel] [digikam] [Bug 345045] New: digikam: images not displayed in album

Vincent Danjean vdanjean.ml at free.fr
Wed Mar 11 11:50:09 GMT 2015


https://bugs.kde.org/show_bug.cgi?id=345045

            Bug ID: 345045
           Summary: digikam: images not displayed in album
           Product: digikam
           Version: 4.4.0
          Platform: Debian unstable
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Database
          Assignee: digikam-devel at kde.org
          Reporter: vdanjean.ml at free.fr

Hi,

  Using digikam for a long time, I'm experiencing database corruption from time
to time (this is still going on with 4.4.0, the last Debian packaged version).
I initially reported the problem and my analysis to the Debian Bug Tracker (
https://bugs.debian.org/756512 ) and maintainers just asked me to report it
here. So, here is the copy-paste of my initial bug report (but I confirm the
bug is still present in 4.4.0).

===============================

  I'm using digikam for several years to handle all my photos. Regularly,
some images are present in repository on disk, they are counted into the album
list (for example, I see '8 (221)' that tells me there is 221 images in the
album/directory named '8', and it is indeed what there is on filesystem).
However, they are not displayed in the central part of digikam.
  I looked for lots of thing on Internet about this bug. I read and test
lots of things.
  Eventually, I found the java program DigikamDBValidator. I know it is not
maintain anymore and it is not necessarly fully working with recent version of
digikam, but it allows me to start to look into the digikam database.

  And I found several problems.

  And theses problems come back (with other images) after I first corrected
them. So the bug was present into the 4.0.0 digikam version. Upgrading to the
4.1.0 does not fix the database problems (but I do not know (yet) if 4.1.0 will
corrupt the database again)

  For information, I'm using a mysql database for a long time (nearly when it
has been available in the Debian package)


  First, I found several image related tables that refer to non existing
images. For example, I get several rows with the following request :
SELECT ImageComments.id FROM ImageComments LEFT OUTER JOIN Images ON
Images.id=ImageComments.imageid WHERE Images.name IS NULL
  I correct them with :
DELETE i FROM ImageComments i LEFT OUTER JOIN Images ON Images.id=i.imageid
WHERE Images.name IS NULL;

  And I had this problem in ImageComments, ImageCopyright, ImageInformation,
ImageMetadata, and ImageTags tables (I not sure I cheked all required tables,
there can be more).


  That said, fixing this does not fix my problem with images not displayed.
I found these image with this request :
SELECT id FROM Images WHERE Images.id NOT IN (SELECT ImageInformation.imageid
FROM ImageInformation);
  This are images into the 'Images' table but not into the 'ImageInformation'
table.
  I get the path to these images with the following request :
SELECT Images.id, concat(albumRoot, ":", relativePath, "/" , Images.name) FROM
Images JOIN Albums on Images.album=Albums.id WHERE Images.id NOT IN (SELECT
ImageInformation.imageid FROM ImageInformation);

  And indeed, the listed images where the ones counted into the album list but
not displayed by digikam.

  I fix this by creating empty lines in the ImageInformation table (but this
image ID):
insert into ImageInformation (imageid) SELECT id FROM Images WHERE Images.id
NOT IN (SELECT ImageInformation.imageid FROM ImageInformation);

  Starting digikam just after this 'fix' makes all my missing images displayed!
Looking at the database, I needed to execute 'read metadata from images again'
in the album menu (I'm not sure of the exact english text: my digikam is in
french) in the album where I had missing images in order to got the
ImageInformation fully filled.
  Needless to say that executing this entry menu before creating the lines in
the ImageInformation table did not have any effect. It is something I tried
lots of times.

  So, I'm not sure what leads to this database corruption but it is something I
observe several times. And it happens with the 4.x series (ie, I'm sure I fixed
the database while I was already using digikam 4.x and today I needed to fix it
again).

===============================

  Regards,
    Vincent

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list