Bug 99623 - Copy-paste freezes LibreOffice when CLCL is running (sysdtrans.dll!CMtaOleClipboard::getClipboard) - no steps
Summary: Copy-paste freezes LibreOffice when CLCL is running (sysdtrans.dll!CMtaOleCli...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL: http://www.nakka.com/soft/clcl/index_...
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Clipboard
  Show dependency treegraph
 
Reported: 2016-05-02 10:47 UTC by Konstantin Vlasov
Modified: 2022-03-18 06:07 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Crash dump analysis (9.24 KB, text/plain)
2018-02-06 14:49 UTC, Konstantin Vlasov
Details
Dump of soffice.bin performed with procdump tool (875.05 KB, application/octet-stream)
2018-05-21 21:00 UTC, Leo442
Details
Windbg analysis of the dump (9.21 KB, text/plain)
2018-05-23 13:47 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Vlasov 2016-05-02 10:47:06 UTC
CLCL is a clipboard manager. When it is running, LibreOffice often freezes for several minutes when I try to call Copy or Paste operation. Not each time, but about 90%. If I exit CLCL I do not experience freezes anymore.
One might think it's a CLCL's problem, but it happens only with LibreOffice, all other applications work perfectly with CLCL running.
Comment 1 Konstantin Vlasov 2016-05-02 10:52:40 UTC
Sorry, didn't notice that the "Version" field is "earliest affected". Unfortunately I cannot tell when it started, but long ago, many of the 4.x versions definitely had this problem too.
Comment 2 Buovjaga 2016-05-09 10:27:53 UTC
0% freeze for me with CLCL running.

Win 7 Pro 64-bit, Version: 5.1.2.2 (x64)
Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
Locale: fi-FI (fi_FI)

Version: 5.2.0.0.alpha1+
Build ID: 3d27afd26f7b85c46a7c7d08498000b9dbcea1c8
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-05-09_02:42:15
Locale: fi-FI (fi_FI)
Comment 3 Xisco Faulí 2017-06-19 12:26:49 UTC Comment hidden (obsolete)
Comment 4 Konstantin Vlasov 2017-06-25 23:44:33 UTC
Yes, I update LO from time to time but the issue is still there. Just reproduced it in 5.3.3.2 x64.

The problem is, it cannot be reproduced reliably (like, do this, do that, and here you've got it). Sometimes it may work flawlessly for half an hour, sometimes it hangs at the very first attempt on any clipboard operation. Sometimes it's LO that hangs, sometimes it's CLCL that hangs, or even the target application I tried to paste the copied text into (it could be CLCL hook that hangs the target application, though).

Another thing I completely forgot about is that I'm using not a downloadable binary from the official CLCL site but compiled it from sources (with minor changes to make it more Unicode-friendly by default), so it might also affect the behavior. I need to re-check with the stock CLCL but I keep forgetting to do that...
Comment 5 Timur 2017-07-21 10:03:16 UTC
This bug may stay open but I'm afraid it's of no use since Buovjaga didn't reproduce and that os not widely used. 
So I set back to Needinfo for submitter to add some reproducible steps or new info. 

If you don't get Crash Report, and sometimes there's no in Windows -  I guess you'd mentioned it if it were - you may use procdump (part of free and useful Sysinternaly Suite) during LO run in order to get a dump (soffice.bin.dmp).
How: 
- run procdump manually after LO start (path-to\SYSINTERNALSSUITE\procdump.exe soffice.bin -h path-to\soffice.bin.dmp) for reproducible bugs like this one, OR
- via simple batch file like attachment 129814 [details], that is used instead of LO icon to start LO, for intermittent bugs (which seems to be the case here).

You may upload that crash dump or do it yourself:
- analyze dump with WinDbg configured per https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg (set "Symbol File Path")
- attach here as an attachment result of "!analyze -v" command in WinDbg (that's "backtrace") 
- if "!analyze -v" is empty, which comes after "ntdll!NtTerminateProcess" error, go with "kb" that prints stack trace and "~* kp" to dump the whole stack.
Comment 6 Timur 2017-07-21 10:06:15 UTC
Not to forget, there are a number of nasty bugs with paste like Bug 46406 or Bug 107515. This may be related or not. Please  write your OS version.
Comment 7 Buovjaga 2017-07-21 12:27:32 UTC
Konstantin: which LibreOffice applications do you use when it freezes? Writer, Calc..?
Comment 8 QA Administrators 2018-01-29 10:27:17 UTC Comment hidden (obsolete)
Comment 9 Konstantin Vlasov 2018-02-06 14:49:20 UTC
Created attachment 139635 [details]
Crash dump analysis

I'm terribly sorry for disappearance. I just did not have any time for proper bug maintaining. I have a custom-built CLCL, so it might have something to do with it. I also have many other programs running, each of them might have some effect too. So to make the test most useful I'd have to run a virtual machine or something with more or less clean environment, with original CLCL, and reproduce the problem there, but I didn't get time for that.

Also, the bug is not always reproducable, so by the Murphy's Law when I try to get it deliberately it does not show, but then it hangs just when I really need to do some work, and do it right now, so I just restart the app, cursing at it and making myself a note to definitely process that bug properly next time...

To reply the previously asked questions:
My OS is Windows 7 SP1 64-bit.
Specific LibreOffice applications I've experienced the problem with, are Writer and Calc, but I just don't use other apps, so it just might be they are all affected.


Finally, I installed LO 6.0.0.3 64-bit and reproduced the problem in Writer, so I finally took the crash dump. I attached the "!analyze -v" output here. I kept the crash dump, so I can upload it too if required.
Comment 10 Timur 2018-02-06 18:17:59 UTC
Please write steps. When you say "I try to call Copy or Paste operation" is CLCL used and how? 
Since this is specific, please find some time to try with regular CLCL so that others can reproduce.
Comment 11 Konstantin Vlasov 2018-02-08 12:50:40 UTC
CLCL is just running. I believe it uses hooks or some similar technique to monitor for clipboard, keep its history and (if requested by user) bring back one of the earlier contents into the clipboard. In my scenario I do not actively interact with CLCL in any way, just let it do its silent work. I don't have stable reproduction scenario, but what I generally do, is: open some document in LibreOffice (normally, a DOC file), select some text, copy it into clipboard, switch to another application, paste there, copy something from there, switch back to LO and paste, copy-paste within the same LO document, copy several times different parts of text without pasting anywhere... that kind of thing. Sooner or later, after one of the Ctrl+C or Ctrl+V keypress LO suddenly freezes, interface does not react to any input, and after several seconds Windows pops up with "Application does not respond". If I wait long enough (several minutes), it may unfreeze and continue to work normally, but then freeze again when I try to use clipboard next time.

During the freeze, CLCL itself is also non-responding. If I was using another application to copy from or paste to, aside from LO, that application may freeze as well. I would have thought it the problem of CLCL, but as I described in the first post, it happens only with LibreOffice. All the same applications work flawlessly when no LO is running.

I'll try to run the original CLCL to check if it's going to change anything (although I suspect it won't; all I did was just recompile the project as Unicode instead of ANSI, and with default settings also configured to support Unicode better).
Comment 12 Buovjaga 2018-02-08 13:32:59 UTC
Attempted to extract steps:

1. open some document in LibreOffice (normally, a DOC file)
2. select some text
3. copy it into clipboard
4. switch to another application
5. paste there
6. copy something from there
7. switch back to LO and paste
8. copy-paste within the same LO document
9. copy several times different parts of text without pasting anywhere

Sooner or later, after one of the Ctrl+C or Ctrl+V keypress LO suddenly freezes, interface does not react to any input and after several seconds Windows pops up with "Application does not respond". If I wait long enough (several minutes), it may unfreeze and continue to work normally, but then freeze again when I try to use clipboard next time.
Comment 13 Timur 2018-02-08 16:55:32 UTC
Buovjaga, please use procdump or WinDbg when you test it. Or always :)
We can't say whether CLCL has an influence or not. Because frequent copy+paste may freeze LO anyway. These are long-standing nasty bugs that are hard to pinpoint.
Comment 14 Buovjaga 2018-02-09 18:40:47 UTC
I cannot reproduce with the steps from comment 12 and CLCL running. Note that comment 12 was just me prettifying Konstantin's explanation.

Win 10 64-bit
Version: 6.0.0.3 (x64)
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: fi-FI (fi_FI); Calc: group
Comment 15 Timur 2018-03-15 12:33:23 UTC
Than we can only ask Konstantin to try both his and original CLCL running always with free procdump 
path-to\SYSINTERNALSSUITE\procdump.exe soffice.bin -h path-to\soffice.bin.dmp
Comment 16 Leo442 2018-05-19 17:29:02 UTC
Hello,

I am another user of CLCL and this bug is driving me nuts too !

I am using CLCL 2.0.3 (official binary) on a Windows 7 64-bit SP1.

For me the problem is systematic. Here's how it happens:

- I have LibreOffice Writer opened, with a document I am working on
- in another application, I copy some content (CTRL+C); it can be two lines of text of an image, the result is the same
- when I switch to Writer to paste the content, it hangs before I even have a chance to do CTRL-V. The freeze can last from 15 seconds to 60 seconds
- once it un-freezes, I can do CTRL-V and the content is pasted into the document

Additional notes:
- Writer does NOT crash
- the freeze seems to start a couple of seconds after the copy operation (not at the exact second the copy was done)

Let me know if you need additional information.
Comment 17 Buovjaga 2018-05-19 18:18:03 UTC Comment hidden (obsolete)
Comment 18 Leo442 2018-05-21 21:00:35 UTC
Created attachment 142235 [details]
Dump of soffice.bin performed with procdump tool

Here's the dump as requested
Comment 19 Leo442 2018-05-21 21:02:58 UTC Comment hidden (no-value)
Comment 20 Buovjaga 2018-05-23 13:47:27 UTC
Created attachment 142250 [details]
Windbg analysis of the dump

Produced an analysis of the dump with the advice in https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg#Producing_a_mini_dump
Comment 21 QA Administrators 2019-05-24 02:57:50 UTC Comment hidden (obsolete)
Comment 22 Konstantin Vlasov 2019-06-05 22:42:16 UTC
Sorry again for having disappeared. Too many things to do, too little time to do them... :-(

I installed LO version 6.2.4.2 x64 shortly after your request, and since then I was working without prior exiting CLCL (as I was normally doing since I've noticed the bug). Unfortunately, it's not that often that I need to use LO, so the statistics is not plenty.

Still, I can already tell that there is, if not a complete fix, then at least significant improvement. Out of 4 or 5 work sessions I've had, only once LO did freeze, but I don't know if it was the version 6.2.4 or not. Unfortunately my head was completely filled with the task at hand, so with a curse and barely any other thought I just quickly killed both LO and CLCL, restarted LO and continued my work. It was only much later that I remembered about the incident, and banged my head for not recording the event. Now I don't even remember which LO version was installed on that computer at that moment. I did update LO to the version 6.2.4 there, but somehow I completely forgot if the freeze happened before or after this update.

Sorry about that, it would be very useful information. For now, I will keep watch on this problem and not forget to take a dump if it's reproduced. Is it OK to keep the bug open for a while, while I continue experimenting? If in a few weeks I don't reproduce the freeze I'll gladly call this fixed.

As for checking for regression... I'll try to find time for it, but I cannot promise.
Comment 23 Buovjaga 2019-06-06 03:15:13 UTC
Well, we have Leo442, who was suffering from this last year. Would be interesting to hear his experience with 6.2.4.
Comment 24 Ivan Williams 2019-08-22 06:43:02 UTC
LibreOffice 6.1.6.3
Calc
Windows 10 Home 64 bit 8G Ram

I do not use CLCL just normal Windows Clipboard.
I get the same problem on Paste (Ctrl-V) I use the key shortcuts.
Cannot reproduce consistently. Happens on more than one sheet.
It freezes LibreOffice completely. I use Windows Task Manager to stop the process. Repair the file and carry on. I get this at least every other day.
I save often and do not lose much work anymore.

Please I need detailed explanation on how to produce useful "dump file" information for you to use.

Thanks for the work you do.
Ivan
Comment 25 Buovjaga 2019-08-22 07:39:10 UTC
(In reply to Ivan Williams from comment #24)
> LibreOffice 6.1.6.3
> Calc
> Windows 10 Home 64 bit 8G Ram

The version you use is too old to be relevant at this point of the report. Please try with version 6.3.0
Comment 26 locrash 2019-12-26 06:00:28 UTC Comment hidden (off-topic)
Comment 27 Buovjaga 2019-12-26 06:29:12 UTC Comment hidden (off-topic)
Comment 28 Julien Nabet 2020-01-22 16:14:31 UTC
(In reply to Buovjaga from comment #20)
> Created attachment 142250 [details]
> Windbg analysis of the dump
> 
> Produced an analysis of the dump with the advice in
> https://wiki.documentfoundation.org/
> How_to_get_a_backtrace_with_WinDbg#Producing_a_mini_dump

It makes me think about one of bt retrieved in https://bugs.documentfoundation.org/attachment.cgi?id=157317 (from tdf#127547).
Comment 29 David 2020-03-15 19:59:40 UTC Comment hidden (off-topic)
Comment 30 Buovjaga 2020-03-15 20:32:42 UTC Comment hidden (off-topic)
Comment 31 David 2020-03-16 11:25:26 UTC Comment hidden (off-topic)
Comment 32 Buovjaga 2020-03-16 11:28:52 UTC Comment hidden (off-topic)
Comment 33 David 2020-03-17 13:09:00 UTC
Well try to look at it the other way around. If the freeze occurs WITHOUT CLCL installed the bug is probably not in CLCL...
Comment 34 QA Administrators 2022-03-18 03:43:38 UTC Comment hidden (obsolete)
Comment 35 Ivan Williams 2022-03-18 06:07:00 UTC
Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 6; OS: Windows 10.0 Build 22000; UI render: Skia/Raster; VCL: win
Locale: en-ZA (en_ZA); UI: en-ZA
Calc: threaded