Bug 107944 - BASIC IDE makes useless, annoying refresh while selecting text
Summary: BASIC IDE makes useless, annoying refresh while selecting text
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, regression
: 111772 113508 134018 (view as bug list)
Depends on:
Blocks: DirectWrite-Regression Flickering-UI
  Show dependency treegraph
Reported: 2017-05-18 22:59 UTC by Regina Henschel
Modified: 2020-09-23 09:10 UTC (History)
20 users (show)

See Also:
Crash report or crash signature:

animation of selection with mouse (144.08 KB, image/gif)
2017-05-18 22:59 UTC, Regina Henschel

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-05-18 22:59:43 UTC
Created attachment 133397 [details]
animation of selection with mouse

Open the BASIC IDE and show a macro in the edit window. Select a line of the text. Notice that the entire window repeats to refresh, while you drag the mouse.

I do not own a screen cast application, but can only take single pictures while moving the mouse. But this pictures show clearly that the edit window content is refreshed several times, see attachment.

I use Version:
Build ID: 965494c544dd8f35ae83b7cf38549009da06c367
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-10_23:06:27
Locale: de-DE (de_DE); Calc: group

It happens too in Version:
Build ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: de-DE (de_DE); Calc: group

It does not happen with Version:
Build ID: a3100ed2409ebf1c212f5048fbe377c281438fdc
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: de-DE (de_DE); Calc: group
Comment 1 Jez 2017-05-18 23:35:45 UTC
I have this issue.  I discovered that turning the new layout engine (SAL_NO_COMMON_LAYOUT=1) speeds things up a bit, but it still flickers badly while selecting text.  It's obviously redrawing way too much.
Comment 2 Aron Budea 2017-05-18 23:39:56 UTC
Seems like this has been there since 5.0, but maybe gotten worse in 5.3.
Comment 3 Aron Budea 2017-05-19 22:37:55 UTC Comment hidden (bibisection)
Comment 4 Aron Budea 2017-05-19 22:41:48 UTC
I went for the change that caused this to go from slightly flickering to badly flickering. It might be worth going for the original issue as well (in a separate bug report), I can't decide which fix would be more significant.
Adding Cc: to Khaled Hosny, please take a look.

author		Khaled Hosny <khaledhosny@eglug.org>	2016-10-28 02:19:46 (GMT)
committer	Khaled Hosny <khaledhosny@eglug.org>	2016-10-28 19:22:54 (GMT)

"tdf#98879: Fix vertical text on Windows for the new layout"
Comment 5 Khaled Hosny 2017-05-20 19:55:33 UTC
This commit simply enabled the DirectWrite text rendering code, if there are any bugs it must have been there already in that code.
Comment 6 Oliver Brinzing 2017-05-21 13:50:26 UTC
Comment 7 Gabriele Ponzo 2017-05-30 08:46:35 UTC
It still happens on
Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: it-IT (it_IT.UTF-8); Calc: group
Comment 8 Aron Budea 2017-06-07 11:11:57 UTC
It would be nice to be able to test this in earlier versions in Windows somehow.
It occurs in Linux as well, but not with GTK3, only with GTK2 VCL plugin, and it started somewhere between and

Bibisecting using repo lo-linux-dbgutil-daily-till52 pointed to this range:
Comment 9 Thomas Krumbein 2017-08-08 11:49:56 UTC
No "flicker" in Version:

Version: (x64)
Build-ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU-Threads: 8; BS-Version: Windows 6.19; UI-Render: Standard; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: group

Windows 10, 64 Bit - all updates. 

works perfekt. Testversion 5.4.0 "flickers".  All: Basic-IDE.
Comment 10 Jean-Baptiste Faure 2017-08-18 17:06:29 UTC
*** Bug 111772 has been marked as a duplicate of this bug. ***
Comment 11 Jean-Baptiste Faure 2017-08-18 17:09:13 UTC
Seems to be reproducible in LO 5.3.5 and
See duplicate bug 111772.

Best regards. JBF
Comment 12 raal 2017-10-29 19:46:23 UTC
*** Bug 113508 has been marked as a duplicate of this bug. ***
Comment 13 Kevin Suo 2017-12-21 04:05:06 UTC
Removing keyword bibisectRequest as it's already bibisected.
Comment 14 Telesto 2018-01-08 19:17:04 UTC
Also reproducible on Windows with
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: nl-NL (nl_NL)

but not with:
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 15 Aron Budea 2019-05-21 00:11:52 UTC
Indeed, this should've been bibisected to the start of the flickering, which is somewhere in the following, rather large range in bibisect-win32-5.0 (opening the macro editor crashes in between, I only did a handful of skips during bibisecting, and didn't bother finding the exact start and end of the crashing):
Comment 16 Roman Kuznetsov 2020-06-16 14:57:40 UTC
*** Bug 134018 has been marked as a duplicate of this bug. ***
Comment 17 Gerhard Schaber 2020-07-08 21:30:22 UTC
Not sure, if that helps, but I did a bibisect with https://wiki.documentfoundation.org/QA/Bibisect/Windows#bibisect-win32-5.0:

git.exe bisect bad
94da532b9fb51e2d0bc55ef7c5f252a3168b451c is the first bad commit
commit 94da532b9fb51e2d0bc55ef7c5f252a3168b451c
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Jun 3 14:03:40 2015 -0500

source sha:29b1e6718f6ebdb45d2a8c6a89a86bc0a6bbb3ae
Comment 18 Aron Budea 2020-07-08 21:39:21 UTC
Looks plausible, thanks Gerhard.
Comment 19 Gerhard Schaber 2020-07-08 21:40:21 UTC
...which might be this change:

commit 29b1e6718f6ebdb45d2a8c6a89a86bc0a6bbb3ae
    Author:     Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
    AuthorDate: Wed May 6 15:49:16 2015 +0900
    Commit:     Jan Holesovsky <kendy@collabora.com>
    CommitDate: Thu May 7 09:57:50 2015 +0200
        refactor "TextEdit" & co. to use RenderContext
        Change-Id: Ib26ecb9640d23714acec73304f26e2fd6af90ed4
Comment 20 Gerhard Schaber 2020-07-08 21:48:03 UTC
I do not fully grasp the advantage of that change.
Comment 21 Telesto 2020-07-08 21:50:54 UTC
Probably gone in 7.0, didn't check though
Comment 22 Gerhard Schaber 2020-07-08 22:27:51 UTC
Yes, looks good in 7.0 RC1.
Comment 23 Gerhard Schaber 2020-09-23 08:45:49 UTC
Can this be back-ported to 6.x? In 7.0 there are still many other bugs.
Comment 24 Telesto 2020-09-23 09:10:38 UTC
(In reply to Gerhard Schaber from comment #23)
> Can this be back-ported to 6.x? In 7.0 there are still many other bugs.

No, impossible. It's fixed by the Skia backend. The only 'solution' is reporting the bugs present in 7.0 and/or attaching yourself (CC list) to bug you deem to see important. The result might be that those will sorted out first. No hard promises of course