How to fix corrupted database?
Maik Qualmann
metzpinguin at gmail.com
Tue May 20 11:30:39 BST 2025
It's not a database error; digikam-8.6.0 crashes if the DNN face model binary
data is missing. This has already been fixed for digiKam-8.7.0. Go to the
digiKam setup under Miscellaneous -> System and click the button to download
the binary data.
To update the collection's base path, simply use the update function (circle
icon) next to the corresponding collection in the digiKam setup. Do not
manually manipulate the root album.
Maik
Am Dienstag, 20. Mai 2025, 11:43:17 Mitteleuropäische Sommerzeit schrieb
Patrick Gerlier:
> 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?
>
More information about the Digikam-users
mailing list