Arbitrarliy lost/moved/expanded highlights on refresh.

Bug #1940005 reported by Gremious Grenald
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Very odd interactions with highlits - some are just being removed, some jump around, some expand the text they're supposed to be highlighting.

---

Version: 5.25 (64 bit)
OS: Windows 10
File (Public Domain): https://www.marxists.org/archive/marx/works/download/epub/critique-gotha-programme.epub

---

Steps to reproduce a highlight expanding:

1. Download the ebook and skip to "Part 1" (I do it via ToC jump, don't know if it matters).

2. At the start of the third paragraph, select the text "Labor is not the source of all wealth.", press highlight and write some text/choose any color.

3. Immediatelly after, select the next sentence ("Nature is just as [...] labor power.") and highlight it as well, adding a note as well.

4. Press f5 to refresh (or jump to a note from the sidebar; move back and forth from ToC);

Expected result: Nothing changes.
Actual result: The second sentence highlight is suddenly expanded.

5 (bonus). If you now delete the first highlight, and refresh once again, the second highlight will expand even more.

---

Steps to reproduce a highlight being just deleted:

Repeat the steps above, except for step 3, instead select the second to last sentence in this paragraph ("The bourgeois [...] conditions of labor.");

Once you hit refresh it will just be gone. Seomtimes the first one moves too. If you click "modify this highlight" in the sidebar, it'll give you the "Error: Highlight text missing".

---

Things I've tried:

Running with admin permissions.

Checking/Unchecking "Keep a copy of annotations/bookmarks in the e-book file, for easy sharing" setting. Does not seem to affec it (so not a duplicate of 1934793)

Checking/Unchecking flow and paginated mode.

Reinstalling calibre, redownloading the book, running `ebook-viewer` locally set cache.

Deleting the calbre bookmarks file in the epub.

Deleting the italics and style of that paragraph (though seperately), as well as checking for weird non-printable characters (e.g. non-breaking spaces).

Asking a friend with a fresh copy of calibre to reproduce (successfully, not just my machine).

Reproducable on 5.22.1 portable (i.e. the version befgore 5.32 which added showing highlight color in the preview panel).

Reproducable on 5.19 portable (i.e. the version befgore 5.20 which made URLs in the notes for highlights clickable).

---

More oddities:

Highlighting the second sentence first, and then the first one just works.

In fact everything just works so long as you do not highlight that first short sentence first. The highlight being deleted in the second-to-last sentence does not, you can highlight it, then the first sentence, and then even the second one, and everything is okay.

There's a couple extra weird interactions with highlights in that paragraph, feel free to experiment. (try highlighting the second sentence to include the space before it (i.e. so they "connect". 1st word + 2nd word makes it go weird as well iirc just moves the second highlight somewhere within the paragraph).

Double-clicking the expanded highlight, re-pressing highlight, changing nothing and pressing apply expands it even more.

tags: added: viewer
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
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.