Bug 502743 - digiKam crash when launching faces database training : mesa libs are missing.
Summary: digiKam crash when launching faces database training : mesa libs are missing.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Faces (show other bugs)
Version: 8.6.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-13 12:44 UTC by philippe.quaglia
Modified: 2025-05-01 10:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description philippe.quaglia 2025-04-13 12:44:39 UTC
SUMMARY
Digikam crash when launching faces database training

STEPS TO REPRODUCE
1.  Start digikam 8.6.0, as an appimage under Ubuntu
2. A message is displayed saying that the face database must be trained, because the current model is obsolete
3. Press ok

OBSERVED RESULT
Direct crash

EXPECTED RESULT
Digikam continuing working, with the faces database trained

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Ubuntu 24.10, Appimage
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Here is a copy of the messages I get when launched from a terminal:

philippe@philippe-desktop:~/AppImages$ ./digikam.appimage
-- digiKam Linux AppImage Bundle
-- Use 'help' as CLI argument to know all available options for digiKam application.
-- Notes: to integrate this bundle to your desktop, use AppImageLauncher.
--        to enable all debug messages on the console, use 'export QT_LOGGING_RULES="digikam*=true"'.
--        to extract the bundle contents locally, use option '--appimage-extract' on the command line.
-- Detected host Linux Ubuntu-64-24.10
-- AppImage mounted directory: /tmp/.mount_digikaggrtAF
Preloading skipped for libudev.so.0
Preloading             /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0
Preloading skipped for libcrypto.so.1.1
Preloading skipped for libssl.so.1.1
Preloading skipped for libnss3.so
Preloading             /usr/lib/x86_64-linux-gnu/libnssutil3.so
Preloading skipped for libsmime3.so
Preloading             /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
Preloading skipped for libgnutls.so.30
Preloading             /usr/lib/x86_64-linux-gnu/libnettle.so.8
-- Preloading shared libs: :/usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0:/usr/lib/x86_64-linux-gnu/libnssutil3.so:/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0:/usr/lib/x86_64-linux-gnu/libnettle.so.8
unknown: Could not find the Qt platform plugin "wayland" in ""
unknown: Failed to acquire watch file descriptor Permission non accordée
unknown: QSvgHandler: Image filename is empty
unknown: QSvgHandler: Image filename is empty
MESA-LOADER: failed to open nouveau: ././/lib/dri/nouveau_dri.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce nom (search paths ././/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:././/lib/dri, suffix _dri)
MESA-LOADER: failed to open zink: ././/lib/dri/zink_dri.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce nom (search paths ././/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:././/lib/dri, suffix _dri)
MESA-LOADER: failed to open kms_swrast: ././/lib/dri/kms_swrast_dri.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce nom (search paths ././/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:././/lib/dri, suffix _dri)
MESA-LOADER: failed to open swrast: ././/lib/dri/swrast_dri.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce nom (search paths ././/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:././/lib/dri, suffix _dri)
unknown: QSvgHandler: Image filename is empty
unknown: QSvgHandler: Image filename is empty
unknown: Unhandled container to remove :  Digikam::DigikamApp
unknown: QSvgHandler: Image filename is empty
unknown: QSvgHandler: Image filename is empty
unknown: QSvgHandler: Image filename is empty
unknown: QSvgHandler: Image filename is empty
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2776.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2806.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2833.xcf"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file with Exiv2 backend: /mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf : Le fichier contient des données de type inconnu"
Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata with Exiv2:  (Error # 12 :  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf : Le fichier contient des données de type inconnu"
unknown: Can not load " "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf" " using DImg::DImgQImageLoader!
unknown: Error message from loader: "Format d'image non supporté"
Digikam::ThumbnailCreator::createThumbnail: Cannot create thumbnail for "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf"
Digikam::ThumbnailCreator::load: Thumbnail is null for  "/mnt/2f05e4b1-d13b-445d-8c36-93703587c231/2025_Photos/2025_04/Pola_202504_2780.xcf"
Digikam::DNNFaceDetectorYuNet::loadModels: Face detection model: YuNet not loaded
Digikam::DNNFaceDetectorYuNet::DNNFaceDetectorYuNet: Failed to load YuNet model
terminate called after throwing an instance of 'QUnhandledException'
  what():  std::exception
/tmp/.mount_digikaggrtAF/AppRun : ligne 261 : 37699 Abandon                 (core dumped) digikam $@
philippe@philippe-desktop:~/AppImages$
Comment 1 caulier.gilles 2025-04-13 13:08:37 UTC
It's clear that mesa package is absent of the AppImage. The same problem exists in Windows installer and it's have been fixed recently (Windows  only for the moment).

We need to append mesa in the AppImage bundle. It's in my TODO.

Work around : installing the mesa libraries on your ubuntu must fix the problem :

apt install mesa-common-dev

This will install the devel package + all the necessary binary forms (even if devel package will not be used here).

Best

Gilles Caulier
Comment 2 caulier.gilles 2025-04-13 13:10:46 UTC
You can also try the 8.7.0 per-release that i rebuild all from scratch :

https://files.kde.org/digikam/

...If by change mesa dependencies have been automatically append to the bundle...

Best

Gilles Caulier
Comment 3 Maik Qualmann 2025-04-13 17:34:57 UTC
This looks more like the binary model data wasn't downloaded. And I think this has been fixed in digiKam 8.7.0, which is causing the crash.

Digikam::DNNFaceDetectorYuNet::loadModels: Face detection model: YuNet not loaded
Digikam::DNNFaceDetectorYuNet::DNNFaceDetectorYuNet: Failed to load YuNet model
terminate called after throwing an instance of 'QUnhandledException'
  what():  std::exception

Maik
Comment 4 caulier.gilles 2025-04-13 18:23:35 UTC
philippe,

Try to run the 8.7.0 AppImage bundle for Linux available here.

https://files.kde.org/digikam/

And Thanks to Maik for the expertise (:=)))...

Best

Gilles
Comment 5 philippe.quaglia 2025-04-21 15:25:41 UTC
Hello, I have tested the current 8.7.0 pre-release, and this problem does not exist anymore. No crash when launching the process. Thanks for having fixed it.

However, running the face search, after almost two hours, digikam has crashed due to memory limitation. It seems it has used the whole memory of my laptop (8 Go). I don't know if crashing during this process leave some incomplete files, and/or if it is possible to restart the process from when it was before the crash ?
I tried again, with the memory usage display on, and it seems that the amount of memory used is slowly increasing during the search process. Is there a memory leak, or is it really needed ?
Comment 6 Michael Miller 2025-04-21 16:53:48 UTC
(In reply to philippe.quaglia from comment #5)
> Hello, I have tested the current 8.7.0 pre-release, and this problem does
> not exist anymore. No crash when launching the process. Thanks for having
> fixed it.
> 
> However, running the face search, after almost two hours, digikam has
> crashed due to memory limitation. It seems it has used the whole memory of
> my laptop (8 Go). I don't know if crashing during this process leave some
> incomplete files, and/or if it is possible to restart the process from when
> it was before the crash ?
> I tried again, with the memory usage display on, and it seems that the
> amount of memory used is slowly increasing during the search process. Is
> there a memory leak, or is it really needed ?

Hi Philippe,
There shouldn't be a memory leak.  I'll retest digiKam to see if there is a regression.

Cheers,
Mike
Comment 7 caulier.gilles 2025-04-21 18:05:15 UTC
It can be a leak in the GPU backend used by OpenCV. Did you turn on the OpenCL support in DK/Setup/Miscs/System dialog?
Comment 8 philippe.quaglia 2025-05-01 09:06:51 UTC
No, I did not turn on the OpenCL support. I was not even aware of this option. I will try again with this option on.
Comment 9 philippe.quaglia 2025-05-01 10:23:36 UTC
Hello. I'm running again face detection, now with the OpenCL option on. It seems to work fine, after one hour or so, its at 40% of my collections, and the memory usage is slowly moving (up and down) between 4,7 and 5,3 Go. There is no trend up. I do not know what was the problem during my previous try, but now it seems fine.
Thanks again for all your work.