Subject: Re: Timed out waiting for reply from selection owner

From: Jan Djärv <[email-masked]>
Date: Wed, 25 Jun 2014 20:28:18 +0200

Hi.

25 jun 2014 kl. 18:04 skrev Stefan Monnier <[email-masked]>:

> forcemerge 17026 16737
> thanks
> 
> Do you guys still experience those hangs?
> Any hope of getting a vaguely reproducible recipe?
> 
> Jan, is there some debugging code we could add somewhere around the
> *select code which could help us track down the source of the problem?

If it times out, it is because we don't get the PropertyNotify we expect.
There is some TRACE one can turn on in xselect.c by defining TRACE_SELECTION.

But we should add something like this (totally untested, not even compiled):

=== modified file 'src/xselect.c'
--- src/xselect.c	2014-01-01 07:43:34 +0000
+++ src/xselect.c	2014-06-25 18:27:16 +0000
@@ -1144,8 +1144,19 @@
 {
   struct prop_location *rest;
 
+  fprintf (stderr, "Got property notify for %s, %s, %lu %p\n",
+           (event->state == PropertyDelete ? "deletion" : "change"),
+           XGetAtomName (event->display, event->atom),
+           (unsigned long)event->window,
+           event-display);
+
   for (rest = property_change_wait_list; rest; rest = rest->next)
     {
+      fprintf (stderr, "Check property notify against %s, %s, %lu %p\n",
+               (rest->desired_state == PropertyDelete ? "deletion" : "change"),
+               XGetAtomName (rest->display, rest->atom),
+               (unsigned long)rest->window,
+               rest->display);
       if (!rest->arrived
 	  && rest->property == event->atom
 	  && rest->window == event->window
@@ -1166,6 +1177,7 @@
 	  return;
 	}
     }
+  fprintf (stderr, "No property match\n");
 }
 
 	Jan D.