Subject: Re: bug#20283: 25.0.50; Emacs freezes when yanking

From: Tassilo Horn <[email-masked]>
Date: Thu, 09 Apr 2015 13:31:15 +0200

Eli Zaretskii <[email-masked]> writes:

>> Sometimes, I get the following error message just before the freeze
>> stops:
>> 
>>   gui-get-selection: (error "Timed out waiting for reply from selection owner")
>
> There were several similar bug reports lately,

Ups, sorry.

> at least these: 17172, 17101, 17026, 17737.  I suggest to read those
> discussions, perhaps there are some ideas there.

Yes, thanks.

I tested that `gui-get-selection' timeouts whenever the selection owner
is not the calling emacs itself.  I.e., when I have two emacs instances
(or one emacs and one different application), mark text in one and then
do (gui-get-selection 'PRIMARY) in the other, I get a timeout.  The same
happens when using the clipboard instead of the primary selection.  (I
don't have a clue how I modify the secondary selection, or rather, I
don't even know what that is).

As desktop environment I run GNOME 3.14 on Arch.  That hasn't been
updated for some months and the freezes started to appear only some days
ago.  I checked by my package logs for updates to X libraries but
couldn't find any except for

[2015-03-26 07:33] upgraded libinput (0.12.0-1 -> 0.13.0-1)
[2015-03-26 07:33] upgraded libmm-glib (1.4.4-1 -> 1.4.6-1)
[2015-03-27 07:00] upgraded libdrm (2.4.60-1 -> 2.4.60-2)
[2015-03-27 21:54] upgraded xf86-input-evdev (2.9.1-1 -> 2.9.2-1)
[2015-03-30 07:33] upgraded mesa (10.5.1-2 -> 10.5.2-1)
[2015-03-30 07:33] upgraded mesa-libgl (10.5.1-2 -> 10.5.2-1)

which don't look very suspicious to me.

Jan suggests that some klipper-like selection/clipboard management tool
could be the culprit for this behavior.  And indeed I use GPaste.  But
even after deactivating it, the behavior doesn't change.  But xclipboard
still won't start because another clipboard manager was running.  Maybe,
the gnome shell itself acts as a clipboard manager, too.  But then
again, it used to work with that gnome version a week ago.

The thing which I'm trying next is to compile with TRACE_SELECTION
enabled.  We'll see if that gives a clue.

Bye,
Tassilo