Bug 139807 - Order of deletion and text type is shuffled in LibreOffice Writer when typed very quickly with xdotool
Summary: Order of deletion and text type is shuffled in LibreOffice Writer when typed ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2021-01-21 10:07 UTC by user5028841
Modified: 2023-05-10 04:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description user5028841 2021-01-21 10:07:08 UTC
Description:
When some program is used to type into LibreOffice Writer very quickly and the content includes both character and backspaces, the backspaces are sequenced later.

Steps to Reproduce:
1. Open LibreOffice Writer.
2. Execute `sleep 1; xdotool key --delay 0 a BackSpace b` in another command, and quickly switch back to LibreOffice Writer window.

Actual Results:
The content of the page is `a`.

Expected Results:
The content of the page should be `b` (which is what happens if the key sequence `a BackSpace b` is typed into the page slowly)


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
There's no option for "Use OpenGL for all rendering", but "Use hardware acceleration" is turned on; but it doesn't make any difference if it's turned off.

Originally reported at https://github.com/openstenoproject/plover/issues/1059 -- the bug doesn't happen at version 5.4.7.2, but does happen at 6.1.5.2 or 7.0.4.2.

It takes a long time to download each version of LibreOffice to test, so I can't tell if 6.1.5.2 is the first affected version.
Comment 1 Buovjaga 2021-07-17 14:30:05 UTC
Reproduced with gtk3, but not with gen/x11.

You can try launching with
SAL_USE_VCLPLUGIN=gen libreoffice

I don't have access to a kf5 backend version at the moment. You could try with it as well or mention if you are seeing it in your Help - About under VCL.

NixOS
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: b1df9c67349cf4cc5be4128d797aefb87f50e38f
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: x11
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded

Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Comment 2 Buovjaga 2021-08-10 19:04:21 UTC
Ok I did some more testing on another machine and this was actually fixed some time after 7.1, so I am closing.
Comment 3 user5028841 2021-08-12 03:45:17 UTC
I just try downloading LibreOffice 7.2.0.2 (Linux x86-64 rpm). The bug remains. Are you using some newer version?
Comment 4 Buovjaga 2021-08-12 06:33:38 UTC
Hmm, now I could also reproduce with a master build and gtk3 and kf5. Not sure why I got a different result before. Setting back to NEW.
Comment 5 Buovjaga 2022-01-21 09:45:23 UTC
As Wayland gains market share, xdotool will become unreliable as it only works with XWayland. Therefore, these could be tested:
https://github.com/atx/wtype
https://github.com/ReimuNotMoe/ydotool
Comment 6 fmgtack+libreoffice 2023-05-09 11:25:43 UTC
With the command `sleep 1 ; ydotool key -d <delay> 30:1 30:0 14:1 14:0 48:1 48:0` on Fedora 38 on Wayland, I can go down to "-d 0" (default is 12) in the text editor gedit and in this browser field. b (key 48) is correctly rendered.

In LibreOffice Writer (alone), I can go down to 3 ms. 2 ms is a hit and miss and 1 ms systematically leaves me with a (key 30). In Impress and Calc, also a zero delay between keystrokes renders b.