Bug 359505 - Image deleted after applying tag
Summary: Image deleted after applying tag
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Engine (show other bugs)
Version: 4.14.0
Platform: Ubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 16:22 UTC by antonio
Modified: 2017-08-13 07:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description antonio 2016-02-17 16:22:52 UTC
I'm experiencing a problem when I try to add/modify exif/iptc and other metadata tags 
This is a very strange and dangerous isn'it?
My environment is:
Ubuntu 14.04 xamd64
Linux 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 GNU/Linux
digikam 4:4.14.0-trusty~ppa1
Since digiKam use external libraries to manage metadata (Exiv2) I would like to involve exiv2 people clicking on Exiv2 library bugs and wishes on your support page  
but I can't do it because the link dev.robotbattle.com/bugs/my_view_page.php dosen't work.

Could you help me to find this destructive problem?
If you need more info or more test tell me that.
Waiting your help I send you my best regards
Antonio

Reproducible: Always

Steps to Reproduce:
1.Open digikam and select an image
2.try to change anything metadata 
3.click on apply button

Actual Results:  
the selected file will be deleted
Comment 1 caulier.gilles 2016-02-17 16:27:19 UTC
turn on debug space with kdebugdialog and run digiKAm from a console. Look trace printed while the destructive action.

See this page for details :

https://www.digikam.org/contrib

Gilles Caulier
Comment 2 antonio 2016-02-17 18:00:46 UTC
Thank you Gilles.
Waiting your help I disabled writing metadata into image and I enable writing them to sidecar file just to avoid unwanted effect. That work well.
Now, in order to follow your suggestion, I have restore the initial setting:
label into images, caption and titles and template (copyright etc)
Now I can reproduce the bug because now all it working, I don't know wy, Well!!
If problem appears again I'll put in action your suggestion.
Many thanks for you help
Best regards
Antonio
Comment 3 antonio 2016-02-20 11:15:37 UTC
Hi Gill,
the problem isn't solved yet.
the requested entries of kdebugdialog, during wrong operation, are:
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::getIptcKeywords: "/home/antonio/Immagini/img/IMG_0092.JPG"  ==> Read Iptc Keywords:  ()
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::setIptcKeywords: "/home/antonio/Immagini/img/IMG_0092.JPG"  ==> New Iptc Keywords:  ("Isole Eolie")
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::save: KExiv2::metadataWritingMode 0
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::save: Will write Metadata to file "IMG_0092.JPG"
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::Private::saveOperations: wroteComment:  true
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::Private::saveOperations: wroteEXIF:  true
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::Private::saveOperations: wroteIPTC:  true
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::Private::saveOperations: wroteXMP:  true
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::Private::saveOperations: File time stamp restored
digikam(4608)/KEXIV2 KExiv2Iface::KExiv2::save: Metadata for file "IMG_0092.JPG" written to file.
If I undersand well all operations are completed w/o errors!
Today I add a new ubuntu user and, surprise, digikam, on that user,  seems to work like a charm.
I'll test for a wile just to bew sure that it isn't a false test.
Many thanks and best regards
Antonio
Comment 4 antonio 2016-02-20 11:16:17 UTC
I'm sorry I put wron status
Comment 5 caulier.gilles 2016-02-20 11:21:21 UTC
digiKam handle Exiv2 C++ exception when there are generated of course. If Exiv2 has an error not wrapped by exception handler, no error will be printed on the console or on GUI by digiKam.

In all case, digiKam do not touch files while metadata management. All is delegate to Exvi2. If files are corrupted, this is an abnormal issue from Exiv2.

Gilles Caulier
Comment 6 caulier.gilles 2016-02-20 11:22:56 UTC
Another tips : Do not mix different Exiv2 version on your system (shared libs). I remember strange issue in this configuration. Only last 0.25 must be installed and digiKam compiled with it (look in Help/Components Info dialog for details)

Gilles Caulier
Comment 7 swatilodha27 2016-05-27 04:55:10 UTC
(In reply to antonio from comment #0)

Hello
Is this an SQLite or MySQL specific error?

I tried to reproduce the same using both MySQL Internal & Server:
1)Open digiKam and select an image.
2) Ctrl+Shift+M to Edit Metatdata.
3)Under EXIF/IPTC tag, edit.
4)Click on Apply.

This way I'm able to modify the metadata and the image isn't deleted.
Comment 8 caulier.gilles 2016-05-27 10:07:47 UTC
swati,

This entry is not relevant to database, but to low level metadata engine which write information to image file as well (Exiv2 interface)

Gilles Caulier
Comment 9 swatilodha27 2016-05-27 10:13:56 UTC
Right.

So does this have something to do with Exiv version incompatibility? (digiKam supports libexiv2 version >=0.25 )
Comment 10 caulier.gilles 2016-05-30 05:58:53 UTC
As Swati, with digiKam 5.0.0-beta6, the problem is not reproducible here. I use Exiv2 0.25.

So, i close this file as WORKFORME. If problem remain, don't hesitate to re-open and comment.

Gilles Caulier