Comment 6 for bug 309785

Revision history for this message
In , Tom Jaeger (thjaeger) wrote :

These have happened to me a lot recently when testing easystroke, but they either occur early in the session or not at all. Not sure where the event comes from, this happens at a time when XAllowEvents(dpy, AsyncPointer) is called on a GrabModeSync core grab and there's also a GrabModeAsync XInput grab being released. For now, I've added a check for master before calling CopyKeyClass.

----

Program received signal SIGSEGV, Segmentation fault.
CopyKeyClass (device=0x9833000, master=0x0) at ../../Xi/exevents.c:201
201 mk = master->key;
(gdb) bt
#0 CopyKeyClass (device=0x9833000, master=0x0) at ../../Xi/exevents.c:201
#1 0x08112137 in mieqProcessInputEvents () at ../../mi/mieq.c:361
#2 0x080c0e27 in ProcessInputEvents ()
    at ../../../../hw/xfree86/common/xf86Events.c:174
#3 0x0808ce36 in Dispatch () at ../../dix/dispatch.c:399
#4 0x08071b6d in main (argc=10, argv=0xbf97cf14, envp=Cannot access memory at address 0x8
)
    at ../../dix/main.c:383
(gdb) print master
$1 = (DeviceIntPtr) 0x0
(gdb) up
#1 0x08112137 in mieqProcessInputEvents () at ../../mi/mieq.c:361
361 CopyKeyClass(dev, master);
(gdb) print dev->isMaster
$2 = 1
(gdb) print event->u.u.type == DeviceKeyPress
$5 = 1
(gdb) print event->u.keyButtonPointer
$6 = {pad00 = 9550, time = 2072921, root = 0, event = 0, child = 0,
  rootX = 655, rootY = 366, eventX = 0, eventY = 0, state = 0,
  sameScreen = 0 '\0', pad1 = 1 '\001'}