#986591 attack of the hyphens

Package:
fbreader
Source:
fbreader
Description:
e-book reader
Submitter:
Joey Hess
Date:
2021-11-18 16:42:04 UTC
Severity:
normal
#986591#5
Date:
2021-04-07 19:30:56 UTC
From:
To:
Attached 2 screenshots. First shows the bug. Second shows the exact same
command ran again, in seemingly identical circumstances, but without the
hyphens infesting the document this time.

(Note especially the "2/258-" in the corner of the second screenshot;
the hypens even got into a UI element!)

Document is from http://www.gutenberg.org/ebooks/20869.epub.images

I have been seeing this bug in a lot of books I open in fbreader over
the past 6 months or so.

Window manager is xmonad, and I kind of get the feeling it may have to
do with the window being constrained to a smallish tile as shown here.
However, I've also had the hypens come when the tile was the full width
of the screen.

#986591#12
Date:
2021-11-18 16:22:38 UTC
From:
To:
Dear Maintainer,

in my case, the bug is caused by pango's auto-hyphenation feature (which
was adeed and enabled by default, causing a lot of similar breakage in
other software), but the underlying cause is using uninitialised memory,
which is why it is happening randomly.

I fixed this by initialising the PangoAnalysis struct in
zlibrary/ui/src/gtk/view/ZLGtkPaintContext.cpp, in the constrcutor
(ZLGtkPaintContext::ZLGtkPaintContext), by adding:

  myAnalysis = PangoAnalysis ({0});

This might be a problem elsewhere in the code, which I haven't
investigated, as with this fix, fbreader becomes usable again.