Bug 380506 - crashing on an annotated document loses new annotations
Summary: crashing on an annotated document loses new annotations
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-03 16:08 UTC by azrdev
Modified: 2017-09-13 03:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description azrdev 2017-06-03 16:08:53 UTC
1. Open a PDF file
2. make some annotation
3. save as... to create a new PDF containing the annotations
4. close & reopen okular
5. open the new PDF file
6. make some annotation
7.1. close okular: it asks to save or discard the new annotation (after <https://bugs.kde.org/show_bug.cgi?id=269819>)
7.2. crash okular (a bug, or simulate with SIGKILL/kill -9): the new annotation is lost
Comment 1 Oliver Sander 2017-06-05 03:49:33 UTC
Sorry, but I don't get it.  I am supposed to crash okular while the "save or discard annotation" window is open?  That is before the annotation is saved, so of course it is lost.  What am I missing?
Comment 2 azrdev 2017-06-05 09:47:20 UTC
@Oliver: sorry for the confusion. 7.1 and 7.2 are alternatives: 7.1 means when you close okular normally, it asks for saving. If you don't close okular, but crash it, the annotation is lost
Comment 3 Oliver Sander 2017-06-05 18:29:04 UTC
But isn't that what other programs do as well?  If you crash a program before having saved your modifications, then those modifications will be lost.
Comment 4 azrdev 2017-06-06 08:11:59 UTC
Of course, but still we could do better :)
Especially since annotations are only lost on crash if the file already contains some previous annotations: If it doesn't, okular instantly saves new annots in docdata/ which preserves them even in case of a later crash.
Comment 5 Oliver Sander 2017-06-06 08:48:07 UTC
Doesn't really convince me.  Feel free to post patches, but I tend to consider this not a bug.
Comment 6 Nate Graham 2017-09-13 03:05:29 UTC
Yeah, the bug here is that Okular crashed, not that the annotations didn't get saved before you could complete the Save function. Okular shouldn't have crashed! :)