Copy/paste hangs software in host Ubuntu

Discussions about using Windows guests in VirtualBox.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Copy/paste hangs software in host Ubuntu

Post by mpack »

scottgus1 wrote: 12. Jun 2023, 16:08 some apps don't "copy" to the clipboard in the normal sense by shoving a bunch of text out, but instead push out a pointer to the text to be copied, and the source and destination apps communicate directly to transfer the data.
Pretty much. The source app would usually be rather complex and capable of rendering data in lots of ways. I don't know what "SDL View of Tradis Editor Window" is, but if it's much more than a simple text editor then it probably isn't compatible. It doesn't matter if you consider the text to be unformatted - it's the nature of the editor that matters, not the nature of the text.

You have to paste the text into a simple editor (e.g. Notepad++) then you can copy and paste simple text from there.
Bushido
Posts: 56
Joined: 13. Sep 2022, 23:28

Re: Copy/paste hangs software in host Ubuntu

Post by Bushido »

If so, if and when will there be a fix for it?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Copy/paste hangs software in host Ubuntu

Post by mpack »

Probably never. It's not a bug. It's a documented limitation caused by being two separate PCs running different OS.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Copy/paste hangs software in host Ubuntu

Post by fth0 »

FWIW, the VirtualBox Shared Clipboard supports three formats of data so far, which could be called Text, HTML and BMP. The Text format is the most complicated one, because everyone has a different understanding what a Text format may be, and there are several known "Text" clipboard formats (some of them can be seen in the last log messages).
FranceBB
Posts: 117
Joined: 20. May 2017, 05:07
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows XP x86
Contact:

Re: Copy/paste hangs software in host Ubuntu

Post by FranceBB »

mpack wrote: 13. Jun 2023, 11:11 Probably never. It's not a bug. It's a documented limitation caused by being two separate PCs running different OS.
Well, I mean, I don't mind if the data copied is in an unsupported format and can't be passed to the Linux host, however ideally the VM shouldn't crash, so in this regard I would consider it a bug.

In other words: it's totally fine if some URL can't be copy pasted from the VM browser to the host, but when an unsupported text is detected, it should really be ignored rather than ending up hanging the VM.


Anyway, I will update my old bug report with Bushido's logs.
I will also update it by including scottogus and mpack's insight about the inner workings of the virtual box clipboard, which were very interesting.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Copy/paste hangs software in host Ubuntu

Post by mpack »

FranceBB wrote: 13. Jun 2023, 20:18 Well, I mean, I don't mind if the data copied is in an unsupported format and can't be passed to the Linux host
If it's what we think then the data isn't available in any format. The "smart editor" app exposes a COM interface through which the receiving app can negotiate to have the data rendered in any way it prefers. There is almost zero chance that this can be made transparent to some random app running in a different OS on a different PC.

The VirtualBox user manual tells you that the clipboard supports text and images, i.e. the CF_TEXT and CF_BITMAP/CF_DIB formats. Nothing else is claimed.
Bushido
Posts: 56
Joined: 13. Sep 2022, 23:28

Re: Copy/paste hangs software in host Ubuntu

Post by Bushido »

mpack wrote: 14. Jun 2023, 09:53The "smart editor" app...
It is a feature of software where the translation takes place i.e. the main feature of this software. A picture of it: https://subscription.packtpub.com/book/ ... ditor-view. I am copying a text from the "side-by-side editor".
FranceBB
Posts: 117
Joined: 20. May 2017, 05:07
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows XP x86
Contact:

Re: Copy/paste hangs software in host Ubuntu

Post by FranceBB »

Bushido wrote: 9. Jun 2023, 22:05 If the same hang reproduces in the latest development snapshot, then a log of it would also help.
Sure, it actually occurred today as I copied a URL from Chrome Canary 116.
To be specific, it occurred when I tried to copy a URL from Chrome Canary 116 in the VM and paste it into Slack on Linux.

OS: Fedora 38
Virtualbox version: 7.0.97 r157070
WindowsEmbedded-2023-06-14-11-43-57.zip
(24.24 KiB) Downloaded 8 times

I updated the ticket with the new logs and Bushido's info and the mods' insights.

https://www.virtualbox.org/ticket/21212
mpack wrote: 14. Jun 2023, 09:53 If it's what we think then the data isn't available in any format. The "smart editor" app exposes a COM interface through which the receiving app can negotiate to have the data rendered in any way it prefers. There is almost zero chance that this can be made transparent to some random app running in a different OS on a different PC.
Yeah of course, this is definitely the issue, but what ideally I'd like Virtualbox to be doing is detect this and ignore the "looks-like-text-but-it's-not-text" I copied, thus avoiding to make the guest crash.

As we can see from the logs, it tried to read the data and parse it before crashing badly:

Code: Select all

03:02:07.774055 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:02:07.774089 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'UTF8_STRING' for X11 (idxFmtX11=1, fmtX11=3, atomTarget='UTF8_STRING') failed, rc=VERR_TIMEOUT
03:02:37.774656 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:02:37.774687 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'UTF8_STRING' for X11 (idxFmtX11=1, fmtX11=3, atomTarget='UTF8_STRING') failed, rc=VERR_TIMEOUT
03:03:07.775011 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:03:07.775050 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'STRING' for X11 (idxFmtX11=4, fmtX11=2, atomTarget='STRING') failed, rc=VERR_TIMEOUT
03:03:37.775298 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:03:37.775322 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'TEXT' for X11 (idxFmtX11=5, fmtX11=2, atomTarget='TEXT') failed, rc=VERR_TIMEOUT
03:04:07.775676 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:04:07.775725 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'text/plain' for X11 (idxFmtX11=6, fmtX11=2, atomTarget='text/plain') failed, rc=VERR_TIMEOUT
03:04:07.780861 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:04:07.781170 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:04:07.781458 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:04:07.781864 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:04:07.782069 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:04:37.799219 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:04:37.799244 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'UTF8_STRING' for X11 (idxFmtX11=1, fmtX11=3, atomTarget='UTF8_STRING') failed, rc=VERR_TIMEOUT
03:05:07.799509 Shared Clipboard: Error reading host clipboard data from X11, rc=VERR_TIMEOUT
03:05:07.799537 Shared Clipboard: Reading host clipboard data failed with VERR_TIMEOUT
03:05:07.799543 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:05:07.799558 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'UTF8_STRING' for X11 (idxFmtX11=1, fmtX11=3, atomTarget='UTF8_STRING') failed, rc=VERR_TIMEOUT
03:05:07.799567 Shared Clipboard: Converting X11 format 'UTF8_STRING' (idxFmtX11=1) to VBox format 0x1 failed, rc=VERR_NO_DATA
03:05:07.799772 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:05:37.799989 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:05:37.799989 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'UTF8_STRING' for X11 (idxFmtX11=1, fmtX11=3, atomTarget='UTF8_STRING') failed, rc=VERR_TIMEOUT
03:05:37.799989 Shared Clipboard: Error reading host clipboard data from X11, rc=VERR_TIMEOUT
03:05:37.799989 Shared Clipboard: Reading host clipboard data failed with VERR_TIMEOUT
03:05:37.799989 Shared Clipboard: Converting X11 format 'UTF8_STRING' (idxFmtX11=1) to VBox format 0x1 failed, rc=VERR_NO_DATA
03:05:37.799989 Shared Clipboard: Signalling host about guest clipboard data failed with VERR_NOT_FOUND
03:06:07.801179 Shared Clipboard: Error reading host clipboard data from X11, rc=VERR_TIMEOUT
03:06:07.801230 Shared Clipboard: Reading host clipboard data failed with VERR_TIMEOUT
03:06:07.801260 Shared Clipboard: Requesting data in format 0x1 for X11 host failed with VERR_TIMEOUT
03:06:07.801276 Shared Clipboard: Converting VBox formats 'UNICODETEXT' to 'UTF8_STRING' for X11 (idxFmtX11=1, fmtX11=3, atomTarget='UTF8_STRING') failed, rc=VERR_TIMEOUT
03:06:07.801328 Shared Clipboard: Converting X11 format 'UTF8_STRING' (idxFmtX11=1) to VBox format 0x1 failed, rc=VERR_NO_DATA

Ideally the expect behavior should be to:

- Parse the supported text between applications, like standard text in notepad
- Ignore the unsupported text pointers (like URLs in Chrome etc), thus preventing a crash
Post Reply