Lighttable deletes wrong picture
I noticed a very serious problem. I'm using lighttable to scan through my pics. I usually zoom them so that I only see a single picture. I expect that the picture I see is also the one I selected. So if I don't like a picture, I click the delete button. However, not the picture I see is deleted, but instead one I selected previously. So the problem is that moving to another picture with left/right keys only shows the previous/next picture, but doesn't select it.
In the end, I know deleted wrong pictures (I've a backup).
I'm running DT from git master. I got revision: 99e78b3e685bffd1325cb550d0cf187cecd78a76
I'm using OpenCL mode.
#1 Updated by Sebastian Stein over 6 years ago
The bug is still present in latest master revision: bf72921
It is really a serious one. Basically, when you work with lightable to directly delete photos, it sometimes deletes the wrong ones or more than you think you selected. This basically makes the whole lightable useless. At least for now, I only look at the pics in lightable, but delete them on my hardrive to make sure I got the correct ones.
#3 Updated by Sebastian Stein about 6 years ago
Please reopen. I tried with the 1.4rc1 release (built from source myself). It is rather easy to reproduce:
- open lighttable
- have about 20 raws
- zoom to see only one image
- use left/right keys to go through images
- delete some by just clicking on the delete button, but not first on the picture itself again!!!
- keep note of the images deleted
- after deleting one image, click with the mouse in the image window again so that you can navigate with left/right keys again
- it usually only happens after the 3rd or 4th image, but it can be reproduced easily
#5 Updated by Sebastian Stein about 6 years ago
Attached a screencast to illustrate the bug. I'm in lighttable mode and have 10 pictures.
- I zoom to the second one using my mouse wheel
- I press right key twice to get to 4th image
- I press left mouse button on 4th image
- I delete 4th image using delete button
- I press left mouse button on 5th image
- I press right key once to get to 6th image
- I delete 6th image
- it now jumps to 8th and not 7th image --> error
- number of images in current collections says 7, but there should be 8 --> error
- I press left mouse button on 8th image
- I press right key once to get to 9th image
- I delete 9th image using delete button
- number of images in current collections says 5, but there should be 7 --> error
- I zoom out to see all images left, only 4th, 6th and 9th should be missing, but more are missing --> error
- I reopen the directoy to see what's actually gone
- number of images in current collection says 7, which is expected
- 4th and 6th and 9th image are missing, which is expected
So at the moment, this simple use case shows that too many images are removed from the collection, but at least not the wrong images were deleted on disk. If this part is fixed, I can try again to see if I can provoke the situation where wrong images are also deleted from disk.
#6 Updated by Pascal Obry about 6 years ago
Would be nice if you could test: https://github.com/darktable-org/darktable/pull/402
I believe this fixes the issue, but I've not had time to test it in depth...