Autosave should save even if the file is unchanged since the last save to avoid data loss during crash on save

Bug #1805552 reported by cfr
This bug report is a duplicate of:  Bug #1174079: Crash during save causes data loss. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Inkscape only autosaves a copy if no changes have been made to the file since it was last saved.

If Inkscape dumps core (for example) when saving the file, most of the file may be lost and no autosaved backup be available. That is, saving frequently increases the risk of massive data loss in this scenario.

I had a 15M file. Autosave was set for 10 minute intervals. When I saved the document, Inkscape dumped core. My 15M file is now just over 6M. It opens, but most of it is missing.

No autosave had been done in the previous 10 minutes because I saved the file too frequently during that time.

I cannot get any useful information about the core dump: Inkscape does not usually crash when I save. I have no idea what triggered it. There is not even the usual trace in the journal (just a thread number) and I don't know if systemd actually saved anything useful about the crash.

But I do say that Inkscape should autosave the file even if it is unchanged, so that a 10-minute autosave interval really does mean that you don't lose more than 10 minutes of work.

Version: 0.92.3
Distro: Arch Linux
Release: 6 (distro version in full: 0.92.3-6)

cfr (reescf)
description: updated
Revision history for this message
Max Gaukler (mgmax) wrote :

Let me try to simplify the problem:
1. Open file
[optional: 2. wait x minutes]
3. Make some tiny change
4. Save (within < 10 minutes)
5. Assume that inkscape crashes in the middle of saving the file.

Bug: The file is corrupted and you have no autosave or whatever to restore your file.
Expected: At least the original file is saved somewhere.

Because step 2 can be omitted, just changing the autosave condition does not help in general!

The solution would rather be to atomically write the whole file at once, which is painful to implement in a cross-platform way (Linux: overwrite-by-rename, Windows: no idea, after reading https://stackoverflow.com/questions/167414/is-an-atomic-file-rename-with-overwrite-possible-on-windows I am rather confused)

Workarounds could be:
- trigger an autosave before every save. The autosave is useless, but it will trigger the crash.
- trigger an autosave on every open. This is probably more annoying if you use inkscape mostly for viewing and not for editing.

Revision history for this message
Hachmann (marenhachmann) wrote :

Sorry, misunderstood completely. Deleted my previous comment.

Revision history for this message
Max Gaukler (mgmax) wrote :

Would it be okay to rename the bug to "Autosave does not help for crash on save"?

Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

Related: bug #1174079 (Crash during save causes data loss)

Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

Hi, probably a better fix is to ensure that data loss does not occur during save. As a result, please refer to our new bug tracker for further updates on this issue. Thank you!

Moved to: https://gitlab.com/inkscape/inkscape/issues/260
Closed by: https://gitlab.com/Qantas94Heavy

tags: added: bug-migration
Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.