[comp.windows.x] Crash in XGrabpoiter X11R4

bill@polygen.uucp (Bill Poitras) (10/03/90)

I am runnign X11R4 under SunOs 4.1.  When I make a call to XGrabPoiter I get
the following X error message:

X windows Protocol error: BadValue (integer parameter out of range for operation)
     Major opcode of failed request:  26
     Minor opcode of failed request: 0
     Resource id in failed request: 0x8038
     Serial number of failed request: 553


Here's the actual call:
 XGrabPointer(dpy, menu->menuWindow, FALSE,
      ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | ExposureMas k,
      GrabModeAsync, GrabModeAsync, None, None, CurrentTime);

This problems only occurs when the menu is in its own top window, and when
I am running X11R4 in not in bug compatibility mode.  It works in X11R3 and
X11R4 in bug compatibilty mode.  

Any help will greatly be appreciated.


+-----------------+---------------------------+-----------------------------+
| Bill Poitras    | Polygen Corporation       | {princeton mit-eddie        |
|     (bill)      | Waltham, MA USA           |  bu sunne}!polygen!bill     |
|                 |                           | bill@polygen.com            |
+-----------------+---------------------------+-----------------------------+

mouse@LARRY.MCRCIM.MCGILL.EDU (10/04/90)

> I am runnign X11R4 under SunOs 4.1.  When I make a call to
> XGrabPoiter I get the following X error message:

> X windows Protocol error: BadValue (integer parameter out of range for operation)
>      Major opcode of failed request:  26
>      Minor opcode of failed request: 0
>      Resource id in failed request: 0x8038
>      Serial number of failed request: 553

> Here's the actual call:
>  XGrabPointer(dpy, menu->menuWindow, FALSE,
>       ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | ExposureMas k,
>       GrabModeAsync, GrabModeAsync, None, None, CurrentTime);

What is ExposureMask doing there?  From the Xlib document, the
description of the event_mask argument is

	          Specifies which pointer events are reported to the
	          client.  The mask is the bitwise inclusive OR of
	          the valid pointer event mask bits.

From later on, in chapter 8,

	event type.  The following table lists the event category
	and its associated event type or types. The processing asso-
	ciated with these events is discussed in section 8.4.
	
	____________________________________________________________
	Event Category           Event Type
	____________________________________________________________
	Keyboard events          KeyPress, KeyRelease
	Pointer events           ButtonPress, ButtonRelease, Motion-
	                         Notify
....
	____________________________________________________________

I sure don't see Expose events (to which ExposureMask corresponds) in
the list of pointer events, so ExposureMask is an invalid bit to set in
the event_mask argument, and the server is entirely correct to
complain.

					der Mouse

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

lagoze@thrym.cs.cornell.edu (Carl Lagoze) (10/05/90)

mouse@LARRY.MCRCIM.MCGILL.EDU writes:

>> I am runnign X11R4 under SunOs 4.1.  When I make a call to
>> XGrabPoiter I get the following X error message:

>> X windows Protocol error: BadValue (integer parameter out of range for operation)
>>      Major opcode of failed request:  26
>>      Minor opcode of failed request: 0
>>      Resource id in failed request: 0x8038
>>      Serial number of failed request: 553

>> Here's the actual call:
>>  XGrabPointer(dpy, menu->menuWindow, FALSE,
>>       ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | ExposureMas k,
>>       GrabModeAsync, GrabModeAsync, None, None, CurrentTime);

>What is ExposureMask doing there?  From the Xlib document, the
>description of the event_mask argument is

 <STUFF DELETED>

The other day I posted a message regarding a problem with xterm and
xman after building X11 under SunOS4.1.  This is exactly the X error
message I was getting.  So what's going on??

Carl Lagoze                             lagoze@cs.cornell.edu
Dept. of Computer Science               607-255-8670
Cornell University
Ithaca, NY 14853

mouse@LARRY.MCRCIM.MCGILL.EDU (10/06/90)

>>> I am runnign X11R4 under SunOs 4.1.  When I make a call to
>>> XGrabPoiter I get the following X error message:

>>> X windows Protocol error: BadValue (integer parameter out of range for operation)
>>>      Major opcode of failed request:  26
>>>      Minor opcode of failed request: 0
>>>      Resource id in failed request: 0x8038
>>>      Serial number of failed request: 553

> The other day I posted a message regarding a problem with xterm and
> xman after building X11 under SunOS4.1.  This is exactly the X error
> message I was getting.  So what's going on??

Exactly?  I have no idea then.  Or was the major opcode still 26, but
the "Resource id" something else?  Or was the major opcode different?

I suspect you are somehow running an R3 xterm which has the bug about
passing ~0 as the event-mask to things like XGrabPointer.  If "xset bc"
hides the problem this is probably what's happening.  The proper fix,
of course, is to use a version of xterm that isn't buggy.  If that's
not possible for some reason, using "xset bc" is an acceptable
workaround until you can get a working xterm.

					der Mouse

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