[Digikam-devel] [digikam] [Bug 339607] New: Images not showing if corresponding ImageInformation entry does not exist in database

Leonardo Montecchi montex at gmail.com
Thu Oct 2 15:06:15 BST 2014


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

            Bug ID: 339607
           Summary: Images not showing if corresponding ImageInformation
                    entry does not exist in database
           Product: digikam
           Version: 4.3.0
          Platform: Debian testing
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: Albums GUI
          Assignee: digikam-devel at kde.org
          Reporter: montex at gmail.com

I had some recently added pictures to my collections which were not showing
correctly in the album view of Digikam, while they were showing correctly in
the file system. In particular I had three folders:

A - with 88 CR2 (Canon RAW) files, showing only 81 images
B - with 471 JPG, showing only 452 images
C - with 3 AVI files, showing 0 files

I am not sure what caused this problem, maybe some hang or crash while
searching for new pictures. This may also be related to these bugs:
https://bugs.kde.org/show_bug.cgi?id=320466
https://bugs.kde.org/show_bug.cgi?id=324134

I tried to move the folders, to rebuild image fingerprints, to rebuild
thumbnails, but nothing helped. 

I then looked into the database (I'm using MySQL) and noticed that missing
images did not have a corresponding entry in the ImageInformation table. So
probably they are excluded because of a JOIN with this table. To fix it, I
simply:

1) added empty rows in ImageInformation with "imageid" corresponding to missing
images
2) images then were shown in Digikam
3) I instructed Digikam to re-read data from those images

I would expect Digikam to re-create the row in case it does not exist, at least
when doing rebuild fingerprint/rebuild thumbnails tasks. I consdier this a
major bug, since someone that does not know/want to deal with the database will
not be able to make images reappear easily, and may also not notice it, loosing
the ability to access some images from Digikam.

Reproducible: Always

Steps to Reproduce:
1. Find a target image, and find its 'id' from the database
2. Delete the row in ImageInformation having the corresponding 'imageid'
3. Open digikam and look at the album containing the image, image will not show

Actual Results:  
The image is not showing in the album view

Expected Results:  
Image should show in the album view, since it exists in the filesystem.

Occurs both on 4.1 (current Debian testing), and 4.3 (current Debian unstable).
Actually I tried to upgrade to 4.3 to see if it would solve the poblem, but no
luck.

Workaround:
- In the database, identify "Images" entries corresponding to the missing
images
- Identify "Images.Id" 
- For each missing image, add an empty row in ImageInformation table, having
"imageid" corresponding to those of missing images, other field may be NULL
- Make Digikam re-read the image information of the involved images from the
GUI

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



More information about the Digikam-devel mailing list