Bug #11438

New "an error has occured while trying to open the database" dialog breaks basic flow

Added by Matthieu Moy over 3 years ago. Updated over 3 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
hardware architecture:



Since 09628329043692552ca6199e48853585e073ad79 (Bug #11405), when dt fails to lock the db, it opens a gtk dialog box to notify the user. This is good, but unfortunately this breaks the "open images in existing instance" flow:

Before the change, when dt was already running and I typed "darktable <some-image>", I was getting a warning on the command-line and the existing dt instance was opening the images, without any action from me. After the change, a dialog box opens and I have to click "close darktable" to open the images. Rather counter-intuitive to click "close darktable" to open it :-(.

I use this a lot. Most of the time I open darktable from digikam with "right-click -> open in darktable" which just worked before and now asks me one extra click.

Another use-case: I have an alias which does roughly:

backup-pictures; darktable-generate-cache; darktable; hibernate

which I run after an editing session. My machine does janitor work, hibernates, and when I switch it back on I have a freshly launched darktable. After the change, if I forget to close darktable at the end of my session the "darktable" steps blocks and my machine never reaches "hibernate".

Ideally, this dialog box should be shown only if connecting to the remote instance failed. Perhaps just not showing the dialog for "lock file contains a pid that seems to be alive in your system" would be OK too as it is most likely not an error case.



#1 Updated by Tobias Ellinghaus over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Fixed

That was already fixed in d384432c5e8104b3810ce882b48a2fa84fbf1fa0.

#2 Updated by Matthieu Moy over 3 years ago

Cool, thanks a lot!

#3 Updated by Matthieu Moy over 3 years ago

Actually, after testing, there's still a case where the behavior is suboptimal: when running darktable without argument. Previously, this was a no-op. Now, it shows the error dialog. Ideally, it would hint the window-manager from the running instance and exit in the instance just launched (i.e. what it does when there are files/directory on the command-line).

#4 Updated by Tobias Ellinghaus over 3 years ago

Starting darktable without filenames as arguments is exactly the case when the popup is intended to be shown. I am not aware of a sane/reliable way to find out if there is another instance to notify without adding hundreds of lines of code.

#5 Updated by Roman Lebedev over 3 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF

Go to top