Bug 425961

Summary: In pictures taken on certain cameras, garbage data is read into captions field
Product: [Applications] digikam Reporter: manekineko
Component: Tags-CaptionsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.0.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 7.1.0
Sentry Crash Report:

Description manekineko 2020-08-29 22:04:48 UTC
SUMMARY
Digikam is improperly reading metadata from pictures taken on certain cameras, resulting in garbage data being displayed in the Captions field.

Cameras affected include at least the LG-V10 smartphone (aka LG-H901). 

STEPS TO REPRODUCE
1. Load the attached sample image into Digikam.

OBSERVED RESULT
Observe that the Captions field is the following: "  FC111111111:zzzzzz0 a 93 078043874441663838014c0 bac2fd15746c548c31452e8624561334d33487a12130282f451391b16162e13f336630e414542bd40b414b4c10483d1514df845c514546e63b9e"

EXPECTED RESULT
The captions field should be blank. This result can be confirmed by loading the image in XNView 0.96.5, IrfanView 4.54, and Windows 10 build 2004 File Explorer.

SOFTWARE/OS VERSIONS
Windows: Windows 10 build 2004

ADDITIONAL INFORMATION
Many more samples are available upon request.
Comment 1 manekineko 2020-08-29 22:19:23 UTC
The sample image was too large to upload to the bug tracker, so I have uploaded it to a file share:

https://www.transfernow.net/sKPcTH082020
Comment 2 Maik Qualmann 2020-08-30 05:29:59 UTC
Problem cannot be reproduced here. Which digiKam version (build) are you using exactly? With a current version of Exiv2 built in, the user comment is decoded as "binary comment". This is filtered in digiKam-7.1.0.

Maik
Comment 3 caulier.gilles 2020-08-30 07:38:35 UTC
As Maik, I cannot reproduce the problem here, with digiKam 7.1.0 and Exiv2 0.27.3.

Please test with current Windows installer available here :

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

Gilles Caulier
Comment 4 Maik Qualmann 2020-08-30 08:02:55 UTC
Note: If you test the new version, you have to temporarily activate the "cleanup database" option in the metadata settings. So that the incorrect comment is deleted from the database when you re-read the metadata of the problematic images.

Maik
Comment 5 manekineko 2020-08-30 15:40:07 UTC
(In reply to Maik Qualmann from comment #4)
> Note: If you test the new version, you have to temporarily activate the
> "cleanup database" option in the metadata settings. So that the incorrect
> comment is deleted from the database when you re-read the metadata of the
> problematic images.
> 
> Maik

I upgraded to 7.1.0, which shows in the About screen as "Build date: Aug 28 2020".

Under Configure digiKam => Metadata => Reading and Writing Metadata, I checked Clean up the metadata from the database when rescan files. This is the setting you were talking about, right?

I then clicked on the folder containing the file and hit Refresh, but after the scan completed, the bad captions remained.

I then went to Tools => Maintenance. I unselected Whole albums collections and selected my folder. I then checked Perform database cleaning. Once the operation completed, the bad captions remained.

Are these the operations that were expected to clear up the bad captions or did I misinterpret anything?
Comment 6 Maik Qualmann 2020-08-31 06:48:46 UTC
You have to reread the metadata of the images. Either menu-> album-> reread metadata from the images. Or the selected images via Menu-> Items-> reread metadata from file. Or the corresponding module in the maintenance tool.

Maik
Comment 7 manekineko 2020-08-31 15:04:34 UTC
(In reply to Maik Qualmann from comment #6)
> You have to reread the metadata of the images. Either menu-> album-> reread
> metadata from the images. Or the selected images via Menu-> Items-> reread
> metadata from file. Or the corresponding module in the maintenance tool.
> 
> Maik

Thanks. I could not find the corresponding module in the maintenance tool, but I can confirm that on 7.1 after rereading the metadata from files that the garbage data has been removed.
Comment 8 caulier.gilles 2020-08-31 15:40:41 UTC
Thanks for the feedback.

I close this file now.

Gilles Caulier