koreader / kindlepdfviewer

(DEPRECATED, please use KOReader instead) A PDF (plus DJVU, ePub, TXT, CHM, FB2, HTML...) viewer made for e-ink framebuffer devices, using muPDF, djvulibre, crengine
GNU General Public License v3.0
498 stars 98 forks source link

All history of current session will lost when program crashed #851

Open dracodoc opened 10 years ago

dracodoc commented 10 years ago

Kpv (v2013.1-85-g01c9580) crashed today in my Kindle DX and I don't know why, the crash.log is empty. Then I found all the bookmarks I made in the whole kpv session was gone, which was several days' read.

It's rare that kpv crashed on me, but the lost is still significant. I think the bookmarks or reading history should be written to files at least when the book is closed.

houqp commented 10 years ago

so sorry about that, this is frustrating :(

we should maybe even force a document write whenever user add a bookmark, highlight or other settings.

tigran123 commented 10 years ago

Document write? What do you mean? I assume you mean the document's history file write because that is where bookmarks, highlights and settings are kept. The document itself is never opened except in read only mode.

dpavlin commented 10 years ago

I think that OP means on document close. I agree with @houqp that it should be after user interaction. I've seen similar behavior in koreader, and I would love to implement it, but I don't have any free cycles right now.

dracodoc commented 10 years ago

Of course if there is no performance penalty, forcing history file write after every user interaction (adding bookmarks etc) will be the best.

houqp commented 10 years ago

FYI, I am working on this now, but kindlepdfviewer is broken now because of recent updates in kroeader-base. I will send out a PR tmr to update API calls first.

To be honest, I have been suffering from this for a long time as well, since I am always using the unstable dev build ;p