How to fix corrupted database?
Patrick Gerlier
page74010-dgkm at yahoo.com
Tue May 20 10:43:17 BST 2025
Hi all,
Using Digikam 8.6.0 under Fedora 42 with KDE Plasma desktop
I revived a photo archive put on sleep several years ago. Therefore my
computer underwent several major upgrades in the mean time, i.e. last
time I opened this archive was done under an older release. Digikam
crashes in segfault after "Loading albums" step. When launched from the
terminal, I get:
digikam.dnnmodelmanager: Cannot find DNN models path
digikam.dnnmodelmanager: Cannot find DNN models path
qt.multimedia.ffmpeg: Using Qt multimedia with FFmpeg version 7.1.1 GPL
version 3 or later
digikam.dnnmodelmanager: Cannot find DNN models path
digikam.dnnmodelmanager: Cannot find DNN models path
digikam.dnnmodelmanager: Cannot find DNN models path
kf.xmlgui: Unhandled container to remove : Digikam::DigikamApp
Segmentation fault (core dumped)
It is very likely that I manipulated the photo directory outside
Digikam, because I reconfigured my computer several times.
When I peek into the database, I see many NULL fields in the 'album'
column of 'images' table. Some of them correspond to albums I decided to
make an independent collection under a separate database (though the
images should have also disappeared because the files are no longer
present).
I first suspected an issue with removable media which were indexed by
Digikam, but this does not seem to be the case. I also questioned the
use of UUID in 'albumroots' table because my disks were reformatted and
data reloaded "as is" without activating Digikam. I change 'uuid=…' to
'path=…' without effect (I worked on a copy of the DB).
Digikam operates as expected on other databases. I started a separate
collection and everything works fine though there are also NULL 'album'
columns (in relatively low numbers) despite the fact that the photos
where all managed inside Digikam.
I have written a small quick'n'dirty Django-based database browser to
see the extent of the damage (within my limited understanding of the DB
schema, ignoring tags presently). Surprisingly, my browser displays
pictures and data without problem. Note that this browser is purely
"passive". It does not try to reconstruct a structure; it only queries
the DB in read-only mode, ignoring NULL columns (thus ignoring possible
duplicates resulting from external manipulation).
All data seem to be there.
Since the collection holds 10k+ images (and a very sophisticated
tree-like tag structure), I'd like to recover the database because it is
quite impossible to re-enter data, some of them being the result of
time-consuming historical research (XIX century photos) without backup
outside Digikam DBs.
Since Digikam segfaults, I can't access the Tools>Maintenance menu command.
How can I proceed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20250520/9681f3e7/attachment-0001.htm>
More information about the Digikam-users
mailing list