Bug 481735 - program crashes when trying to open an image with parameter luminosity in metadata
Summary: program crashes when trying to open an image with parameter luminosity in met...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (other bugs)
Version First Reported In: 8.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-23 20:34 UTC by Ivan
Modified: 2024-02-24 22:03 UTC (History)
1 user (show)

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


Attachments
In the attached files is an example of an image with metadata that is causing the crash (198.80 KB, image/jpeg)
2024-02-23 20:34 UTC, Ivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2024-02-23 20:34:52 UTC
Created attachment 166045 [details]
In the attached files is an example of an image with metadata that is causing the crash

SUMMARY
If the image metadata has a parameter with more characters after zero (3.9000009536743164), a crash occurs. And what is worse, after that it is impossible to load the program, and have to demolish the whole database, so that it does not contain this number.

STEPS TO REPRODUCE
1. Download the attached file
2. Try to read it in the program or enter it into the database
3. See the result

OBSERVED RESULT
crash

EXPECTED RESULT
no crashes program and database didn't crash

SOFTWARE/OS VERSIONS
Windows: Windows 11 Pro 23H2
Comment 1 Maik Qualmann 2024-02-23 20:45:38 UTC
It doesn't crash here under Linux, the cause is the same as in Bug 480345, the Exif.UserComment.

Maik

*** This bug has been marked as a duplicate of bug 480345 ***
Comment 2 Maik Qualmann 2024-02-24 22:03:12 UTC
Git commit cb335c2e95de4a5927c888894d5baf3612450802 by Maik Qualmann.
Committed on 24/02/2024 at 21:59.
Pushed by mqualmann into branch 'master'.

add special case for unicode decoding in Exif.Photo.UserComment
Related: bug 480345
FIXED-IN: 8.3.0

M  +2    -2    NEWS
M  +8    -4    core/libs/metadataengine/engine/metaengine.cpp
M  +2    -0    core/libs/metadataengine/engine/metaengine_data_p.cpp
M  +5    -4    core/libs/metadataengine/engine/metaengine_data_p.h
M  +9    -4    core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +47   -28   core/libs/metadataengine/engine/metaengine_p.cpp
M  +9    -7    core/libs/metadataengine/engine/metaengine_p.h

https://invent.kde.org/graphics/digikam/-/commit/cb335c2e95de4a5927c888894d5baf3612450802