[comp.windows.x] Bad Value in CreateWindow

km@mathcs.emory.edu (Ken Mandelberg) (06/02/89)

I am trying to trace a problem in running a particular X-client,
in this case x11ps out of the Sun3 Mathematica 1.1 release.
When I try it against 3 different X servers, two give up with
a protocol error in CreateWindow while the third is happy.
The two that bomb, specifically give a Bad Value error. As it happens I 
I have source to the server without the problem, but none to the
two that fail, I'm having trouble telling what the Value error is.

I'm enclosing matched sets of xscope traces for the CreateWindow
and the error reply (in two bad cases). Note that the Client Request
is essentailly identical in all cases. With the two bad servers, the
Bad Values are different and difficult to reconcile against the request.
For the first bad server, the bad balue is meaningless to me. For the
second it happens to coinicde with the "do-not-propogate-mask", a mask
that is identical in all requests.

Any insight would be appreciated.

I don't have source to either the client or the two servers it fails with,
and boy do I hate it!

========Working Server==============

 0.96: Client -->   92 bytes
	             Request (fd 4): 01 08 00 0c 00 60 00 01 00 08 00 6b 01 78 
00 fa 01 90 01 90 00 03 00 01 00 08 00 64 00 00 18 0a 00 00 00 00 00 00 00 01 
00 02 00 00 00 22 a0 3d 
	 ............REQUEST: CreateWindow
	     sequence number: 3
	               depth: 08
	      request length: 000c
	                 wid: WIN 00600001
	              parent: WIN 0008006b
	                   x: 376
	                   y: 250
	               width: 0190
	              height: 0190
	        border-width: 0003
	               class: InputOutput
	              visual: VIS 00080064
	          value-mask: background-pixel | border-pixel | event-mask | do-not-propagate-mask
	          value-list:
		    background-pixel: 00000000
		        border-pixel: 00000001
		          event-mask: StructureNotify
		do-not-propagate-mask: KeyPress | ButtonPress | ButtonRelease | ButtonMotion

==========Bad Server 1============

73.06: Client 2 -->   92 bytes
	             Request (fd 4): 01 08 00 0c 00 a0 00 01 00 08 00 6c 01 78 
00 fa 01 90 01 90 00 03 00 01 00 08 00 68 00 00 18 0a 00 00 00 fe 00 00 00 ff 
00 02 00 00 00 22 a0 3d 
	 ............REQUEST: CreateWindow
	     sequence number: 3
	               depth: 08
	      request length: 000c
	                 wid: WIN 00a00001
	              parent: WIN 0008006c
	                   x: 376
	                   y: 250
	               width: 0190
	              height: 0190
	        border-width: 0003
	               class: InputOutput
	              visual: VIS 00080068
	          value-mask: background-pixel | border-pixel | event-mask | do-not-propagate-mask
	          value-list:
		    background-pixel: 000000fe
		        border-pixel: 000000ff
		          event-mask: StructureNotify
		do-not-propagate-mask: KeyPress | ButtonPress | ButtonRelease | ButtonMotion
73.16: 					  32 bytes <-- X11 Server 2
Error: 					               Error (fd 5): 00 02 00 
03 00 a0 00 00 00 00 01 68 0e ff f9 90 00 3d 2b e8 00 3d 2b 68 00 13 bd 0c 00 
00 00 04 
					 ..............ERROR: Value
					     sequence number: 0003
					           bad value: 10485760 (0xa00000)
					        minor opcode: 0000
					        major opcode: 01

=========Bad Server 2=========

 0.36: Client -->   92 bytes
	             Request (fd 4): 01 08 00 0c 00 a0 00 01 00 08 00 6b 00 78 
00 28 01 90 01 90 00 03 00 01 00 08 00 64 00 00 18 0a 00 00 00 fc 00 00 00 fd 
00 02 00 00 00 22 a0 3d 
	 ............REQUEST: CreateWindow
	     sequence number: 3
	               depth: 08
	      request length: 000c
	                 wid: WIN 00a00001
	              parent: WIN 0008006b
	                   x: 120
	                   y: 40
	               width: 0190
	              height: 0190
	        border-width: 0003
	               class: InputOutput
	              visual: VIS 00080064
	          value-mask: background-pixel | border-pixel | event-mask | do-not-propagate-mask
	          value-list:
		    background-pixel: 000000fc
		        border-pixel: 000000fd
		          event-mask: StructureNotify
		do-not-propagate-mask: KeyPress | ButtonPress | ButtonRelease | ButtonMotion
 0.46: 					  96 bytes <-- X11 Server
Error: 					               Error (fd 5): 00 02 00 
03 00 22 a0 3d 00 00 01 64 1f ff fa f4 00 00 18 0a 00 41 ec 78 00 48 20 a8 00 
48 30 ac 
					 ..............ERROR: Value
					     sequence number: 0003
					           bad value: 2269245 (0x22a03d)
					        minor opcode: 0000
					        major opcode: 01

-- 
Ken Mandelberg      | km@mathcs.emory.edu          PREFERRED
Emory University    | {decvax,gatech}!emory!km     UUCP 
Dept of Math and CS | km@emory.bitnet              NON-DOMAIN BITNET  
Atlanta, GA 30322   | Phone: (404) 727-7963

rws@EXPO.LCS.MIT.EDU (06/03/89)

I think xscope is deficient in the case of printing masks, because it doesn't
tell you what garbage bits are being set that shouldn't be.  Your client is
almost certainly passing extraneous bits in the do-not-propagate-mask.  A
correct server will give you an error (the MIT R3 server is incorrect here).