[okular] [Bug 437774] Document sometimes reloads after saving annotations

2022-01-17 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=437774

pbs3...@googlemail.com changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #6 from pbs3...@googlemail.com ---
As I no longer have to mark supervision work, I am no longer spending many
hours per week creating and saving annotations in okular, so I haven't actually
triggered this bug once since the last comment. It's probably still there, but
I have no need to fix it. Since nobody else seems to care, and it probably only
happens in rare conditions on old computers anyway, it can probably be closed.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 437774] Document sometimes reloads after saving annotations

2021-06-07 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=437774

--- Comment #5 from pbs3...@googlemail.com ---
Maybe you couldn't reproduce it because you need a spinning disk and low ram to
cause enough latency to trigger the bug, and your computer is too good.

There's also another (mostly theoretical) race condition: if the document is
updated between saving and re-enabling the file watcher, the modification will
be missed.

Both race conditions (and therefore probably also the bug) can be fixed by
recording the timestamp when the document was saved, and ignoring modifications
with the same timestamp.

If you foresee no problems with this, I can write up a patch and test it out
over the next week, then report back whether the bug has disappeared or not.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 437774] Document sometimes reloads after saving annotations

2021-06-07 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=437774

--- Comment #4 from pbs3...@googlemail.com ---
Just took a quick glance at part.cpp:

// Stop watching for changes while we write the new file (useful when
// overwriting)
if (url().isLocalFile())
unsetFileToWatch();

KJobWidgets::setWindow(copyJob, widget());
if (!copyJob->exec()) {
KMessageBox::information(...);

// Restore watcher
if (url().isLocalFile())
setFileToWatch(localFilePath());

return false;
}

It looks pretty foolproof, but could there be a race condition in here? Maybe
some caches don't get written out immediately?

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 437774] Document sometimes reloads after saving annotations

2021-06-07 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=437774

--- Comment #3 from pbs3...@googlemail.com ---
I have "Reload on Document File Change" enabled.

The pdf was just something I downloaded, added an annotation to, then hit
Ctrl+S.

What I meant in Comment 1 was that you don't need whatever complicated steps I
said in the report to trigger the bug, just adding a single annotation is
enough.

I didn't mean to imply this works every time! As I said, it's a rare bug, and I
don't have a reliable reproducer. Sorry for the confusion.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 437774] Document sometimes reloads after saving annotations

2021-06-05 Thread David Hurka
https://bugs.kde.org/show_bug.cgi?id=437774

--- Comment #2 from David Hurka  ---
(In reply to pbs3141 from comment #1)
> (simpler) STEPS TO REPRODUCE
> 
> Open a document, scroll down a few pages, make a single highlight
> annotation, save.

Does not reproduce here. Can you give more details on what worked for you? E.
g. how you opened the file, where and how you saved it, your configuration (e.
g. “Reload document on file change”)...

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 437774] Document sometimes reloads after saving annotations

2021-06-04 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=437774

--- Comment #1 from pbs3...@googlemail.com ---
(simpler) STEPS TO REPRODUCE

Open a document, scroll down a few pages, make a single highlight annotation,
save.

-- 
You are receiving this mail because:
You are watching all bug changes.