Bug 156365 - Trails in typing cursor
Summary: Trails in typing cursor
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 38844 Skia
  Show dependency treegraph
 
Reported: 2023-07-19 00:31 UTC by Hossein
Modified: 2024-05-09 02:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Trail of an old cursor alongside the actual cursor (25.40 KB, image/png)
2023-07-19 00:31 UTC, Hossein
Details
Cursor trail in Writer on macOS (103.35 KB, image/png)
2023-10-21 19:15 UTC, bintoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2023-07-19 00:31:42 UTC
Created attachment 188457 [details]
Trail of an old cursor alongside the actual cursor

Description:
While typing text in LibreOffice, sometimes a trail remains. This is mostly visible when using bidirectional text while dark mode is activated.

Steps to Reproduce:
1. Type something in English or other language that is written from left to right like 'English'.
2. Then type something in Arabic/Persian, or other language that is written from right to left, like 'فارسی'.
3. Wait until the directional blinking cursor hides for a second or less as it blinks.
4. Be fast and move the cursor with arrow keys left or right.

Actual Results:
Trail of the cursor remains in the old place. This sometimes happen even when you type in a single language, but it is easier to reproduce with multiple directions.

Expected Results:
No trail of the cursor should remain in the old place.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: CL threaded
Comment 1 Hossein 2023-07-19 00:35:33 UTC
I think the problem comes from XOR rendering as discussed below:

tdf#38844 - Reduce XOR rendering (search RasterOp::Xor)
https://bugs.documentfoundation.org/show_bug.cgi?id=38844

A similar (fixed) bug on direct cursor leaving trail:

tdf#122970 - Direct cursor leaves screen trail with mouse pointer movement and no text
https://bugs.documentfoundation.org/show_bug.cgi?id=122970

Therefore, I set this issue as a blocker for tdf#38844.
Comment 2 Stéphane Guillou (stragu) 2023-07-19 09:11:21 UTC
(In reply to Hossein from comment #1)
> Therefore, I set this issue as a blocker for tdf#38844.

Shouldn't this be a "depends" rather than a "blocks"?

Does it happen with Skia/Raster?

No repro in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 77fca616e0bd79e0b405fd0b3543cf8e94e15df3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 3 Hossein 2023-07-19 11:35:23 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> (In reply to Hossein from comment #1)
> > Therefore, I set this issue as a blocker for tdf#38844.
> 
> Shouldn't this be a "depends" rather than a "blocks"?
I think it should be "blocks", as the above issue is something like a meta issue rather than a specific bug. In every instance of XOR, you have to look into details and find an alternative implementation.
 
> Does it happen with Skia/Raster?
> 
> No repro in:
> 
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 77fca616e0bd79e0b405fd0b3543cf8e94e15df3
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: CL threaded

Not reproducible with any of these (x11 on Linux)

X11 on Linux without Skia:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

X11 on Linux with Skia/hardware:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 12; OS: Linux 5.19; UI render: Skia/Vulkan; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

X11 on Linux with Skia/software:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 12; OS: Linux 5.19; UI render: Skia/Raster; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

Also not reproducible with gtk3 on Linux:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

Can be a Windows-specific problem.
Comment 4 Hossein 2023-07-19 11:40:47 UTC
> Does it happen with Skia/Raster?

Reproducible on Windows with Skia/Hardware:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: CL threaded

Not reproducible on Windows with Skia/Software:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: CL threaded

Also not reproducible on Windows without Skia:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bb01ef3865c406f322d6e656faba2191aaeeb6da
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: CL threaded

So, it happens only on Windows with Skia/Vulkan hardware rendering.
Comment 5 Stéphane Guillou (stragu) 2023-07-19 11:48:28 UTC
(In reply to Hossein from comment #3)

> I think it should be "blocks", as the above issue is something like a meta
> issue rather than a specific bug. In every instance of XOR, you have to look
> into details and find an alternative implementation.

Makes sense!

(In reply to Hossein from comment #4)

> So, it happens only on Windows with Skia/Vulkan hardware rendering.

Thanks for testing!
Comment 6 Roman Kuznetsov 2023-07-19 12:42:30 UTC
No repro in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fcbae818b793a9ee97a1b5ddc53902be7a2376f5
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded

I have intel i7-10510U CPU here with integral graphic card
Comment 7 Hossein 2023-07-19 13:47:21 UTC
(In reply to Roman Kuznetsov from comment #6)
> No repro in
> 
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: fcbae818b793a9ee97a1b5ddc53902be7a2376f5
> CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL:
> win
> Locale: ru-RU (ru_RU); UI: ru-RU
> Calc: threaded
> 
> I have intel i7-10510U CPU here with integral graphic card
The problem is better visible with large size text. Please try navigating through the document in attachment 183604 [details].
Comment 8 bintoro 2023-10-21 19:15:48 UTC
Created attachment 190367 [details]
Cursor trail in Writer on macOS

I'm seeing this in LO 7.6.2.1 on an Intel Mac with Skia enabled. No need for dark mode or bidirectional text.

A vertical mark is left consistently at every character past a certain point in the window. To the left of said point there is either no trail or the trail is a row of tiny dots (depending on the font I guess).

I suppose this has to do with my system somehow because otherwise I would expect there to be a lot of noise about the issue.
Comment 9 Hossein 2024-05-08 23:06:06 UTC
Setting the status to "NEW" as per comment 8. The trails are better visible in dark mode, but I have removed the word "dark" from the title as per discussion in the above mentioned commit.

@bintoro:
Could you please test with the latest version to see if you still can reproduce it?
Comment 10 Stéphane Guillou (stragu) 2024-05-09 02:06:52 UTC
(In reply to bintoro from comment #8) 
> I'm seeing this in LO 7.6.2.1 on an Intel Mac with Skia enabled. No need for
> dark mode or bidirectional text.
Can you please share the full version info copied from LibreOffice > About? If you use "Skia/Metal", I think you are seeing bug 153306, which should be fixed in 24.2.3. Please test that version and report back if you can still see the issue.

@Hossein: given that this report is originally about Skia/Vulkan, I think we should close as duplicate of bug 155320.