Bug 452567 - Crash with corrupted images after recovered my hard disk
Summary: Crash with corrupted images after recovered my hard disk
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (show other bugs)
Version: 7.7.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-13 05:42 UTC by Likdev-256
Modified: 2024-04-18 20:11 UTC (History)
2 users (show)

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


Attachments
Backtrace (111.54 KB, text/plain)
2022-04-13 05:42 UTC, Likdev-256
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Likdev-256 2022-04-13 05:42:28 UTC
Created attachment 148125 [details]
Backtrace

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Add a location with corrupted images (.png, .jpg)
2. Start Digikam and let the auto "Find New Item" Run

OBSERVED RESULT
Crash ---> /tmp/.mount_digiKaqBHx9S/AppRun: line 177:  7399 Segmentation fault      (core dumped) digikam $@

EXPECTED RESULT
Fully Find New Items without crashing when indexing corrupted images or videos

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Kernel Version: 5.16.14-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 2 × AMD A9-9420 RADEON R5, 5 COMPUTE CORES 2C+3G
Memory: 7.2 GiB of RAM
Graphics Processor: AMD STONEY

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2022-04-13 05:52:16 UTC
It seems to be crashing in the ImageMagick backend for metadata.

@Gilles, ImageMagick is not stable enough to read metadata from some image formats or corrupted images. Now that we have an ExifTool backend in digikam-8.0.0, I think we drop ImageMagick as metadata backend.

Maik
Comment 2 Likdev-256 2022-04-13 06:05:23 UTC
When is the version 8.0.0 release date and the stable 7.6.0 doesn't work at all
Can I request a feature like differentiating and deleting corrupted images,

Or I can do it my self if someone can explain the procedures or some sources for getting started
I am C and C++ dev
Comment 3 caulier.gilles 2022-04-13 06:29:07 UTC
Hi Maik,

I agree to disable IM backend. I think we can do the same with libheif.

I recommend to only disable the backends, not to drop as well, at least for the moment.

Gilles
Comment 4 Maik Qualmann 2022-04-24 15:03:22 UTC
Git commit 802d92a3ec46e2ca1b60aa0e2e9bdb8516d4f041 by Maik Qualmann.
Committed on 24/04/2022 at 14:58.
Pushed by mqualmann into branch 'master'.

add read Exiv2 warnings and errors
to then read the metadata with ExifTool
Related: bug 450117, bug 432265, bug 446363, bug 449637

M  +6    -0    core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +8    -0    core/libs/metadataengine/engine/metaengine_p.cpp
M  +1    -0    core/libs/metadataengine/engine/metaengine_p.h

https://invent.kde.org/graphics/digikam/commit/802d92a3ec46e2ca1b60aa0e2e9bdb8516d4f041
Comment 5 caulier.gilles 2022-11-29 12:51:39 UTC
To Likdev-256,

Please try to reproduce the problem with the AppImage Linux Bundle 8.0.0 pre-release available here :

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

This one includes the last commit from Maik which must fix the crash.

Note : backup your databases before, as between DK 7 and 8 the tables will be changed. You will be able to go back to DK 7 later with the new database files.

Best

Gilles Caulier
Comment 6 caulier.gilles 2022-11-29 12:56:18 UTC
Else to respond to your Q:

"Or I can do it my self if someone can explain the procedures or some sources for getting started, I am C and C++ dev"

The source code relevant of the crash is located in MetadataEngine which parse files metadata to register photo information in database at startup. The code is here :

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/dmetadata/dmetadata_imagemagick.cpp

This code is the metadata backend based on ImageMagick, that Maik has identified as the problem. It's called here, but commented as you can see :

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/dmetadata/dmetadata_fileio.cpp#L39

Best

Gilles Caulier
Comment 7 Maik Qualmann 2022-11-30 21:09:31 UTC
The ImageMagick metadata backend is currently disabled in digiKam-8.0.0 and not used. By using ExifTool there is hardly any reason to use another backend after Exiv2.

Maik
Comment 8 caulier.gilles 2023-04-19 05:56:53 UTC
@Likdev-256

digiKam 8.0.0 is released. This file still valid ?

Gilles Caulier
Comment 9 caulier.gilles 2023-05-16 03:02:49 UTC
Git commit 3d71acc72593534c2a1398d2945992fbbf45935a by Gilles Caulier.
Committed on 16/05/2023 at 03:00.
Pushed by cgilles into branch 'master'.

Switch bundles from Exiv2 0.27 maintenance branch to new 0.28 release
Related: bug 386291, bug 386291, bug 468830

M  +11   -8    project/bundles/3rdparty/ext_exiv2/CMakeLists.txt

https://invent.kde.org/graphics/digikam/commit/3d71acc72593534c2a1398d2945992fbbf45935a
Comment 10 caulier.gilles 2023-05-20 13:47:27 UTC
@Likdev-256

digiKam 8.1.0 pre-release AppImage bundle is now ported to Exiv2 0.28 which
come with a huge list of bugfixes :

https://github.com/Exiv2/exiv2/issues/2406#issuecomment-1529139799

AppImage file is available here :

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

How to use AppImage under Linux :

https://docs.digikam.org/en/getting_started/installation.html#digikam-on-linux

Thanks in advance for your feedback

Gilles Caulier
Comment 11 caulier.gilles 2023-10-09 14:35:30 UTC
@Likdev-256

Please give us a fresh feedback using the current digiKAm AppImage Linux bundle pre-release 8.2.0 available here:

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

thanks in advance

Gilles Caulier
Comment 12 caulier.gilles 2024-03-28 07:07:29 UTC
@Likdev,

digiKam 8.3.0 stable version is released and available at usual place :

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

Can you reproduce the dysfunction on your computer ?

Thanks in advance

Gilles Caulier
Comment 13 caulier.gilles 2024-04-18 20:11:27 UTC
Problem not reproducible with the Qt6 based AppImage bundle available here :

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