Glynn Clements wrote:
Rodney Sparapani wrote:
> It just happened again, but this time, it didn't die. The first error
> message is the same, the second is different:
>
> X Error of failed request: BadWindow (invalid Window parameter)
> Major opcode of failed request: 18 (X_ChangeProperty)
> Resource id in failed request: 0x681655
> Serial number of failed request: 6539403
> Current serial number in output stream: 6539405
> X Error of failed request: BadWindow (invalid Window parameter)
> Major opcode of failed request: 25 (X_SendEvent)
> Resource id in failed request: 0x681655
> Serial number of failed request: 6539404
> Current serial number in output stream: 6539405
A BadWindow error for XChangeProperty() followed by one for
XSendEvent(), with consecutive serial numbers and identical window
IDs.
That *has* to be this code in x_reply_selection_request() in
select-x.c:
XChangeProperty (display, window, reply.property, type, format,
PropModeReplace, data, size);
/* At this point, the selection was successfully stored; ack it. */
XSendEvent (display, window, False, 0L, (XEvent *) &reply);
However, the "window" variable is taken from the "requestor" field
of
a SelectionRequest event.
IOW, an external program sends XEmacs a SelectionRequest event with a
bogus window ID, and Xlib complains when XEmacs tries to reply to the
(non-existent) requestor.
This has to be a bug in an external program, and there are limits to
what XEmacs can do about it.
I don't think that it can prevent Xlib from throwing the error. AFAIK,
there isn't any way to test whether a particular XID is valid (other
than trying to use it and seeing if an error occurs).
It's possible that there are bugs in the handling of X errors. At
least one such bug was fixed in the 21.4 series (the error handler was
calling into lisp which called into Xlib, which isn't allowed).
Ooh, I've just found an earlier thread that is eerily similar about
21.4.12 in which Glynn was also involved at
http://calypso.tux.org/pipermail/xemacs-beta/2004-November/003563.html
It mentions an even earlier discussion that I can't seem to track down
at the broken link
http://list-archive.xemacs.org/xemacs-beta/200309/msg00056.html
I'm assuming you would translate that into the modern address
http://calypso.tux.org/pipermail/xemacs-beta/2003-September/00056.html
however, it's not there either.
In any case, the suggested solution is:
(setq interprogram-cut-function nil)
(setq interprogram-paste-function nil)
If you don't hear from me again, this fixes it.
Rodney
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta