QXcbClipboard: SelectionRequest too old

1,348 views
Skip to first unread message

Scott Kostyshak

unread,
Jun 8, 2016, 9:20:21 PM6/8/16
to CopyQ
Dear all,

I get the following messages sent to STDERR when running LyX from the
terminal while CopyQ is running:
QXcbClipboard: SelectionRequest too old
There are often lots of them.

When CopyQ is not running I do not get them when running LyX.

In case it helps, LyX uses Qt also.

I'm not at all suggesting CopyQ does something wrong. I'm just curious
if anyone has advice for how I can figure out why these messages occur
and if there is a way to safely disable them.

Best,

Scott

Lukáš Holeček

unread,
Jun 9, 2016, 1:41:49 AM6/9/16
to CopyQ
Hi,

There is a related Qt issue but it's been already fixed for Qt 5. [1]

There are other relatively new issues that can be related. [2] [3]

Seems to happen either if Lyx doesn't own the clipboard/selection or it's already been changed. [4]

Does this happen when selecting text continuously with mouse or keyboard?

Anything changes if you disable "Paste clipboard with mouse" or "Paste mouse selection with keyboard" in CopyQ?

Lukas





--
You received this message because you are subscribed to the Google Groups "CopyQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copyq+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copyq/20160609012017.3gp3wi7illw6v2j6%40cotopaxi.
For more options, visit https://groups.google.com/d/optout.

Scott Kostyshak

unread,
Jun 12, 2016, 4:55:26 AM6/12/16
to CopyQ
On Thu, Jun 09, 2016 at 07:41:47AM +0200, Lukáš Holeček wrote:
> Hi,
>
> There is a related Qt issue but it's been already fixed for Qt 5. [1]
>
> There are other relatively new issues that can be related. [2] [3]
>
> Seems to happen either if Lyx doesn't own the clipboard/selection or it's
> already been changed. [4]
>
> Does this happen when selecting text continuously with mouse or keyboard?

It happens with both. All I need to do is make a short selection and
stop and the messages keep coming. If I do shift+right, the messages
appear when I release the shift key.

> Anything changes if you disable "Paste clipboard with mouse" or "Paste
> mouse selection with keyboard" in CopyQ?

Does not make a difference.

Thanks for all of the references. I will let you know if I discover any
new information. I might take a look at the LyX code.

Thanks,

Scott
> To view this discussion on the web visit https://groups.google.com/d/msgid/copyq/CAAMGTDy5kqMaUhSFcJiq4GZD9jMJUfYDbC0DFm-3Q4QGdvp8FA%40mail.gmail.com.

Scott Kostyshak

unread,
Jun 13, 2016, 2:10:06 AM6/13/16
to CopyQ
On Sun, Jun 12, 2016 at 04:55:23AM -0400, Scott Kostyshak wrote:
> On Thu, Jun 09, 2016 at 07:41:47AM +0200, Lukáš Holeček wrote:
> > Hi,
> >
> > There is a related Qt issue but it's been already fixed for Qt 5. [1]
> >
> > There are other relatively new issues that can be related. [2] [3]
> >
> > Seems to happen either if Lyx doesn't own the clipboard/selection or it's
> > already been changed. [4]
> >
> > Does this happen when selecting text continuously with mouse or keyboard?
>
> It happens with both. All I need to do is make a short selection and
> stop and the messages keep coming. If I do shift+right, the messages
> appear when I release the shift key.
>
> > Anything changes if you disable "Paste clipboard with mouse" or "Paste
> > mouse selection with keyboard" in CopyQ?
>
> Does not make a difference.
>
> Thanks for all of the references. I will let you know if I discover any
> new information. I might take a look at the LyX code.

I took a look at LyX's code, and apparently it is due to a custom event
filter in order to get XCB events that we recently committed:

www.lyx.org/trac/changeset/52fee35/lyxgit

I will ask the authors of that patch if they know what's going on.

Scott

Scott Kostyshak

unread,
Jul 26, 2016, 11:57:04 PM7/26/16
to CopyQ
On Mon, Jun 13, 2016 at 02:10:00AM -0400, Scott Kostyshak wrote:
> On Sun, Jun 12, 2016 at 04:55:23AM -0400, Scott Kostyshak wrote:
> > On Thu, Jun 09, 2016 at 07:41:47AM +0200, Lukáš Holeček wrote:
> > > Hi,
> > >
> > > There is a related Qt issue but it's been already fixed for Qt 5. [1]
> > >
> > > There are other relatively new issues that can be related. [2] [3]
> > >
> > > Seems to happen either if Lyx doesn't own the clipboard/selection or it's
> > > already been changed. [4]
> > >
> > > Does this happen when selecting text continuously with mouse or keyboard?
> >
> > It happens with both. All I need to do is make a short selection and
> > stop and the messages keep coming. If I do shift+right, the messages
> > appear when I release the shift key.
> >
> > > Anything changes if you disable "Paste clipboard with mouse" or "Paste
> > > mouse selection with keyboard" in CopyQ?
> >
> > Does not make a difference.
> >
> > Thanks for all of the references. I will let you know if I discover any
> > new information. I might take a look at the LyX code.
>
> I took a look at LyX's code, and apparently it is due to a custom event
> filter in order to get XCB events that we recently committed:
>
> www.lyx.org/trac/changeset/52fee35/lyxgit
>
> I will ask the authors of that patch if they know what's going on.

We've looked at the code and made an improvement but warnings still
come.

I'm assuming the warnings only come when the clipboard is polled for the
primary selection. I do not have "Store text selected using mouse"
selected in CopyQ preferences. Does CopyQ still ask for the primary
selection in this case? Is there any way to ask CopyQ to ask for the
"clipboard" selection but not the "primary" selection?

What I'm also puzzled by is that even when I select "Disable Clipboard
Storing", the warnings still appear. Is CopyQ still retrieving the
selections and just not storing them? Otherwise I find it strange
because I do not see any warnings if I exit CopyQ.

Thanks for your help on this,

Scott

Lukáš Holeček

unread,
Jul 27, 2016, 4:47:59 AM7/27/16
to CopyQ
CopyQ checks selection content if either selection storing or synchronization to clipboard option is enabled.

But Qt probably still needs to check if clipboard and selection changes if we listen for the changes using signal/slot connection (https://github.com/hluk/CopyQ/blob/master/src/platform/dummy/dummyclipboard.cpp#L45).

Seems that event filter in Lyx somehow conflicts with some code in Qt. Perhaps the solution for the bug in Qt I mentioned earlier may help: https://codereview.qt-project.org/#/c/32263/

Lukas


Scott

--
You received this message because you are subscribed to the Google Groups "CopyQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copyq+un...@googlegroups.com.

Scott Kostyshak

unread,
Jul 27, 2016, 10:26:44 PM7/27/16
to CopyQ
On Wed, Jul 27, 2016 at 10:47:58AM +0200, Lukáš Holeček wrote:
> CopyQ checks selection content if either selection storing or
> synchronization to clipboard option is enabled.
>
> But Qt probably still needs to check if clipboard and selection changes if
> we listen for the changes using signal/slot connection (
> https://github.com/hluk/CopyQ/blob/master/src/platform/dummy/dummyclipboard.cpp#L45
> ).

Good to know.

> Seems that event filter in Lyx somehow conflicts with some code in Qt.
> Perhaps the solution for the bug in Qt I mentioned earlier may help:
> https://codereview.qt-project.org/#/c/32263/

We tried something with the timestamp here:
http://www.lyx.org/trac/changeset/cb0c881b/lyxgit

I will pass on the solution you linked to to the author of that commit
and see if it helps.

I'll report back here after that.

Thanks,

Scott

Scott Kostyshak

unread,
Jul 29, 2016, 1:25:54 PM7/29/16
to CopyQ
On Wed, Jul 27, 2016 at 10:26:40PM -0400, Scott Kostyshak wrote:

> We tried something with the timestamp here:
> http://www.lyx.org/trac/changeset/cb0c881b/lyxgit
> I will pass on the solution you linked to to the author of that commit
> and see if it helps.
>
> I'll report back here after that.

It seems like this is as far as we will get, and for a good reason. The
only way I was able to get interest in this issue from other LyX
developers was to find a behavior that related to the warning and was a
bug: our middle-click paste would not work unless the target window was
already in focus. With the commit I reference above, this bug is fixed.
The warnings still come up for me but I can no longer find that they are
responsible for a bug, so we understandably consider the fix as final.

Thanks for your help, Lukáš. I think I will just have to live with these
warnings or implement a workaround into my workflow (e.g. pipe LyX's
output through to grep -v to remove the warnings).

Scott

Scott Kostyshak

unread,
Jun 9, 2017, 5:31:52 PM6/9/17
to CopyQ
On Fri, Jul 29, 2016 at 01:25:50PM -0400, Scott Kostyshak wrote:

> Thanks for your help, Lukáš. I think I will just have to live with these
> warnings or implement a workaround into my workflow (e.g. pipe LyX's
> output through to grep -v to remove the warnings).

After updating CopyQ, this issue went away. I'm very happy about that.
If anyone is curious, I could do a git bisect to figure out which commit
lead to the fix.

Scott

Scott Kostyshak

unread,
Dec 10, 2017, 2:49:36 AM12/10/17
to CopyQ
After updating CopyQ, I am seeing the messages again. A bisect suggests
the following commit caused the change: 8624a2a2.

Scott

Lukáš Holeček

unread,
Dec 10, 2017, 6:49:24 AM12/10/17
to CopyQ
On Sun, Dec 10, 2017 at 8:49 AM, Scott Kostyshak <scott.k...@gmail.com> wrote:
After updating CopyQ, I am seeing the messages again. A bisect suggests
the following commit caused the change: 8624a2a2.


Thanks for the investigation!

Lukas

Scott Kostyshak

unread,
Dec 10, 2017, 2:53:45 PM12/10/17
to CopyQ
Thank you, Lukáš. It works very well now! I do still get that message on
current master, but only very rarely. I could try to investigate further
if you thought there were some underlying important issue, but from what
I understand it is just an annoying message that you are helping me to
limit, and it is no longer annoying so I'm not planning to look into it
further. Thank you for your help!

Scott
Reply all
Reply to author
Forward
0 new messages