Bug 416743 - Face rectangle tool gets deselected if changes are being written to file
Summary: Face rectangle tool gets deselected if changes are being written to file
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 8.4.0
Platform: Appimage Linux
: NOR minor
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-25 12:26 UTC by MarcP
Modified: 2024-05-06 00:52 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2020-01-25 12:26:22 UTC
SUMMARY
In digikam, there's a tool ("Add face tag") that allows you to manually draw a face rectangle on a picture. If a picture has two or more faces, after drawing and naming the first one, when you are about to draw the second one, the selection disappears and the cursor goes back to the default one, so you have to start over with that face. 

I believe digikam is just saving the changes in the picture, and that "resets" the current tool in preview mode.

STEPS TO REPRODUCE
1. Open picture in preview mode.
2. Draw and name one face rectangle using the "Add face tag" tool.
3. Immediately draw and name another one.

OBSERVED RESULT
While you are drawing or writing the name of the second one, the picture will be "reset" and the cursor goes back to the default one, losing the unsaved face rectangle you were drawing.

EXPECTED RESULT
Nothing, it should allow you to continue drawing the face rectangle, even if changes are being saved in the background.

SOFTWARE/OS VERSIONS

digikam-7.0.0-beta2-20200124T055125-x86-64.appimage in Ubuntu 18.04LTS with Unity.
Comment 1 Maik Qualmann 2020-01-25 12:38:45 UTC
I don't know if I understand the bug report correctly. You mean that the mouse cursor for drawing facial rectangles goes back to the normal mouse cursor after drawing. That is the intention. You can also start again with Ctrl + left mouse button to draw a face rectangle.

Maik
Comment 2 MarcP 2020-01-25 12:43:53 UTC
Not exactly, it goes back to the normal mouse cursor while you are drawing a new face (or writing its name). It's very easy to reproduce.
Comment 3 Maik Qualmann 2020-01-25 12:45:42 UTC
If a face rectangle is even deleted, the effect is that you have activated the option to clean up the database. As I said before, only activate this option if it is really needed temporarily for a metadata read function.

Maik
Comment 4 Maik Qualmann 2020-01-25 12:56:04 UTC
I think we need a screencast, I can't reproduce a problem here.

Maik
Comment 5 MarcP 2020-01-25 13:01:23 UTC
Mmmm, not exactly, it's not "being deleted". Basically, when you save metadata to a file, especially if the file system is slow (like a NAS, so it takes a couple seconds to save the changes), the picture (in preview mode) "blinks" for a second. During that "blink", whatever you were doing gets "reset". Nothing gets deleted because nothing has been saved yet.

However, I just tried to reproduce it with another picture (both with the clean up database enabled and disabled), and now it didn't happen. Weird.

In any case, you know what I mean when I talk about that "blink", right? When changes are being saved, the interface becomes irresponsible for a moment, and face tags, if set to visible, are hidden for an instant. It is during that blink that the bug happens. If you were in the middle of drawing a face rectangle, it gets reset to the default cursor. But not always, and this is what I am trying to figure out now.

I'll try to capture the screen if I can consistently reproduce the bug, don't worry. In any case, it's nothing important, just a minor inconvenience.
Comment 6 Maik Qualmann 2020-01-25 14:49:47 UTC
(In reply to MarcP from comment #5)

> In any case, you know what I mean when I talk about that "blink", right?

No ((:-))

The face rectangles disappear for the time they are saved. I can only see it here on my test router NAS, which uses a USB stick as storage. The image itself does not blink.

Maik
Comment 7 Maik Qualmann 2020-03-12 07:06:08 UTC
I looked a little more into the code here. Writing the metadata triggers a refresh of the view. The face rectangles are deleted and reloaded. If your file system is so slow, there is of course a longer phase where no face rectangles are visible. But we need the refresh, at the moment I have no idea for a fix.

Maik
Comment 8 caulier.gilles 2023-05-06 08:27:14 UTC
@MarcP

I suppose that problem still present with 8.0.0 ?

Gilles
Comment 9 MarcP 2023-05-06 11:01:11 UTC
Yes.
Comment 10 caulier.gilles 2024-04-20 03:23:01 UTC
Hi all,

The digiKam 8.4.0 Appimage bundle pre-release is now based on last modern frameworks Qt 6.7.0 and KDE 6.2.0.

File can be downloaded at usual place : https://files.kde.org/digikam/
Take a  care : the bundle is named with the suffix "-Qt6" not "-Qt5". This bundle is compiled under Ubuntu 22.04 and require a Linux with GlibC version >= 2.35 to run.

Can you reproduce the dysfonction with this version?

Thanks in advance

Gilles Caulier
Comment 11 MarcP 2024-05-05 23:58:01 UTC
Yep, still happens. It depends on how long it takes for the system to finish saving changes to the image. If you start working on another face rectangle before it has finished saving changes, it will get deselected.