deadlock while importing the same folder twice in parallel
1). Let's say path/to/newfilmroll contains some not yet imported pictures
2). Pass this path twice on command line to darktable: darktable path/to/newfilmroll path/to/newfilmroll
3). Only a couple of images will appear (just rectangles, no thumbs) and import will hang
4). At least sometimes after that darktable doesn't cleanly exit, you may have to kill it
#2 Updated by Igor Kuzmin over 6 years ago
I have to point out that specifying directory as command line argument isn't the only way to trigger this bug, just the easiest to reproduce. There are import button, D'n'D, OS X open events... I really think this should be fixed (and not just by filtering command line arguments obviously).
#4 Updated by Jérémy Rosen almost 6 years ago
While testing Lua I trigger the import of the same folder dozen of times simultaneously (creating a shortcut to do it and spamming that shortcut)
I know that there is a rare case of interlocking that I have discussed with jo already, but it is very hard to trigger...
IIRC the problem is that two threads want to access two locks, one on an image and the other is the gdk lock... I don't remember exactly the details
it's very hard to trigger though, even using lua to spam...
#5 Updated by Tobias Ellinghaus almost 6 years ago
I haven't checked if this is really an issue, just thinking loud: When importing an image we add a new entry to the db, and then query it to get the auto generated id. When the same image is imported twice I could imagine that the 2nd job inserts an entry but gets the id from the 1st job which could lead to problems. If it got the correct id it would just add a duplicate.