[comp.windows.x] bug with mit server on sun sparc staion?

aed@netcom.COM (Andrew Davidson) (03/06/91)

Hi

I am having alot of trouble with interclient communication. I am
trying to use client events. I think this may be a bug in the X11r4

(I am new to X and do not know where to post bugs). My code
works when run on a sun sparc 1+ running openwindows version 2 X
server, but not when I run with the MIT x server  on the same machine?

here is the error message I get when I call XSendEvent() from the
MIT server

X Error of failed request:  BadValue (integer parameter out of range
for operation)
  Major opcode of failed request:  25 (X_SendEvent)
  Minor opcode of failed request:  0
  Resource id in failed request:  0xffffffff
  Serial number of failed request:  98
  Current serial number in output stream:  98

If you want I can send you a complete version of the source code to
test with.

Andy


-- 
-----------------------------------------------------------------
                  "bede-bede-bede Thats all Folks"
				Porky Pig
Andy Davidson
Woodside CA.
aed@netcom.COM
-----------------------------------------------------------------

klee@wsl.dec.com (Ken Lee) (03/06/91)

In article <26948@netcom.COM>, aed@netcom.COM (Andrew Davidson) writes:
|> (I am new to X and do not know where to post bugs). My code
|> works when run on a sun sparc 1+ running openwindows version 2 X
|> server, but not when I run with the MIT x server  on the same machine?
|> 
|> X Error of failed request:  BadValue (integer parameter out of range
|> for operation)
|>   Major opcode of failed request:  25 (X_SendEvent)
|>   Resource id in failed request:  0xffffffff

XSendEvent() requires that the event mask specify only valid events.
Your mask (0xffffffff) specifies some invalid events.  You should
change this to specify only valid events.  Some older X servers were
sloppy about checking this, but most recent ones will correctly give
you the BadValue error.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee

mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (03/06/91)

> I am having alot of trouble with interclient communication.  I am
> trying to use client events.  I think this may be a bug in the X11r4
> (I am new to X and do not know where to post bugs).  My code works
> when run on a sun sparc 1+ running openwindows version 2 X server,
> but not when I run with the MIT x server on the same machine?

> X Error of failed request:  BadValue (integer parameter out of range for operation)
>   Major opcode of failed request:  25 (X_SendEvent)
>   Resource id in failed request:  0xffffffff

This is a bug in your program, which the OW server is letting you get
away with but the MIT server isn't.  You are, I have no doubt, passing
an event-mask of -1 (or ~0, or some other way of specifying "all bits
set").  This is not legal.  From the protocol document:

	SendEvent
[...]
	     event-mask: SETofEVENT

and then, in the appendix giving the encoding,

	SETofEVENT
[...]
	       #xfe000000  unused but must be zero

Thus, 0xffffffff includes all 7 of the disallowed bits; the MIT server
is quite right to generate an error.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu