BadAccess to a GrabButton

Sam Varshavchik sam.varshavchik at gmail.com
Sat May 2 23:31:20 UTC 2020


I'm running automated tests that map/unmap things quickly, amongst other
things. I am getting a BadAccess in response to one of the GrabButton
requestrs, and I can't figure out why (x11trace):

000:>:0705:Error 10=Access: major=28, minor=0, bad=79691853

X documentation says that BadAccess results from either a conflicting grab
from another client or if I already have another passive grab.

Grepping x11trace log, these are the only GrabButton and UngrabButton events
I see:

000:<:053b: 24: Request(28): GrabButton owner-events=false(0x00)
grab-window=0x04c00003
event-mask=ButtonPress,ButtonRelease,EnterWindow,LeaveWindow,PointerMotion
pointer-mode=Synchronous(0x00) keyboard-mode=Synchronous(0x00)
confine-to=None(0x00000000) cursor=None(0x00000000) button=any
button(0x00) modifiers=AnyModifier
000:<:06ae: 24: Request(28): GrabButton owner-events=false(0x00)
grab-window=0x04c0004d
event-mask=ButtonPress,ButtonRelease,EnterWindow,LeaveWindow,PointerMotion
pointer-mode=Synchronous(0x00) keyboard-mode=Synchronous(0x00)
confine-to=None(0x00000000) cursor=None(0x00000000) button=any
button(0x00) modifiers=AnyModifier
000:<:06d1: 12: Request(29): UngrabButton button=any button(0x00)
grab-window=0x04c0004d modifiers=AnyModifier
000:<:0705: 24: Request(28): GrabButton owner-events=false(0x00)
grab-window=0x04c0004d
event-mask=ButtonPress,ButtonRelease,EnterWindow,LeaveWindow,PointerMotion
pointer-mode=Synchronous(0x00) keyboard-mode=Synchronous(0x00)
confine-to=None(0x00000000) cursor=None(0x00000000) button=any
button(0x00) modifiers=AnyModifier
000:<:071c: 12: Request(29): UngrabButton button=any button(0x00)
grab-window=0x04c0004d modifiers=AnyModifier
000:<:071f: 12: Request(29): UngrabButton button=any button(0x00)
grab-window=0x04c00003 modifiers=AnyModifier

Request 0705 is the one that returned an error. I do not see any conflicts
here.

I do not get a BadAccess if I add a flush and a sleep, after the grabs, so
there must be a race condition somewhere?


More information about the xorg mailing list