Bug 112368 - copy and paste filename from save dialog fails (kf5)
Summary: copy and paste filename from save dialog fails (kf5)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks: KDE, KF5 Paste File-Dialog
  Show dependency treegraph
 
Reported: 2017-09-13 10:31 UTC by theopauw
Modified: 2022-05-12 20:31 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Callgrind output from master (2.52 MB, application/x-xz)
2018-11-24 14:50 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theopauw 2017-09-13 10:31:45 UTC
Description:
when trying to copy the filename from the "save as" dialog and paste it in the document, the program hangs for a few seconds and does not paste. Then becomes slow afterwards. Experienced in Writer and quickly tested that same seems to happen in Calc. Does not seem to happen in unrelated applications.

Steps to Reproduce:
1.Click Save As
2.Type document name and copy it (Ctrl-C)
3.Save and return to document
4.Try to paste (Ctrl-V)

Actual Results:  
Nothing pasted
Program hangs for ~ 5 seconds
Program unstable/slow afterwards

Expected Results:
paste the text value


Reproducible: Always

User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: TextDocument
[Information guessed from browser]
OS: Linux (Manjaro)
OS is 64bit: yes
Builds ID: LibreOffice 5.3.5.2


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Comment 1 raal 2017-09-13 19:45:53 UTC
I can confirm  - nothing pasted and program is slow. No crash.

Version: 6.0.0.0.alpha0+
Build ID: b02b3bcf4465c9ccb3edcaa26e090db0581cba9e
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-08_06:54:43
and Version 4.1.0.0.alpha0+
Comment 2 Yousuf Philips (jay) (retired) 2017-09-20 14:07:55 UTC
Still happens and after step 3, you can see that the paste control in the toolbar is disabled but the one in the menu bar isnt. Also if you close the file and open up a new writer window, the same delay will happen along with the disabled paste control in the toolbar.

Version: 6.0.0.0.alpha0+
Build ID: 7315f325ff7ada3d6bd85a471058fdaeaff8cdb0
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-17_06:58:21
Locale: en-US (en_US.UTF-8); Calc: group

Doesnt happen on windows or gtk3.
Comment 3 editor 2018-07-14 14:00:43 UTC Comment hidden (off-topic)
Comment 4 editor 2018-07-14 14:05:46 UTC Comment hidden (off-topic)
Comment 5 Buovjaga 2018-11-24 14:50:03 UTC
Created attachment 146999 [details]
Callgrind output from master

I took a callgrind trace.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 750ccfb2a60582a5652c08f3cbb6f11d4c152275
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk2; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 22 November 2018
Comment 6 Buovjaga 2019-10-01 17:06:48 UTC
Things have changed: gtk2 was dropped and now this can only be reproduced with the kf5 backend. There is no slow down, but we are unable to paste. Gen and gtk3 are fine

Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: 2e347c94503321c2102c6f78f5f5bcb771727e69
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 30 September 2019
Comment 7 Commit Notification 2019-10-02 09:12:22 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112368 Qt5 handle owned, non-LO clipboard content

It will be available in 6.4.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 8 Buovjaga 2019-10-02 11:01:21 UTC
Thanks a lot, verified.

Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: cb5eaa791739865d54b381c16c60224c432171dc
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 2 October 2019
Comment 9 Buovjaga 2019-10-02 12:06:25 UTC
Hmm, I have a suspicion this caused a weird side-effect.

1. Open Writer
2. File - Properties: Description tab
3. Type something in western characters to any field, select it, copy & paste to another field

Chinese glyphs are pasted.

For example,
input: buovjaga
output: 畢癯慪慧

This is not seen in the latest commit of Linux 6.4 bibisect repo. This is only seen with kf5 backend.
Comment 10 Commit Notification 2019-10-07 14:03:47 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/29e12fe99d38ce2a35b946f6a851940e347713dd

tdf#112368 Qt5 don't lose ownership in flushClipboard

It will be available in 6.4.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 11 Buovjaga 2019-10-07 15:21:31 UTC
Thanks a lot! -> Verified