Bug 149322 - Text is being overly distorted when using Page Down
Summary: Text is being overly distorted when using Page Down
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-26 14:08 UTC by Rafael Lima
Modified: 2022-12-26 08:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Video showing the problem (759.72 KB, video/mp4)
2022-05-26 14:08 UTC, Rafael Lima
Details
File used in the video (1.03 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-05-26 14:11 UTC, Rafael Lima
Details
Distortion in gtk3 (2.28 MB, video/mp4)
2022-05-27 11:26 UTC, Rafael Lima
Details
Sample of text tearing (69.88 KB, image/png)
2022-10-25 13:47 UTC, Rafael Lima
Details
Screenshot (105.46 KB, image/jpeg)
2022-11-14 16:05 UTC, Telesto
Details
Screenshot (123.32 KB, image/jpeg)
2022-11-14 16:14 UTC, Telesto
Details
Example file (10.48 KB, application/vnd.oasis.opendocument.text)
2022-11-14 16:21 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2022-05-26 14:08:51 UTC
Created attachment 180414 [details]
Video showing the problem

See attached video showing the problem.

When I use Page Down to navigate the text, sometimes the text rendering gets completely distorted to the point of becoming unreadable.

when I use the arrow keys to navigate the document, the distortion problem persists but in a smaller scale.

I have always had this issue to some minor degree, but since 7.3.3 this problem became much more visible.

System info:
Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.21.10.1~lo1
Calc: threaded
Comment 1 Rafael Lima 2022-05-26 14:11:24 UTC
Created attachment 180415 [details]
File used in the video

The video starts at page 8 of this document.
Comment 2 Rafael Lima 2022-05-26 14:13:36 UTC
I see the same problem in LO 7.4 alpha.

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: ad6905f9a09c63712ba0aaffc700923246d21e55
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL
Comment 3 Telesto 2022-05-27 09:01:39 UTC
Any change to check a different backend. GEN/GTK3?
Comment 4 Rafael Lima 2022-05-27 11:26:34 UTC
Created attachment 180430 [details]
Distortion in gtk3

(In reply to Telesto from comment #3)
> Any change to check a different backend. GEN/GTK3?

In "gen" I was unable to reproduce the bug.

In "gtk3" the distortion happens but soon the rendering is refreshed and then the distortion disappears. See the attached video showing how the distortion happens in gtk3. Keep an eye at the bottom of she screen and you'll see that the distortion appears and a second later it disappears.

In "kf5" the distortion happens and does not disappear as in gtk3.

System info:
Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: ad6905f9a09c63712ba0aaffc700923246d21e55
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL
Comment 5 Caolán McNamara 2022-10-23 16:16:18 UTC
I can't reproduce under gtk (wayland or x11) or kf5, so hard to tell if the problem is in LibreOffice or some other component.

the outputs from:

lspci -nn | grep -E 'VGA|Display'
glxinfo -B

might give something useful wrt to reproducing it.

Does this only affect LibreOffice, e.g. If you print to pdf and view the pdf in evince and page down through the document there is there any similar effect?
Comment 6 Rafael Lima 2022-10-25 13:47:31 UTC
Created attachment 183260 [details]
Sample of text tearing

Recently I've been getting these tearing issues less frequently. The case I showed in the video was very extreme and that issue I no longer have.

What I see more often now are lines of text being compressed vertically, as the one I attached in this new screenshot.

Every time I edit a document for some time (even a short document), eventually I'll start having these issues. If I scroll down until the line disappears from view and then come back up, the line is rendered correctly.

(In reply to Caolán McNamara from comment #5)
> Does this only affect LibreOffice, e.g. If you print to pdf and view the pdf
> in evince and page down through the document there is there any similar
> effect?

This only affects LibreOffice. I don't see this in any other application, PDF viewer or browser.

Here's system info of when I took this screenshot:

Version: 7.3.6.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.6-0ubuntu0.22.04.2
Calc: threaded
Comment 7 Telesto 2022-11-14 16:05:42 UTC
Created attachment 183590 [details]
Screenshot

I guess the screenshot showing the same thing
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 517d05dbfd1e25e51d4b813f5a4c53b89464aa43
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

I no steps to trigger this effect. My my case I scrolled after zooming in with focus in comment box. Or something in that direction. 

It's cross platform for sure.. And it's some painting glitch. It does vanish as easy as it appears.
Comment 8 Telesto 2022-11-14 16:14:04 UTC
Created attachment 183591 [details]
Screenshot

This I can reproduce (see screenshot). p of pretium and q of quis being partly misplaced
Comment 9 Telesto 2022-11-14 16:21:52 UTC
Created attachment 183592 [details]
Example file

1. open the attached file
2. Zoom level 350% or 440% (at 1920x1080 96 dpi screen) (doesn't if windowed or not, zoom-level appears to be of influence)
3. Scroll horizontally by left-clicking the horizontal scrollbar and dragging left to right or right to left (and release it). The distorting appears at the 4 or 5 drag
Comment 10 Caolán McNamara 2022-11-16 17:35:33 UTC
I have high hopes for https://gerrit.libreoffice.org/c/core/+/142789 where I found an occasional 1 pixel difference between something vcl did and something that code did.
Comment 11 Commit Notification 2022-11-16 19:37:05 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7060192b6facd92cadb5bb084052903f2695d67d

tdf#149322 apparent distortion of glyphs on scrolling

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Caolán McNamara 2022-11-17 09:15:20 UTC
This seems to look good for me now. I was able to reproduce under windows and under linux with gen and it appears to me to be gone now. (backport to 7-4 in gerrit)

retests of this bug and
https://bugs.documentfoundation.org/show_bug.cgi?id=139296
and
https://bugs.documentfoundation.org/show_bug.cgi?id=140738
etc are probably worth doing with this effort in place.
Comment 13 Commit Notification 2022-11-17 10:31:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/e76027164821b43c4cb79f25381ac35699b09516

tdf#149322 apparent distortion of glyphs on scrolling

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Telesto 2022-11-17 15:47:29 UTC
Works like a charm
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a81e957f5026373f3935390c786c21416fc74fcc
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

Thanks Caolán McNamara!
Comment 15 Rafael Lima 2022-11-18 13:44:28 UTC
Caolán, thank you so much for taking care of this issue.

So far I haven't experienced the problem again.