Bug 473430 - Tagging deletes the image file
Summary: Tagging deletes the image file
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (other bugs)
Version First Reported In: 7.10.0
Platform: Debian stable ChromeOS
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-15 19:10 UTC by Vince Dugar
Modified: 2023-10-29 19:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.2.0
Sentry Crash Report:


Attachments
attachment-1718630-0.html (4.41 KB, text/html)
2023-08-15 20:49 UTC, Vince Dugar
Details
attachment-1719731-0.html (5.39 KB, text/html)
2023-08-15 21:00 UTC, Vince Dugar
Details
attachment-1719905-0.html (2.00 KB, text/html)
2023-08-15 21:01 UTC, Vince Dugar
Details
attachment-1805934-0.html (2.64 KB, text/html)
2023-08-16 14:37 UTC, Vince Dugar
Details
attachment-1822884-0.html (3.70 KB, text/html)
2023-08-16 17:42 UTC, Vince Dugar
Details
attachment-1828215-0.html (2.22 KB, text/html)
2023-08-16 18:46 UTC, Vince Dugar
Details
image.png (143.77 KB, image/png)
2023-08-16 18:50 UTC, Vince Dugar
Details
image.png (174.29 KB, image/png)
2023-08-17 17:37 UTC, Vince Dugar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Dugar 2023-08-15 19:10:12 UTC
SUMMARY
***
Adding an existing tag to an image makes the image unaccessable (deleted).  The thumbnail changes to a "rainbow" like image with JPG letters.  When in Albums > Thumbnails > Captions > Tags 
***


STEPS TO REPRODUCE
1.  See above
2. 
3. 

OBSERVED RESULT
Ditto

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:                   see below
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.15.112-19403-gb69e1c36e415
      Architecture: x86-64
Running on a Pixel Chromebook (Pixelbook Go)
Installed with apt.  Actually version 7.1.0 of Digikam
Comment 1 Maik Qualmann 2023-08-15 19:26:59 UTC
Such a problem has not been reported before. From this process we need a debug output from the terminal with the exported Qt debug variable. As described here:

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

Maik
Comment 2 Maik Qualmann 2023-08-15 20:13:21 UTC
I understand correctly that they are running the built-in virtual machine with Debian 11 in current Chrome OS Book?

Maik
Comment 3 Vince Dugar 2023-08-15 20:49:48 UTC
Created attachment 160991 [details]
attachment-1718630-0.html

Hi Maik,

I'm a retired engineer / programmer (C, Javascript) and rusty.  But maybe
this is what you're looking for from my terminal...

Thread 45 "Thread (pooled)" hit Catchpoint 1 (exception thrown),
0x00007ffff546ec2e in __cxa_throw () from
/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007ffff546ec2e in __cxa_throw () from
/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007ffff35f5047 in ?? () from /lib/x86_64-linux-gnu/libexiv2.so.27
#2  0x00007ffff366537a in
Exiv2::ImageFactory::open(std::auto_ptr<Exiv2::BasicIo>) () from
/lib/x86_64-linux-gnu/libexiv2.so.27
#3  0x00007ffff36654c6 in
Exiv2::ImageFactory::open(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool) ()
   from /lib/x86_64-linux-gnu/libexiv2.so.27
#4  0x00007ffff6ddf258 in Digikam::MetaEngine::load(QString const&) () from
/usr/lib/digikam/libdigikamcore.so.7.1.0
#5  0x00007ffff6e0d464 in Digikam::DMetadata::load(QString const&) () from
/usr/lib/digikam/libdigikamcore.so.7.1.0
#6  0x00007ffff6dffc34 in Digikam::DMetadata::DMetadata(QString const&) ()
from /usr/lib/digikam/libdigikamcore.so.7.1.0
#7  0x00007ffff6e5fcfa in
Digikam::ThumbnailCreator::createThumbnail(Digikam::ThumbnailInfo const&,
QRect const&) const ()
   from /usr/lib/digikam/libdigikamcore.so.7.1.0
#8  0x00007ffff6e5b489 in
Digikam::ThumbnailCreator::load(Digikam::ThumbnailIdentifier const&, QRect
const&, bool) const ()
   from /usr/lib/digikam/libdigikamcore.so.7.1.0
#9  0x00007ffff6e5bd82 in
Digikam::ThumbnailCreator::pregenerate(Digikam::ThumbnailIdentifier const&)
const () from /usr/lib/digikam/libdigikamcore.so.7.1.0
#10 0x00007ffff6e68973 in ?? () from
/usr/lib/digikam/libdigikamcore.so.7.1.0
#11 0x00007ffff6e69a3d in Digikam::LoadSaveThread::run() () from
/usr/lib/digikam/libdigikamcore.so.7.1.0
#12 0x00007ffff6e8a6ec in ?? () from
/usr/lib/digikam/libdigikamcore.so.7.1.0
#13 0x00007ffff5665ed2 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff5662be1 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff39f4ea7 in start_thread (arg=<optimized out>) at
pthread_create.c:477
#16 0x00007ffff52d4a2f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)

Take care,
Vince D

On Tue, Aug 15, 2023 at 3:27 PM Maik Qualmann <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=473430
>
> Maik Qualmann <metzpinguin@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |metzpinguin@gmail.com
>
> --- Comment #1 from Maik Qualmann <metzpinguin@gmail.com> ---
> Such a problem has not been reported before. From this process we need a
> debug
> output from the terminal with the exported Qt debug variable. As described
> here:
>
> https://www.digikam.org/contribute/
>
> Maik
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 4 Vince Dugar 2023-08-15 21:00:35 UTC
Created attachment 160992 [details]
attachment-1719731-0.html

Sorry, have to sign off for today.  Will get back to you tomorrow as
needed.
- Vince

On Tue, Aug 15, 2023 at 4:49 PM Vince Dugar <vince.dugar@gmail.com> wrote:

> Hi Maik,
>
> I'm a retired engineer / programmer (C, Javascript) and rusty.  But maybe
> this is what you're looking for from my terminal...
>
> Thread 45 "Thread (pooled)" hit Catchpoint 1 (exception thrown),
> 0x00007ffff546ec2e in __cxa_throw () from
> /lib/x86_64-linux-gnu/libstdc++.so.6
> (gdb) bt
> #0  0x00007ffff546ec2e in __cxa_throw () from
> /lib/x86_64-linux-gnu/libstdc++.so.6
> #1  0x00007ffff35f5047 in ?? () from /lib/x86_64-linux-gnu/libexiv2.so.27
> #2  0x00007ffff366537a in
> Exiv2::ImageFactory::open(std::auto_ptr<Exiv2::BasicIo>) () from
> /lib/x86_64-linux-gnu/libexiv2.so.27
> #3  0x00007ffff36654c6 in
> Exiv2::ImageFactory::open(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, bool) ()
>    from /lib/x86_64-linux-gnu/libexiv2.so.27
> #4  0x00007ffff6ddf258 in Digikam::MetaEngine::load(QString const&) ()
> from /usr/lib/digikam/libdigikamcore.so.7.1.0
> #5  0x00007ffff6e0d464 in Digikam::DMetadata::load(QString const&) () from
> /usr/lib/digikam/libdigikamcore.so.7.1.0
> #6  0x00007ffff6dffc34 in Digikam::DMetadata::DMetadata(QString const&) ()
> from /usr/lib/digikam/libdigikamcore.so.7.1.0
> #7  0x00007ffff6e5fcfa in
> Digikam::ThumbnailCreator::createThumbnail(Digikam::ThumbnailInfo const&,
> QRect const&) const ()
>    from /usr/lib/digikam/libdigikamcore.so.7.1.0
> #8  0x00007ffff6e5b489 in
> Digikam::ThumbnailCreator::load(Digikam::ThumbnailIdentifier const&, QRect
> const&, bool) const ()
>    from /usr/lib/digikam/libdigikamcore.so.7.1.0
> #9  0x00007ffff6e5bd82 in
> Digikam::ThumbnailCreator::pregenerate(Digikam::ThumbnailIdentifier const&)
> const () from /usr/lib/digikam/libdigikamcore.so.7.1.0
> #10 0x00007ffff6e68973 in ?? () from
> /usr/lib/digikam/libdigikamcore.so.7.1.0
> #11 0x00007ffff6e69a3d in Digikam::LoadSaveThread::run() () from
> /usr/lib/digikam/libdigikamcore.so.7.1.0
> #12 0x00007ffff6e8a6ec in ?? () from
> /usr/lib/digikam/libdigikamcore.so.7.1.0
> #13 0x00007ffff5665ed2 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
> #14 0x00007ffff5662be1 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
> #15 0x00007ffff39f4ea7 in start_thread (arg=<optimized out>) at
> pthread_create.c:477
> #16 0x00007ffff52d4a2f in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
> (gdb)
>
> Take care,
> Vince D
>
> On Tue, Aug 15, 2023 at 3:27 PM Maik Qualmann <bugzilla_noreply@kde.org>
> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=473430
>>
>> Maik Qualmann <metzpinguin@gmail.com> changed:
>>
>>            What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>                  CC|                            |metzpinguin@gmail.com
>>
>> --- Comment #1 from Maik Qualmann <metzpinguin@gmail.com> ---
>> Such a problem has not been reported before. From this process we need a
>> debug
>> output from the terminal with the exported Qt debug variable. As described
>> here:
>>
>> https://www.digikam.org/contribute/
>>
>> Maik
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
>
> --
> Vince Dugar    vince.dugar@gmail.com <><
>   "Our Constitution is designed only for a moral and religious people. It
> is wholly inadequate for any other."  -- John Adams, 1798
>
>
Comment 5 Vince Dugar 2023-08-15 21:01:57 UTC
Created attachment 160993 [details]
attachment-1719905-0.html

vdugar@penguin:~$ version
   Static hostname: penguin
         Icon name: computer-container
           Chassis: container
        Machine ID: 0915979d79cf481ca6db3fcd03b9292c
           Boot ID: a368c6e590b74ec3b67fce4585568be0
    Virtualization: lxc
  Operating System: Debian GNU/Linux 11 (bullseye)
            Kernel: Linux 5.15.112-19403-gb69e1c36e415
      Architecture: x86-64
---
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
vdugar@penguin:~$

On Tue, Aug 15, 2023 at 4:13 PM Maik Qualmann <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=473430
>
> --- Comment #2 from Maik Qualmann <metzpinguin@gmail.com> ---
> I understand correctly that they are running the built-in virtual machine
> with
> Debian 11 in current Chrome OS Book?
>
> Maik
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 6 Maik Qualmann 2023-08-16 05:46:31 UTC
At the moment I just wanted to see the debug output in the terminal, which is activated with the command before you start digiKam:

export QT_LOGGING_RULES="digikam*=true"

But I can see from your GDB backtrace that it is not digiKam-7.10, but digiKam-7.1.0. This version is 3 years old!
I think it doesn't make sense for us to debug such an old version, it would also have to be related to Exiv2, since that library changes the files when tagging.

Try our latest digiKam-8.2.0 AppImage to see if the problem can be reproduced.

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

Maik
Comment 7 Vince Dugar 2023-08-16 14:37:08 UTC
Created attachment 161006 [details]
attachment-1805934-0.html

Thank you Maik,
So I just learned something -- that I can't rely on 'apt install' to get
the latest version of xyz!  I'd think that would be administered...

I'll make another attempt to install (8.2.0) and see what happens.  That
version running on my Windows PC seems to be working fine.

PS --  I did do the export statement (and installed gdb -- with apt) --
just not sure if the backtrace needed to be "refreshed" by causing the
error again.  AND, I just figured out that I was probably in a different
shell than where I ran the export!

Retired but still learning,
Vince

On Wed, Aug 16, 2023 at 1:46 AM Maik Qualmann <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=473430
>
> --- Comment #6 from Maik Qualmann <metzpinguin@gmail.com> ---
> At the moment I just wanted to see the debug output in the terminal, which
> is
> activated with the command before you start digiKam:
>
> export QT_LOGGING_RULES="digikam*=true"
>
> But I can see from your GDB backtrace that it is not digiKam-7.10, but
> digiKam-7.1.0. This version is 3 years old!
> I think it doesn't make sense for us to debug such an old version, it would
> also have to be related to Exiv2, since that library changes the files when
> tagging.
>
> Try our latest digiKam-8.2.0 AppImage to see if the problem can be
> reproduced.
>
> https://files.kde.org/digikam/
>
> Maik
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 8 Vince Dugar 2023-08-16 17:42:42 UTC
Created attachment 161011 [details]
attachment-1822884-0.html

PS -- Can you give me the 'apt install' syntax to install digiKam on Debian
from a repository?  I'd rather not run an appimage.
Thanks,
Vince D

On Wed, Aug 16, 2023 at 10:36 AM Vince Dugar <vince.dugar@gmail.com> wrote:

> Thank you Maik,
> So I just learned something -- that I can't rely on 'apt install' to get
> the latest version of xyz!  I'd think that would be administered...
>
> I'll make another attempt to install (8.2.0) and see what happens.  That
> version running on my Windows PC seems to be working fine.
>
> PS --  I did do the export statement (and installed gdb -- with apt) --
> just not sure if the backtrace needed to be "refreshed" by causing the
> error again.  AND, I just figured out that I was probably in a different
> shell than where I ran the export!
>
> Retired but still learning,
> Vince
>
> On Wed, Aug 16, 2023 at 1:46 AM Maik Qualmann <bugzilla_noreply@kde.org>
> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=473430
>>
>> --- Comment #6 from Maik Qualmann <metzpinguin@gmail.com> ---
>> At the moment I just wanted to see the debug output in the terminal,
>> which is
>> activated with the command before you start digiKam:
>>
>> export QT_LOGGING_RULES="digikam*=true"
>>
>> But I can see from your GDB backtrace that it is not digiKam-7.10, but
>> digiKam-7.1.0. This version is 3 years old!
>> I think it doesn't make sense for us to debug such an old version, it
>> would
>> also have to be related to Exiv2, since that library changes the files
>> when
>> tagging.
>>
>> Try our latest digiKam-8.2.0 AppImage to see if the problem can be
>> reproduced.
>>
>> https://files.kde.org/digikam/
>>
>> Maik
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
>
> --
> Vince Dugar    vince.dugar@gmail.com <><
>   "Our Constitution is designed only for a moral and religious people. It
> is wholly inadequate for any other."  -- John Adams, 1798
>
>
Comment 9 caulier.gilles 2023-08-16 17:47:21 UTC
Why not AppImage. Nothing is installed on your system, all run in memory. Do do it for you and we support this kind of bundle, not the linux standard package.

Gilles Caulier
Comment 10 Vince Dugar 2023-08-16 18:46:31 UTC
Created attachment 161013 [details]
attachment-1828215-0.html

I was leary of appimage because of startup time and the fact that it wanted
me to download the support files for face recognition.  But I tried it
again and it's running 8.2.0 on my chromebook. I had to run AppRun to get
it to start (vs executing the .appimage file...

-rwxrwxrwx 1 vdugar vdugar 258651328 Aug 16 11:32
digiKam-8.2.0-20230724T132443-x86-64.appimage*
drwxr-xr-x 1 vdugar vdugar       116 Aug 16 11:43 ./
drwxr-xr-x 1 vdugar vdugar       102 Aug 16 11:43 squashfs-root/
drwxr-xr-x 1 vdugar vdugar      1068 Aug 16 12:43 ../
vdugar@penguin:~/my_downloads$ *squashfs-root/AppRun*

If I can reproduce my original bug (picture file corrupted/deleted after
editing the image tag), I'll let you know!
Thanks,
Vince D

On Wed, Aug 16, 2023 at 1:47 PM <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=473430
>
> --- Comment #9 from caulier.gilles@gmail.com ---
> Why not AppImage. Nothing is installed on your system, all run in memory.
> Do do
> it for you and we support this kind of bundle, not the linux standard
> package.
>
> Gilles Caulier
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 11 Vince Dugar 2023-08-16 18:50:50 UTC
Created attachment 161014 [details]
image.png

It still fails with 8.2.0 -- Image thumbnail becomes a JPG icon and fails
to load when I tried to apply a tag.
[image: image.png]
- Vince

On Wed, Aug 16, 2023 at 2:46 PM Vince Dugar <vince.dugar@gmail.com> wrote:

> I was leary of appimage because of startup time and the fact that it
> wanted me to download the support files for face recognition.  But I tried
> it again and it's running 8.2.0 on my chromebook. I had to run AppRun to
> get it to start (vs executing the .appimage file...
>
> -rwxrwxrwx 1 vdugar vdugar 258651328 Aug 16 11:32
> digiKam-8.2.0-20230724T132443-x86-64.appimage*
> drwxr-xr-x 1 vdugar vdugar       116 Aug 16 11:43 ./
> drwxr-xr-x 1 vdugar vdugar       102 Aug 16 11:43 squashfs-root/
> drwxr-xr-x 1 vdugar vdugar      1068 Aug 16 12:43 ../
> vdugar@penguin:~/my_downloads$ *squashfs-root/AppRun*
>
> If I can reproduce my original bug (picture file corrupted/deleted after
> editing the image tag), I'll let you know!
> Thanks,
> Vince D
>
> On Wed, Aug 16, 2023 at 1:47 PM <bugzilla_noreply@kde.org> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=473430
>>
>> --- Comment #9 from caulier.gilles@gmail.com ---
>> Why not AppImage. Nothing is installed on your system, all run in memory.
>> Do do
>> it for you and we support this kind of bundle, not the linux standard
>> package.
>>
>> Gilles Caulier
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
>
> --
> Vince Dugar    vince.dugar@gmail.com <><
>   "Our Constitution is designed only for a moral and religious people. It
> is wholly inadequate for any other."  -- John Adams, 1798
>
>
Comment 12 Maik Qualmann 2023-08-16 19:33:13 UTC
The problem will surely be related to the virtual machine in Chrome OS.
Please activate writing with ExifTool with the digiKam-8.2.0 version in the digiKam settings under Metadata. Please test whether the problem can be reproduced. Otherwise please the debug log from the terminal. It's very simple you type in the "export" command in the terminal and then type in the "digikam" command in the same terminal. Copy the output in the terminal and post it here.

export QT_LOGGING_RULES="digikam*=true"
digiKam-8.2.0-xxxxx-x86-64.appimage

Maik
Comment 13 Vince Dugar 2023-08-17 17:37:10 UTC
Created attachment 161031 [details]
image.png

Looking better now.  After making the ExifTool changes below (running on my
chromebook), I can write tags to images without causing file corruption.
Thank you for the advice!

As a side note, I know the image file was updated (confirmed by examining
the file on a Windows machine) -- but the instance of digiKam on that
machine is not seeing the image update -- it is viewable but without the
updated tag.  I even restarted that instance of digiKam but it's not seeing
the changes. Maybe it's a setting -- like "Monitor the albums for external
changes (requires restart)".

- Vince D

[image: image.png]

On Wed, Aug 16, 2023 at 3:33 PM Maik Qualmann <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=473430
>
> --- Comment #12 from Maik Qualmann <metzpinguin@gmail.com> ---
> The problem will surely be related to the virtual machine in Chrome OS.
> Please activate writing with ExifTool with the digiKam-8.2.0 version in the
> digiKam settings under Metadata. Please test whether the problem can be
> reproduced. Otherwise please the debug log from the terminal. It's very
> simple
> you type in the "export" command in the terminal and then type in the
> "digikam"
> command in the same terminal. Copy the output in the terminal and post it
> here.
>
> export QT_LOGGING_RULES="digikam*=true"
> digiKam-8.2.0-xxxxx-x86-64.appimage
>
> Maik
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 14 Vince Dugar 2023-08-17 17:46:24 UTC
Found it!  Album > Reread Metadata from Files -- shows the changes make to the file -- viewed in digiKam on the Windows machine. :)
Comment 15 Maik Qualmann 2023-08-17 17:50:17 UTC
To do this automatically during the digiKam start scan, activate the option "Reread metadata if file is changed" in the metadata settings. Not the album monitoring option.

Maik
Comment 16 caulier.gilles 2023-08-17 17:54:48 UTC
If Exiv2 corrupt file and not ExifTool, well the bug is certainly located in Exiv2 library. Please report this problem to Exiv2 project for github:

https://github.com/Exiv2/exiv2

Gilles Caulier
Comment 17 Vince Dugar 2023-08-17 18:07:50 UTC
(In reply to caulier.gilles from comment #16)
> If Exiv2 corrupt file and not ExifTool, well the bug is certainly located in
> Exiv2 library. Please report this problem to Exiv2 project for github:
> 
> https://github.com/Exiv2/exiv2
> 
> Gilles Caulier

Thank you.  I may do that. 
-V
Comment 18 Vince Dugar 2023-08-17 18:33:23 UTC
(In reply to caulier.gilles from comment #16)
> If Exiv2 corrupt file and not ExifTool, well the bug is certainly located in
> Exiv2 library. Please report this problem to Exiv2 project for github:
> 
> https://github.com/Exiv2/exiv2
> 
> Gilles Caulier

Gilles, It looks like you're already working with the exiv2 team in github.  I can add my 2 cents if that would help.
Comment 19 Maik Qualmann 2023-10-29 19:08:34 UTC
Fixed with Bug 394736
We now use QIODevice to read and write with Exiv2.

Maik