xpra icon
Bug tracker and wiki

Opened 7 months ago

Closed 2 months ago

#1458 closed defect (worksforme)

Clipboard is unreliable with thunderbird editor area

Reported by: psycho_zs Owned by: psycho_zs
Priority: minor Milestone: 2.1
Component: clipboard Version: trunk
Keywords: Cc:

Description

Running thunderbird on server, copying or pasting text from/into thunderbird's editor area not working most of the time.

In the test I've copied text from leafpad on the client to leafpad on server (successful), then another text from leafpad on the client to thunderbird on server (previous data is pasted). Then again (unsuccessful), then pasted to leafpad on server (successful), then pasted to thunderbird (after pasted to leafpad, successful).

So after using clipboard for the first time, I'm only being able to paste to thunderbird after I paste to something else.

Attachments (5)

client_clipboard.log (139.3 KB) - added by psycho_zs 7 months ago.
server_clipboard.log (322.1 KB) - added by psycho_zs 7 months ago.
clipboard_client.log (24.9 KB) - added by psycho_zs 6 months ago.
isolated copy+paste
clipboard_server.log (61.6 KB) - added by psycho_zs 6 months ago.
isolated copy+paste
clipboard.log (77.4 KB) - added by psycho_zs 4 months ago.
firefox@client to thunderbird@server

Download all attachments as: .zip

Change History (16)

Changed 7 months ago by psycho_zs

Attachment: client_clipboard.log added

Changed 7 months ago by psycho_zs

Attachment: server_clipboard.log added

comment:1 Changed 7 months ago by Antoine Martin

Component: clientclipboard
Milestone: 2.0
Status: newassigned

From the log samples: xpra X11 version 2.0-r15223 64-bit on Linux Debian 9.0 stretch.

Oh god, another clipboard bug..

comment:2 Changed 6 months ago by Antoine Martin

Owner: changed from Antoine Martin to psycho_zs
Status: assignednew

I cannot reproduce.
The clipboard works for me everytime, in both directions.
I've tried on Fedora 25 and Debian Stretch.

Maybe something is interfering with the clipboard on your client system? See wiki/Clipboard.

I cannot use the sample log files provided as I have no way of knowing which part of the log file relate to what: the communication is done via the X11 server's "selections", so all the events look pretty much the same.

comment:3 Changed 6 months ago by Antoine Martin

Please provide more succinct or annotated log samples, otherwise I will have to close this ticket as "worksforme".

comment:4 Changed 6 months ago by psycho_zs

I've isolated two events: I copy text from leafpad on client and unsuccessfully try to paste it into thunderbird on server. No clipboard manager running. Copied text was: 2:36: copy from leafpad client to tb server
Attaching this part of server log and client output...

Changed 6 months ago by psycho_zs

Attachment: clipboard_client.log added

isolated copy+paste

Changed 6 months ago by psycho_zs

Attachment: clipboard_server.log added

isolated copy+paste

comment:5 Changed 5 months ago by Antoine Martin

OK, so that's quite a bit clearer.
We see lots of:

process clipboard request, request_id=11, selection=CLIPBOARD, local name=CLIPBOARD, target=TARGETS

That's the application requesting the list of targets for the clipboard. (the list of formats we can supply for this clipboard)

We dutifully respond every time with the list:

['TIMESTAMP', 'TARGETS', 'MULTIPLE', 'GTK_TEXT_BUFFER_CONTENTS', \
    'application/x-gtk-text-buffer-rich-text', 'UTF8_STRING', 'TEXT', 'STRING',  \
    'text/plain;charset=utf-8', 'text/plain']

But then we get a request that doesn't make any sense:

process clipboard request, request_id=14, selection=CLIPBOARD, local name=CLIPBOARD, target=application/x-moz-nativehtml

As it uses a target ("application/x-moz-nativehtml") we have not advertised.
And when forward it to the application, it responds with "no data":

unpack(..) type=, format=0, data=<type 'NoneType'>:0

Which is expected since we're requesting a target it knows nothing about.

And this rings a bell:

The patch above was not applicable as it is: some applications may provide the "x-moz-nativehtml" target, so we should only translate this target if it isn't going to work.
r15589 does that, it also exposes the targets we have last sent via xpra info:

$ xpra info | grep last-targets

@psycho_zs: does that work for you now?

Last edited 5 months ago by Antoine Martin (previous) (diff)

comment:6 Changed 4 months ago by Antoine Martin

Not heard back, closing.

comment:7 Changed 4 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

comment:8 Changed 4 months ago by psycho_zs

Formatting is lost on paste, e.g. when copying from LibreOffice? on client to Thunderbird on server.

Also I can not paste anything formatted copied from Firefox. And clipboard stops working after such attempt. E.g. when copying a random couple dozen lines from this ticket page.

BTW, this can be related: #1458

Last edited 3 months ago by Antoine Martin (previous) (diff)

Changed 4 months ago by psycho_zs

Attachment: clipboard.log added

firefox@client to thunderbird@server

comment:9 Changed 4 months ago by psycho_zs

Resolution: fixed
Status: closedreopened

reopening.

comment:10 Changed 3 months ago by Antoine Martin

Milestone: 2.02.1

Formatting is lost on paste, e.g. when copying from LibreOffice?? on client to Thunderbird on server.
Also I can not paste anything formatted copied from Firefox.

That's a different issue, please file another ticket and link back here.
It could well be because we are now filtering the invalid target application/x-moz-nativehtml.

And clipboard stops working after such attempt. E.g. when copying a random couple dozen lines from this ticket page.

Works for me, though after repeated copying I saw one of those two warnings in the server log and the clipboard was then disabled (as per the message):

clipboard disabled: more than %s clipboard requests per second!
Warning: loop nesting too deep: 10
 you may have a clipboard forwarding loop, disabling the clipboard

That's because thunderbird and Firefox make dozens of clipboard requests for a single paste... so r16146 tolerates more clipboard requests per second before giving up: waiting for sustained requests and tolerating more bursts, r16147 also raises the loop nesting limit to 20.

This should help a bit, but don't expect miracles: what those apps are doing with the clipboard is really pushing it.

comment:11 Changed 2 months ago by Antoine Martin

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.