Bug 347618 - Double-crashing krita circumvents autosave-recovery dialog
Summary: Double-crashing krita circumvents autosave-recovery dialog
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 2.9.4
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-12 15:35 UTC by Jonathan Ringstad
Modified: 2016-03-19 15:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
autosave patch (994 bytes, patch)
2015-05-15 09:29 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Ringstad 2015-05-12 15:35:14 UTC
Noticed this while trying to repro a crash.

- create a document and modify it for long enough that the autosave kicks in
- crash krita
- restart krita
- the recovery dialog for the documents will show up
- recover the documents
- crash krita again (before the autosave has had time to kick in?)
- restart krita
- no recovery dialog shows up anymore, and there is no obvious way for the user anymore to get the documents back

arguably this is a pretty obscure situation (and I was pushing my luck here by deliberately trying to repro the crash I got the first time), but it'd be nice if the autosave files do not get deleted/flagged as "recovered" until the user has actually saved them. Alternatively, I suppose one could issue an autosave immediately after recovering, so that the autosaved files are there again next time krita is started (but this would not catch a situation where krita crashes on opening the document itself, so maybe not that great a solution)

Reproducible: Always
Comment 1 Halla Rempt 2015-05-15 09:22:59 UTC
I'm actually not sure about that: it's ultimately the user's responsibility to save the documents. After recovery, they can save immediately, if the recovered version is the right one, or close it and not save, if the recovered version turns out to be the wrong version after all.
Comment 2 Halla Rempt 2015-05-15 09:29:38 UTC
Created attachment 92610 [details]
autosave patch

Could you check the attached patch and experiment with it? I'm not sure that it won't cause lots and lots of trouble...
Comment 3 Jonathan Ringstad 2015-05-15 09:54:31 UTC
Agreed, but it could hypothetically be that the user runs into a situation where krita crashes all the time (for whatever reason, maybe the krita installation is corrupted, the system is bad for some reason or other, antivirus or something else is butting in, ...) and when they try to restore the document and krita crashes, they loose all their work. Erring on the side of caution might not be a bad choice.

I tried the patch, and the following seems to work fine with the patch applied:
- creating a document, letting it autosave, crashing krita, restoring it
- "double-crashing krita" (restoring an autosave, not saving it, crashing krita, the autosave will show up again)
- creating a document, letting it autosave, crashing krita, restoring it, saving it -- the autosave does not show up anymore as desired.

So as far as I can tell, everything is great.