Bug 418939

Summary: Crash in metadata engine when search faces
Product: [Applications] digikam Reporter: Clon <fillip1>
Component: Metadata-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, metzpinguin, Paul.Daily.001
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In: 7.2.0
Sentry Crash Report:

Description Clon 2020-03-16 20:08:57 UTC
SUMMARY
Digikam crash ( cause crash of system).

STEPS TO REPRODUCE
1. install digikam 5.6.0 [Mint repos]
2. add photos (on HHD and external HDD) to library
3. run face detection

OBSERVED RESULT
system shuts down

EXPECTED RESULT
complete task and search trough all photos without crash.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Linux Mint 19.3 Cinnamon
(available in About System) https://termbin.com/gptr
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Clon 2020-03-16 20:12:41 UTC
Database satts:
digikam version 5.6.0
Obrázky: 
BMP: 5
GIF: 14
JPG: 52280
PNG: 171
RAW-NEF: 14
RAW-RW2: 38
XCF: 2
celkem: 52524
: 
Videa: 
AVI: 2
MOV: 21
MP4: 43
MPEG: 2
MTS: 4
WMV: 2
celkem: 74
: 
Celkem položek: 52598
Alba: 455
Značky: 172
: 
Podpůrná vrstva databáze: QSQLITE
Cesta k databázi: /home/anda/Obrázky/Digikam/
Comment 2 Clon 2020-03-16 20:14:19 UTC
About:libraries
KDE Frameworks 5.44.0
Qt 5.9.5 (sestaveno oproti 5.9.5)
xcb okenního systému
Comment 3 Clon 2020-03-16 20:14:57 UTC
Components info:
digikam version 5.6.0
CPU cores: 4
Eigen: 3.3.4
Exiv2: 0.25
Exiv2 can write to Jp2: Ano
Exiv2 can write to Jpeg: Ano
Exiv2 can write to Pgf: Ano
Exiv2 can write to Png: Ano
Exiv2 can write to Tiff: Ano
Exiv2 supports XMP metadata: Ano
KF5: 5.44.0
LensFun: 0.3.2-0
LibCImg: 130
LibJPEG: 80
LibJasper support: Ne
LibLCMS: 2090
LibLqr support: Ano
LibPGF: 7.15.32
LibPNG: 1.6.34
LibRaw: 0.18.2
LibTIFF: 4.0.9
Marble: 0.27.20
Parallelized demosaicing: Ano
Qt: 5.9.5
LibGphoto2: 2.5.16
LibKipi: 5.2.0
LibOpenCV: 3.2.0
LibQtAV: 1.12.0
Moduly Kipi: 
Podpora DBusu: Ano
Podpora HTML galerie: ano
Podpora pro AkonadiContact: ne
Podpora pro Baloo: Ano
Podpora pro kalendář: ne
Podpora pro panorama: ano
Podpora pro přehrávání médií: Ano
Podpůrná vrstva databáze: QSQLITE
Comment 4 Maik Qualmann 2020-03-16 20:50:24 UTC
DigiKam-5.6.0 is a very, very old version. Try the current AppImage digiKam-6.4.0. Or even better the current digiKam-7.0.0-beta3 from here:

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

Secondly, we need a backtrace, as described here:

https://www.digikam.org/contribute/

Maik
Comment 5 Clon 2020-03-17 15:27:36 UTC
When run with GDB, it even doesnt start. I suspect that I am doing something wrong.

https://hastebin.com/wapajimufe.coffeescript
Comment 6 caulier.gilles 2020-03-17 15:36:30 UTC
No, all is fine from you side.

Thread 1 "digikam" hit Catchpoint 1 (exception thrown), 0x00007ffff3988d1d in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007ffff3988d1d in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007fffef7c4411 in Exiv2::ExifKey::Impl::decomposeKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /usr/lib/x86_64-linux-gnu/libexiv2.so.14
#2  0x00007fffef7c44cc in Exiv2::ExifKey::ExifKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /usr/lib/x86_64-linux-gnu/libexiv2.so.14
#3  0x00007ffff66eff28 in Digikam::MetaEngine::getExifTagString(char const*, bool) const () from /usr/lib/digikam/libdigikamcore.so.5.6.0
#4  0x00007ffff6715576 in Digikam::DMetadata::getExifTagStringFromTagsList(QStringList const&) const () from /usr/lib/digikam/libdigikamcore.so.5.6.0
#5  0x00007ffff67163ae in Digikam::DMetadata::getPhotographInformation() const
    () from /usr/lib/digikam/libdigikamcore.so.5.6.0
#6  0x00007ffff68d2c2c in Digikam::ImagePropertiesSideBar::setImagePropertiesInformation(QUrl const&) () from /usr/lib/digikam/libdigikamcore.so.5.6.0
#7  0x00007ffff75d7514 in ?? () from /usr/lib/digikam/libdigikamgui.so.5.6.0
#8  0x00007ffff75d4ef5 in ?? () from /usr/lib/digikam/libdigikamgui.so.5.6.0
#9  0x00007ffff75d4fc6 in ?? () from /usr/lib/digikam/libdigikamgui.so.5.6.0
#10 0x00007ffff759abd7 in ?? () from /usr/lib/digikam/libdigikamgui.so.5.6.0
#11 0x00007ffff75b0e11 in ?? () from /usr/lib/digikam/libdigikamgui.so.5.6.0
#12 0x00007ffff430c555 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---Quit
(gdb) 

In fact it's Exiv2 from your system which crash when library analyze image metadata contents.

You use certainly an older Exiv2 version. This component is sensible in digiKam and used everywhere to population the database.

As Maik said, we recommend to try with digiKam official AppImage linux bundle which use the last Exiv2 version inside. Just donwload the AppImage digiKam file, make it executable and run it as well.

https://www.digikam.org/download/

Thanks in advance...

Gilles
Comment 7 Clon 2020-03-17 17:28:27 UTC
Crash also with AppImage https://www.pastefs.com/pid/201482

I don't know how to get debug info from crash because crash of digikam also crash system and it shutsdown.
Comment 8 Maik Qualmann 2020-03-17 19:07:09 UTC
You can pass the -debug option to the AppImage to run it in the GDB. I think the crash is related to the large amount of debug output from digiKam. We already know the crash under Ubuntu / Gnome. It probably crashes in the Gnome Shell. Please test the digiKam-7.0.0-Beta3, there the debug output is reduced.

Maik
Comment 9 caulier.gilles 2020-03-17 19:32:42 UTC
Note 7.0.0-bet3 appimage is available here :

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

Gilles Caulier
Comment 10 Clon 2020-03-19 19:54:01 UTC
Crash similar with digikam-7.0.0-beta3-20200318T054830-x86-64.appimage

https://hastebin.com/esunihofac.sql
Comment 11 Maik Qualmann 2020-03-19 21:14:30 UTC
The link to https://hastebin.com is currently not working, I will try again later.

Maik
Comment 12 Maik Qualmann 2020-03-20 08:23:57 UTC
No crash can be seen in the log. Please use the "debug" option correctly with "-debug". Create a GDB log again.

Maik
Comment 13 Clon 2020-03-20 14:17:39 UTC
I don't know how to create debug log. When I run face-recognition and digikam crash it cause shutdown of system.

How to get log after restart?
Comment 14 caulier.gilles 2020-03-20 14:28:35 UTC
It crash and shutdown computer using 7.0.0-beta3 AppImage ?

Gilles Caulier
Comment 15 Clon 2020-03-20 14:37:24 UTC
Yes. (Log is from run without crash.)
Comment 16 ThisIsPaulDaily 2020-06-07 17:35:00 UTC
Probably not too helpful, but I have the same crash whenever I try to scan for faces in version 7.0.0 Beta 3. Windows 10 32bit. 
I found that trying to launch it from powershell with the -debug parameter caused it to inform me that a number of .dll files are missing. 

I'm reinstalled using the 64bit exe file, and it appears to work now. (I'm only at 2% as I type, but it is at least scanning.)

I'm sorry that I didn't capture which .dll files were missing. There were several, and at least a handful had digiKam in the name.
Comment 17 Maik Qualmann 2020-06-14 09:34:56 UTC
Git commit 880b4c0faa511364135deed61e68e031b8ddfe2e by Maik Qualmann.
Committed on 14/06/2020 at 09:32.
Pushed by mqualmann into branch 'master'.

do not use static for this DImg function
Related: bug 422735, bug 421043

M  +3    -3    core/libs/dimg/dimg.h
M  +7    -8    core/libs/dimg/dimg_metadata.cpp

https://invent.kde.org/graphics/digikam/commit/880b4c0faa511364135deed61e68e031b8ddfe2e
Comment 18 caulier.gilles 2020-07-30 09:45:16 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Thanks in advance

Gilles Caulier
Comment 19 caulier.gilles 2020-08-29 20:28:30 UTC
Clon, 

Any feedback here please ?

Thanks in advance

Gilles Caulier
Comment 20 Maik Qualmann 2020-10-03 19:55:06 UTC
Fixed with bug 426175.

Maik