Comment 16 for bug 311254

Revision history for this message
In , Pcpa (pcpa) wrote :

(In reply to comment #1)
> git bisect and a stack trace seem indicated here; I'm not seeing any trouble
> with media keys on this build.

  The crash happens when plugging a usb keyboard on a computer with
a simple/standard keyboard, and using the multimedia keys in the
usb keyboard.

  I started with tag 1.5.99.3, after the revert of mpx, etc, as in this
computer, everything, but X Server was the latest released tarball.
  1.5.99.3 is "good" in the sense that it doesn't crash, but the event
is not sent to any window, but it should be "acceptable" to require
properly configuring xkb in this case :-)

% git bisect log
# bad: [251d0d8090322b2c9dc0c8b7bef001f338d19433] Update version to 1.5.99.901 (1.6 RC1)
# good: [523aae1fa6d8002e55e85aee49f113b7eb9a6df3] Bump version to 1.5.99.3 (1.6 beta3)
git bisect start 'origin/server-1.6-branch' 'xorg-server-1.5.99.3'
# good: [6c635faa6ff0474199f4f7375022efe1e8ffa8f1] XQuartz: update quoting in case X11.app is moved to a directory with a space. (cherry picked from commit cc805dc799efa37c8dcefa3db04d87e9b835ffbd) (cherry picked from commit ecc3a7b6090552c309fe8e264d527ddd666a5761)
git bisect good 6c635faa6ff0474199f4f7375022efe1e8ffa8f1
# good: [2ce48363b862db134624797bc071f8c45323a075] xfree86: don't call CheckMotion if a device hasn't been enabled. #19176
git bisect good 2ce48363b862db134624797bc071f8c45323a075
# good: [8cfb353078d9b5d03a9633304038141a60adc970] dix: Fix handling of do_not_propagate_mask window attribute.
git bisect good 8cfb353078d9b5d03a9633304038141a60adc970
# good: [69ddac23281534a06c0acb3005a09e4448594925] Apple: Don't use DRI2 (cherry picked from commit a1d35cee5907a76977ee43c49cb55c8f411c9794)
git bisect good 69ddac23281534a06c0acb3005a09e4448594925
# bad: [6be355b8e8cabeb5832ce9970a83782ea46fd4d1] dix: drop x/y back into last.valuators before updating the history (#19285)
git bisect bad 6be355b8e8cabeb5832ce9970a83782ea46fd4d1

cut & paste of the first bad commit (for easier visualization):
% git show 6be355b8e8cabeb5832ce9970a83782ea46fd4d1
commit 6be355b8e8cabeb5832ce9970a83782ea46fd4d1
Author: Peter Hutterer <email address hidden>
Date: Fri Jan 9 13:46:20 2009 +1000

    dix: drop x/y back into last.valuators before updating the history (#19285)

    positionSprite needs to scale to screen coordinates and in the process of
    doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after
    finishing and before updating the motion history. This way, we don't push the
    screen coordinates into the motion history.

    X.Org Bug 19285 <http://bugs.freedesktop.org/show_bug.cgi?id=19285>
    (cherry picked from commit 56efbc0986e782da45addb05ece9f456d41d7a90)

diff --git a/dix/getevents.c b/dix/getevents.c
index 707d1da..16e23dc 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -695,6 +695,9 @@ positionSprite(DeviceIntPtr dev, int *x, int *y,
                                  dev->valuator->axes + 1, scr->height);
     }

+ /* dropy x/y (device coordinates) back into valuators for next event */
+ dev->last.valuators[0] = *x;
+ dev->last.valuators[1] = *y;
 }

 /**
@@ -980,9 +983,6 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
     positionSprite(pDev, &x, &y, scr, &cx, &cy);
     updateHistory(pDev, first_valuator, num_valuators, ms);

- /* dropy x/y (device coordinates) back into valuators for next event */
- pDev->last.valuators[0] = x;
- pDev->last.valuators[1] = y;

     /* Update the valuators with the true value sent to the client*/
     if (num_valuators >= 1 && first_valuator == 0)

Xorg.0.log from "keyboard detection" to crash:
(II) config/hal: Adding input device USB-compliant keyboard
(**) USB-compliant keyboard: always reports core events
(**) USB-compliant keyboard: Device: "/dev/input/event9"
(II) USB-compliant keyboard: Found keys
(II) USB-compliant keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "USB-compliant keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) USB-compliant keyboard: xkb_rules: "evdev"
(**) Option "xkb_model" "evdev"
(**) USB-compliant keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) USB-compliant keyboard: xkb_layout: "us"
Popen: `"/usr/bin/xkbcomp" -w 1 "-R/usr/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/tmp/server-0.xkm"', fp = 0x8bec210
Pclose: fp = 0x8bec210
Loaded XKB keymap /tmp/server-0.xkm, defined=0x7f
FlushingSerial
(II) config/hal: Adding input device USB-compliant keyboard
(**) USB-compliant keyboard: always reports core events
(**) USB-compliant keyboard: Device: "/dev/input/event10"
(II) USB-compliant keyboard: Found 10 mouse buttons
(II) USB-compliant keyboard: Found x and y relative axes
(II) USB-compliant keyboard: Found keys
(II) USB-compliant keyboard: Configuring as mouse
(II) USB-compliant keyboard: Configuring as keyboard
(**) USB-compliant keyboard: YAxisMapping: buttons 4 and 5
(**) USB-compliant keyboard: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "USB-compliant keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) USB-compliant keyboard: xkb_rules: "evdev"
(**) Option "xkb_model" "evdev"
(**) USB-compliant keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) USB-compliant keyboard: xkb_layout: "us"
Popen: `"/usr/bin/xkbcomp" -w 1 "-R/usr/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/tmp/server-0.xkm"', fp = 0x8bf34a8
Pclose: fp = 0x8bf34a8
Loaded XKB keymap /tmp/server-0.xkm, defined=0x7f
(**) USB-compliant keyboard: (accel) keeping acceleration scheme 1
(**) USB-compliant keyboard: (accel) filter chain progression: 2.00
(**) USB-compliant keyboard: (accel) filter stage 0: 20.00 ms
(**) USB-compliant keyboard: (accel) set acceleration profile 0
FlushingSerial

Backtrace:
0: X(xorg_backtrace+0x3b) [0x812dbbb]
1: X(xf86SigHandler+0x51) [0x80c8bc1]
2: [0xffffe400]
3: X(mieqProcessInputEvents+0x327) [0x810d1e7]
4: X(ProcessInputEvents+0x17) [0x80c9787]
5: X(Dispatch+0x6e) [0x808716e]
6: X(main+0x3bd) [0x806c47d]
7: /lib/i686/libc.so.6(__libc_start_main+0xe5) [0xb7c0e5c5]
8: X [0x806b931]

Fatal server error:
Caught signal 11. Server aborting

  Maybe this is also related to the problem I have with 1.6 and git
master, where, if I want to see where a firefox link points to, in the
status bar, I need to right click the link first...