Jade_NL
(Jacques)
May 15, 2022, 9:16am
2
This has come up a few times before, first one I thought of was this topic:
I’ve noticed that every time Darktable crashes it also looses all the edits made in the latest active editing session.
Is there anything that could be done about that behavior? Could we have a ctrl+s shortcut or have Darktable automatically save the changes?
There have been images that I have been working for an hour or two and lost everything because of an ungraceful app shutdown.
And its accompanying GitHub FR/Issue:
opened 04:30PM - 13 Jan 21 UTC
closed 10:50AM - 29 Jul 23 UTC
feature: new
difficulty: average
scope: UI
scope: DAM
bug: pending
<!-- IMPORTANT
Bug reports that do not make an effort to help the developers wi… ll be closed without notice.
Make sure that this bug has not already been opened and/or closed by searching the issues on GitHub, as duplicate bug reports will be closed.
A bug report simply stating that Darktable crashes is unhelpful, so please fill in most of the items below and provide detailed information.
-->
**Describe the bug**
I’ve noticed that every time Darktable crashes it also looses all the edits made in the latest active editing session.
Is there anything that could be done about that behavior? Could we have a ctrl+s shortcut or have Darktable automatically save the changes?
There have been images that I have been working for an hour or two and lost everything because of an ungraceful app shutdown.
**To Reproduce**
1. Import any image into Darktable and open it in darkroom
2. Make some edit (do not go to another image or exit darkroom)
3. Cause darktable to crash or shut down ungracefully (kill it from terminal or system monitor)
4. Launch Darktable, open the same image and observe that all of your edits are gone.
**Expected behavior**
Darktable should save changes to disk (xmp file) while editing. It should at least do that periodically and implement a clear label to show when there is unsaved history, similar to DaVinci Resolve. It should also implement CTRL+S shortcut to the save to xmp instead of soft proofing.
Of course, if it can be done so that everything is saved without the need for user awareness and input like CTRL+S, then the CTRL+S shortcut an labels or any GUI is not necessary.
**Screenshots**
If it can't be done all automatically then here's one possible way to address this:

**Platform (please complete the following information):**
- Darktable Version: darktable master, darktable 3.4.0
- OS: Ubuntu 20.04
**Additional context**
<!-- Add any other context about the problem here, for example:
- Can you reproduce with another Darktable version?
- Can you reproduce with a RAW or Jpeg or both?
- Are the steps above reproduce with a fresh edit (removing history)?
- Attach an XMP if this is necessary
- Did you compile Darktable yourself? If so which compiler was used, with what options?
- Is the issue still present using an empty/new config-dir
-->
Not sure if this is going to be implemented any time soon, if at all.
I made it a habit, when working with darktable, to use the ctrl-c - ctrl-v workaround as mentioned by me in the linked topic. It will not fully safeguard you from keeping all your edits when crashing, but at least you don’t have to start over all the way from scratch.
BTW: Compressing the history stack also works, but that might come with unwanted consequences: All duplicate entries in the stack are merged into one, the latest, so, after compressing, if you had, for example, multiple colour balance entries you cannot go back to the previous one any longer, there’s only one left.