Bug 118052 - Libreoffice cannot copy paste from VirtualBox hosted Windows XP VM with 5.4.7
Summary: Libreoffice cannot copy paste from VirtualBox hosted Windows XP VM with 5.4.7
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Whiteboard: needsVirtualBox needsXP
Depends on:
Blocks: Paste
  Show dependency treegraph
Reported: 2018-06-07 15:39 UTC by dudemr
Modified: 2019-12-12 12:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

this is a pdf of the bug (307.91 KB, application/pdf)
2018-06-09 21:02 UTC, dudemr

Note You need to log in before you can comment on or make changes to this bug.
Description dudemr 2018-06-07 15:39:04 UTC
I have Libreoffice (x64)
Win 10 Home 64 bit

This is a new laptop 5 days old and i have reloaded windows, so all drivers and files are new and not corrupted. I did install the JRE to use Libre database, but removed the entry in tools/advanced in trying to troubleshoot the copy paste problem and figured that the JVM isolation may have been the issue.

When virtualbox is open and running an XP session it is not possible to use the copy paste in libre office writer properly.

If I open Chrome or Edge and copy parts of a page using right click copy then libre office writer then do a right click, PASTE greyed out.
PASTE SPECIAL is available but its options are not available.

Most times I am able to do a CTRL-V and the data in the clipboard will paste.

If I go to MS one note or Wordpad I can right click/paste properly, even with Virtualbox open, so the clipboard seems to be operating normally. THerefore the issue is with Writer and how it interfaces with the clipboard.

If I close Virtualbox and repeat all the steps the copy/paste works normally for Libre Writer.  I do not know if there are other apps that affect Writer similarly.

I have not tested the other Libre apps with copy/paste. 

I notice that there are many closed bugs for the same issue, so I opened a new one and am trying to be very specific.

Steps to Reproduce:
1.open virtualbox xp session, Writer, MS Wordpad, Chrome or Edge
2. Highlight and copy a part of a webpage using right click /copy or ctrl-c
3. Right-click in Writer.  Paste is not available but sometimes CTRL-V works
4. Right click in Wordpad, copy paste works fine.
5. Close Virtualbox. repeat steps and all works fine.

Actual Results:  
Copy paste is not functioning when some other apps are open
Sometimes Ctrl-v will work

Expected Results:
Need copy paste to work reliably.

Reproducible: Always

User Profile Reset: No

Additional Info:
This is a 5 day old laptop and windows has been reloaded 1 day ago to ensure the files are all fine.

Don't know how to check open gl.

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36
Comment 1 Dieter 2018-06-07 17:45:58 UTC
Thank you for reporting the bug. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 Dieter 2018-06-07 17:48:37 UTC
> Don't know how to check open gl.

You can disable OpenGL here: Tools => Option => LibreOffice => View => Graphics Output
Comment 3 dudemr 2018-06-07 20:01:30 UTC
I installed Version: (x64) Libre office and the
Issue still persists.
Unable to right click/paste when virtualbox is running an XP machine
I can CTRL-V without a problem.

I also checked Open GL.  It was off, but the problem still persists whether its on or off.

I also notice that if I immediately close LOffice and right click/paste the data in the clipboard will paste, but then on the next try the rightclick paste is again inactive.

Comment 4 Telesto 2018-06-07 20:34:57 UTC
Similar reports: bug 116014, bug 113220  bug 57147
Comment 5 V Stuart Foote 2018-06-07 20:45:08 UTC
Find a clipboard viewing utility (I prefer Nirsoft's InsideClipboard [1]) and install to both the Windows 10 host and to the XP guest VM. Then peek at what is held in clipboard both on the XP virtual machine and on the host Windows system.

The Windows system clipboard is not a stack--just one application has control and it should release it when finished or another application makes a clipboard call. The release may or may-not purge the clipboard.

Suspect the VirtualBox VM framework is holding the clipboard mouse context menu actions--although it is possible some other application is blocking. 

But frankly LO's clipboard management internally, and our crossplatform integration with the OS "system clipboard" has problems.

Good solid steps to reproduce are needed for these kinds of issues.

[1] https://www.nirsoft.net/utils/inside_clipboard.html
Comment 6 dudemr 2018-06-08 02:07:46 UTC
Are you telling me that the problem is not repeatable on your test systems?

I am not sure how much more specific I can get to describe the problem.  I do not have a clipboard viewer, but 

1. using the same circumstances when the rightclick paste fails, I have done a control-v and the paste succeeds. 
2. I can also rightclick /paste with any other app and it works
3. I have since tested with the LO Spreadsheet program and the problem exists there.
4. And in the  Open office app which LO is forked from,  they appear to have a similar issue.

This indicates that the problem has existed a long time, but has not been properly identified.

I cannot install a clipboard viewer.
Comment 7 dudemr 2018-06-08 03:41:29 UTC
Further info:

I have another W10 pc that had been upgraded from w7 when W10 was a free upgrade a few years ago.

It operates Libre Office 6 right click /paste properly when virtualbox is running.
So there may be some files that came over from the w7 installation that the newer w10 unit does not have or uses differently.

So I can understand why it may be difficult to reproduce the problem.
Comment 8 eelutejiswi 2018-06-08 12:22:27 UTC Comment hidden (spam)
Comment 9 V Stuart Foote 2018-06-08 12:37:17 UTC
(In reply to dudemr from comment #6)
> Are you telling me that the problem is not repeatable on your test systems?

Your configuration running Windows XP on a VirtualBox machine makes it challenging for anyone to replicate. Few if any will be able to repeat.

We also need more precise steps to reproduce--unclear even which clipboard (host OS or guest XP has keyboard/mouse focus). Lots of moving pieces.

> I cannot install a clipboard viewer.

YOU need to as it is required data point to determine if the system clipboard (both the host OS, and the guest OS) correctly receives the copied content to make it available for paste. 

Prove the content is available to both clipboards! Are the clipboards (host and guest VM) in sync?  That NEEDINFO is to you.

We have to determine if your lack of context menu connection to clipboard on the host OS is simply a VirtualBox issue? Installing a clipboard viewer to both host and guest VM is needed to diagnose. Do other applications running on the host behave when the XP VM is running?

Also, unclear if you are having the paste issue in the VM or in the host OS? Would need to know which has keyboard/mouse focus.

Does this only affect the host when a XP guest OS is running hosted by VirtualBox?

Otherwise--if the VM hosting of a currently active build (6.0, 6.1 or 6.2/master) on a supported VM (Windows 7 sp1, 8.1 or 10) actually has this issue--it can be addressed.

I can test a VMWare VM, I probably won't test VirtualBox. At this point this is "needsVirtualBox needsXP", we'll adjust that if not the case.

If VirtualBox on Windows 10 hosting XP VM with a 5.4 build is the only constant, for certain we WONTFIX as XP is unsupported and 5.4 is EOL--and frankly looks to be not our bug.

@Xisco--any take for running this down?
Comment 10 dudemr 2018-06-08 17:18:41 UTC
I can appreciate that it's not really your problem since there is a version of w10 that can copy paste with virtual box running.

Thank you for the responses and the effort. I will use the unit that works. Please consider the issue closed.
Comment 11 V Stuart Foote 2018-06-08 18:31:05 UTC
Testing from Windows 10 Ent 64-bit en-US (ver 1803) with VMWare Workstation Pro 12.5.8 and a Windows XP Sp3 32-bit guest VM.

Nirsoft InsideClipboard installed to VM and to Host.

Clipboard Linkage across to VMWare hosting framework looks to just support Clipboard Format ID 13 CF_UNICODETEXT

From a Firefox session running on VM a copy of styled content from a web page posts Clipboard Format ID 1, 13, 49331, 49486, 49487, 49488, and 49489. Crossing the VMWare bridge just ID 13 content is posted to clipboard of the host.

Likewise, from a Firefox session running on the Win 10 host, copy of style content from the same web pages posts Clipboard Format ID 1, 13, 49409, 49882, 49883, 49884, 49885

Working with LibreOffice.

From a LO session running on VM, a copy of formatted paragraph of text from Writer populates the VMs clipboard with ID 1, 13, 49331, 49372, 49430, 49528, 49529, 49530, 49531.  And here the host clipboard picks up just the IDs CF_UNICODETEXT and Rich Text Format clipboard content passed back to the host.

And copy of the same formatted DT entry from a LibreOffice session on the host places Clipboard IDs 1, 13, 49296, 49409, 49338, 49912, 49915, 49918, 49919 -- with the same CF_UNICODE and Rich Text Format clipboard content passed to the guest XP.

So, at least with VMWare Workstation--the clipboard is bidirectional, but does limit what content is passed between host and guest OS. And otherwise, the content on the clipboard(s) will be dependent on the VM hosting framework.


Clipboard IDs, ** mark content crossing from VMWare guest OS
XP guest
49331 - HTML Format
49372 - Rich Text Format **
49430 - Richtext Format
49486 - text/html
49487 - text/_moz_htmlcontext
49499 - text/-moz_htmlinfo
49489 - text/x-moz-url-priv
49528 - Star Embed Source (XML)
49529 - HTML (Hyper Text Markup Language)
49530 - Link
49531 - Star Object Descriptor (XML)

Win10 host
49296 - Rich Text Format **
49409 - HTML Format
49882 - text/html
49883 - text/_moz_htmlcontext
49884 - text/-moz_htmlinfo
49885 - text/x-moz-url-priv
49838 -	Richtext Format	Memory
49912 -	Star Object Descriptor (XML)
49915 -	HTML (HyperText Markup Language)
49918 -	Link
49919 -	Star Embed Source (XML)
Comment 12 V Stuart Foote 2018-06-08 21:14:03 UTC
@dudemr, I'm OK with closing this out WFM but could you let us know if with your VirtualBox instance(s) you had installed the Guest Addition for XP (hosted as VBoxGuestAdditions_<buildID>.iso for all OSs [1, 2]).

VMWare Workstation has a similar requirement to install its VMWare Tools, which I do routinely. Poked around and found that Oracle's VirtualBox had a similar requirement needed to control UI features between host and guest like clipboard and GPU/monitor display tweaking.

[1] https://www.virtualbox.org/manual/ch04.html#additions-windows

[2] https://download.virtualbox.org/virtualbox
Comment 13 dudemr 2018-06-09 15:23:19 UTC

The issue is not Libre office

I resolved the issue. I had used a cloned image for the xp machine which had an older vbox addition.  I reloaded the newer vbox addition and all copy paste functions work now.

Thank you all for your assistance.
Comment 14 dudemr 2018-06-09 21:02:27 UTC
Created attachment 142627 [details]
this is a  pdf of the bug
Comment 15 dudemr 2018-06-09 21:04:47 UTC
Unfortunately I jumped the gun. I still have the problem, but its a little changed. Also I found out that the other older W10 unit also does it too.

To reproduce the problem:

Start virtualbox wxp virtual machine.  Wait till it is fully up. You can then minimize it or place it in the background.
Start LO Writer in the W10 host.
Also in the W10 host, Start Chrome. Go to https://tnstateparks.com/parks/cummins-falls as an example
Hilight any part of the page in chrome and copy.
Mouse over to Writer .  Right click > usually paste is active on the initial menu
Repeat the hilight-copy on the webpage
on the second writer rightclick paste is no longer active.
However ctrl-v does paste properly.
If you close Writer and then relaunch then right click/paste is active from the data in step 7
On subsequent pastes rightclick /paste is no longer available, which indicates to me that  the clipboard is running.

If you give me specific instructions I will try to get a clipboard tool for the info you require.
Comment 16 V Stuart Foote 2018-06-09 21:14:37 UTC
(In reply to dudemr from comment #15)
> If you give me specific instructions I will try to get a clipboard tool for
> the info you require.

As in comment 5

But again, if the VM guest is Windows XP running 5.4.7 this will not/can not be fixed.
Comment 17 dudemr 2018-06-11 04:10:38 UTC
Hello Stuart:
I tried but could not edit the bug title from version 5.

The virtualbox is not running LO, it runs only the XP operating system and a few apps that operate only in XP, but none of these apps are actually started in the XP box when the issue occurs.

The problem occurs on the host machine which is running w10 64 bit and LO
it also occurs in LO 5. I updated it from LO 5 when I was advised that there was a newer version.

The XP VM is minimized or in the background on the taskbar of of W10. 
All operations in LO and in chrome occur in the W10 host environment. 
However the issue occurs only when virtualbox is running. 
The clipboard works for all other apps that i use including notepad and wordpad

I do have a workaround using ctrl-v, but I thought that the problem should be properly identified and fixed, if not now, then in a future release.
Comment 18 Xisco Faulí 2018-12-10 16:50:35 UTC
LibreOffice no longer runs on XP since LibreOffice 6.1 -> https://wiki.documentfoundation.org/ReleaseNotes/6.0#Windows
Comment 19 Mosin Motte 2019-12-12 05:22:03 UTC Comment hidden (spam)
Comment 20 V Stuart Foote 2019-12-12 12:59:36 UTC
Not really a WONTFIX, OP never provided results of installing a clipboard viewer and doing a COPY while the VirtualBox is running a 'guest os' (XP in this problem case), vs. when it is not.

LO was only running on the 'host os' (Windows 10).

OPs Issue was only with LibreOffice on 'host os' and with access to the clipboard on 'host os'--but only while the Oracle VirtualBox instance of XP 'guest os' was running.

Absent details on contents of the Win10 'host os' available to paste we can't confirm issue is with LibreOffice or the more likely Not Our Bug of the VirtualBox  framework holding clipboard incorrectly when 'guest os' XP is active.

=> Insufficient Data