New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When the client clipboard contains an image, ConvertSelection(target="STRING") requests hang forever #2763
Comments
Hi @catern Thanks for raising this rather interesting fault. I can reproduce it on 0.9.21 with a Windows 10 client and the attached test.png. I'm using
Interestingly, the client seems to be advertising that a STRING conversion target is available, but something seems to be getting lost in the plumbing somewhere when it is requested. Are you seeing a similar result with I'll try the latest development version next to make sure we haven't already fixed this. |
Yes, I see the same output from (Btw, I'm able to reproduce the problem by just right clicking an image in Chrome and selecting "Copy image" - I'm normally on a Linux client so I don't have Paint easily available :) ) |
The problem exists on devel too. I've traced it through here, and it seems caused by the chansrv clipboard code reporting that In other words there are two problems here:-
2 is the more important one, as this can happen normally if the clipboard contents are changed between the format announcement and the format request. |
Thanks, Matt for your investigation. I also looked around the code, the same opinion as you. |
Yes you guys are right, chansrv should not report string and utfstring unless the client reports text and unicode. I have a patch for this around, I'll see if I can find it. |
Something like this, the fix is to not always report text unless client reports is can do text.
|
Thanks for that Jay. I suspect it's a bit more complicated. I see we also support text when xrdp/sesman/chansrv/clipboard.c Lines 2354 to 2361 in 9bbb2ec
I'll work on a PR to fix both issues. |
xrdp version
0.9.21
Detailed xrdp version, build options
Operating system & version
Rocky Linux 8.8 (Green Obsidian)
Installation method
dnf / apt / zypper / pkg / etc
Which backend do you use?
xorgxrdp
What desktop environment do you use?
happens even in an empty X session
Environment xrdp running on
VM
What's your client?
happens with both xfreerdp on Linux and Microsoft client on Windows
Area(s) with issue?
Clipboard
Steps to reproduce
xclip -out -selection clipboard
✔️ Expected Behavior
xsel should return immediately with the output "Error: target STRING not available", as on normal X.
❌ Actual Behavior
xsel hangs indefinitely.
Anything else?
No response
The text was updated successfully, but these errors were encountered: