Bug 143796 - Screen sometimes doesn't repaint (vcl:qt backend)
Summary: Screen sometimes doesn't repaint (vcl:qt backend)
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.1.7
Depends on:
Blocks: Qt5
  Show dependency treegraph
Reported: 2021-08-09 20:07 UTC by david
Modified: 2021-09-16 06:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Image of repaint error (244.24 KB, image/jpeg)
2021-08-09 20:07 UTC, david
Image 1: Before bug appears (336.59 KB, image/jpeg)
2021-09-07 14:36 UTC, david
Image 2: bug on clicking to select colour (341.21 KB, image/jpeg)
2021-09-07 14:37 UTC, david
Image 3: bug on entering value to cell (111.93 KB, image/jpeg)
2021-09-07 14:38 UTC, david
Image 4: confirmation that uses qt5 (520.39 KB, image/jpeg)
2021-09-07 14:40 UTC, david

Note You need to log in before you can comment on or make changes to this bug.
Description david 2021-08-09 20:07:54 UTC
Created attachment 174164 [details]
Image of repaint error

Occasionally the screen does not repaint properly after highlighting cells (see attachment). Repaint can be forced by minimising and then restoring.
Comment 1 Nina_Shtygailo 2021-08-10 06:30:50 UTC
To repeat the error, you need to write reproduction steps.
Comment 2 david 2021-08-10 07:13:50 UTC
Unfortunately this bug is not something I can reproduce at will. It has happened occasionally, perhaps a couple of dozen times in the past year.

The open file is always very simple, with a number of sheets, each containing formatted cells (with boundaries) and some characters (no formulas). The characters are in a single font and in two sizes and two colours; some characters are bold. There's nothing else.

I realise that this is not a helpful response; but the screen shot shows that the problem does exist.
Comment 3 david 2021-08-10 07:17:22 UTC
This might be relevant. The OS is Lubuntu 20.04 with qt5.

(I mention qt5 because I had previously reported a bug concerning printing to pdf files, where there was a workaround involving replacing qt5 by gtk3; but that has been fixed and so I've reverted to qt5.)
Comment 4 Roman Kuznetsov 2021-08-24 08:14:10 UTC
(In reply to david from comment #3)
> This might be relevant. The OS is Lubuntu 20.04 with qt5.

Ah, so please write here info from your LibreOffice's Help->About dialog

I had the problem in Lubuntu too, https://libreoffice-dev.blogspot.com/2021/04/hey-lubuntu-maintainners-please-build.html
Comment 5 david 2021-08-24 08:34:43 UTC
Here it is:

Version: / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: qt5
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 1:7.1.5~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 6 Roman Kuznetsov 2021-08-24 09:27:24 UTC
I suggest you delete your current LibreOffice, download LibreOffice from our official site and install it, it will use vcl:kf5 instead vcl:qt5 and you will be happy

Please do it and give us a feedback
Comment 7 david 2021-08-24 10:48:54 UTC
I can try installing as suggested.

Feedback is more difficult. I can report if the problem occurs again. But how can I report if it doesn't occur again?

It's random. (I know it isn't really random, but it seems like it.) Most of the time it doesn't happen. It isn't necessarily a daily, or even a weekly or monthly, problem.
Comment 8 Roman Kuznetsov 2021-08-24 11:02:54 UTC
Please don't change a status. If you'll do as I suggested then I think it should resolve you problem
Comment 9 david 2021-09-07 14:36:59 UTC
Created attachment 174856 [details]
Image 1: Before bug appears
Comment 10 david 2021-09-07 14:37:55 UTC
Created attachment 174857 [details]
Image 2: bug on clicking to select colour
Comment 11 david 2021-09-07 14:38:47 UTC
Created attachment 174858 [details]
Image 3: bug on entering value to cell
Comment 12 david 2021-09-07 14:40:01 UTC
Created attachment 174859 [details]
Image 4: confirmation that uses qt5
Comment 13 david 2021-09-07 14:41:30 UTC
I have now discovered, by accident, a reliable way to reproduce this bug.

1. Open Calc v fullscreen in Lubuntu 20.04 with qt5. Do not resize to fullscreen; if necessary resize, close and then reopen. See image 1.

2. Click the dropdown arrow to select a font colour. The toolbar will not be repainted. See image 2.

3. Select a colour, for example red. Then enter a value in the default cell, for example enter 3 in cell A1. Most of the sheet will fail to be repainted. See image 3.


1.  This does not appear to happen in Lubuntu 20.04 with SAL_USE_VCLPLUGIN = gtk3 selected in LXQT Preferences.

2.  This does not appear to happen with Calc v; note that, despite comment 6, this still uses qt5. See image 4. 

3.  This still happens if Calc opens in its default window size instead of fullscreen.

4.  This does not appear to happen if the window is resized first, or if it is minimized and then restored, or if Calc opens in a window which is not its default size.

5.  This still happens if values are entered in cells before the dropdown arrow is clicked.

6.  This still happens if the dropdown arrow to select the background color is clicked instead of the arrow to select the font colour.

7.  This also happens with other components: Writer, Draw.


The on-screen instructions state:

Note to Bug Reporter:
This bug is (most likely) in NEEDINFO status because someone has asked for information or data. After you've satisfied the request as best as you can, please leave a comment and change the status back to UNCONFIRMED. 

As I have now satisfied the request as best I can, I shall change the status to UNCONFIRMED.
Comment 14 Jan-Marek Glogowski 2021-09-07 22:16:53 UTC
This is very likely a duplicate of bug 143334, that is actually a regression for kf5, which was exposing this qt5 bug after removing the duplicate graphics buffering from kf5. From comment 5, I'm moving it to Qt5 instead of KDE.

I'm not sure I want to backport the whole patchset to stable 7.1...

commit 963f252cd1ea9c268a6ced68a3454b10cbee1a89
commit ec77a2ed0283cb3446f6e352fc329afd3dfb785c
commit 923b30aa27ceb377d6a540c012000e89ce5db31e

Pending review as: https://gerrit.libreoffice.org/c/core/+/121795
Comment 15 Commit Notification 2021-09-09 09:46:15 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":


tdf#143796 Qt5/KF5 fix double-buffer graphics

It will be available in 7.1.7.

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:

Affected users are encouraged to test the fix and report feedback.