Bug 323210 - Image History Bar Shows A Mess Of Derived Images And Identical Images That Are Neither Derived Nor Identical
Summary: Image History Bar Shows A Mess Of Derived Images And Identical Images That Ar...
Alias: None
Product: digikam
Classification: Unclassified
Component: Albums-Versioning (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2013-08-06 02:57 UTC by C Doe
Modified: 2022-02-02 04:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0


Note You need to log in before you can comment on or make changes to this bug.
Description C Doe 2013-08-06 02:57:17 UTC
Some JPG images don't show up in Digikam.  However, if you check: Settings → Configure digiKam → Editing Images → Always show original images, the missing images appear.  But image history bar shows a mess of Derived Images and Identical Images that are neither derived nor identical.

digiKam Version 2.5.0
Using KDE Development Platform 4.8.5 (4.8.5)
Ubuntu 12.04.1 LTS
Comment 1 Marcel Wiesweg 2013-08-06 18:55:01 UTC
Is this in some way reproducible? Did you see this appear once, or are images missing regularly? Are any of the derived images actually edited with digikam?
Comment 2 C Doe 2013-08-08 15:32:04 UTC
I went into digikam4.db using a database tool (sqliteman) and dropped and re-created the imagerelations table.  I don't know if dropping that table might screw up other things in the database.  I hope not.  Then I re-started digikam (2.5x) and let it "do its thing" overnight.  Things are better than they were before.  Some of the erroneous version relationships are back, notably with an mp4 video.  And the imagerelations table has stuff in it, which I didn't expect because looking in the filesystem I don't see any files with version numbers embedded in the filename, but I'm not sure where to look.  Can you give me a 'find' command to track them down??  Since then, I've also upgraded to digikam 3.0 from Philip Johnsson ppa.  But haven't repeated the drop table exercise since I upgraded.
Comment 3 C Doe 2013-08-08 16:00:02 UTC
More info regarding the mp4 video:  The "erroneous version relationship" I mentioned consists of three "Identical Images" in the "Versions and applied filters in a combined list" view, two of which have the animated circular dots "updating/progress" icon where the thumbnail should be.
Comment 4 Marcel Wiesweg 2013-08-08 19:37:51 UTC
Dropping the relations table has no side effects, you just lose relations.
Locating identical images is not based on the relations table, it's based on file hash and file size (seems not to work with mp4 videos)
The first edited file usually has "_v1" appended to the file's base name, and so on.
Comment 5 C Doe 2013-08-08 21:35:29 UTC
OK, so there are at least a couple images in the imagerelations table that have what looks like hundreds or thousands of related images.  But there shouldn't be any related images.  I don't use digikam for editing images.  I use Gimp.  Looking at one of the "parent" images in digikam Versions pane,  I see that the supposedly related images are not related to the parent.  Not sure how the imagerelations table got re-populated.  Is that what you would expect?  Select count(*) gives 4526 rows.
Comment 6 C Doe 2013-08-08 21:36:52 UTC
Reverted to 2.5x because 3.0 had an issue with the window manager menus.
Comment 7 Marcel Wiesweg 2013-08-09 17:29:10 UTC
No, I dont have an idea how the table gets populated.
Comment 8 caulier.gilles 2013-12-14 22:30:44 UTC
C Doe,

What's new about this file using last digiKam 3.5.0 ?

Gilles Caulier
Comment 9 caulier.gilles 2014-08-30 22:20:10 UTC
C Doe,

What's new about this file using last digiKam 4.2.0 ?

Gilles Caulier
Comment 10 C Doe 2014-09-02 16:12:14 UTC
I'm still using 3.x under Ubuntu Trusty. Not sure if I can install 4.x
Comment 11 caulier.gilles 2015-06-28 09:41:26 UTC
New digiKam 4.11.0 is available :


Can you reproduce the problem with this release ?

Gilles Caulier
Comment 12 C Doe 2015-07-02 17:27:43 UTC
Using digiKam 3.5.0 on Ubuntu, the sqlite digikam4.db imagerelations table looks clean.  MUCH better than before, for sure.  There are several relations in the table, and a perfunctory examination seems to indicate they are legit.  There are also other images that exist in the filesystem that are also "related", but don't appear in the imagerelations table. Again, I'm not sure how the imagerelations table gets populated or what actually SHOULD be in there.  But there are no longer thousands of rows in the table that do not belong there.  Yay!
Comment 13 caulier.gilles 2015-07-02 21:37:08 UTC
Ok, fine i close this file now. We have a plenty of reports about Database integrity to review, including last stuff that you report in your last comment.

Gilles Caulier
Comment 14 Johannes 2016-09-06 07:06:03 UTC
Seems to be a duplicate of bug #305104