keyboard crashes in current git
davem at davemloft.net
Mon Mar 3 10:41:37 PST 2008
From: Daniel Stone <daniel at fooishbar.org>
Date: Mon, 3 Mar 2008 10:37:53 +0200
> On Sun, Mar 02, 2008 at 10:31:09PM -0800, David Miller wrote:
> > I suspect it's caused by all of the recent XKB work by Daniel Stone.
> > My keyboard is using pre-XKB keymaps, the curKeySyms.map is NULL for
> > the device so even the very first getevents call gets a SIGSEGV.
> While you have definitely encountered a bug, I'd definitely recommend
> using a real keymap, rather than having a broken setup whereby it falls
> back to defaults.
If you look at the InputDevice section I provided, I do. It's not
getting picked up for some reason.
When I traced the code all of the 'names' members are NULL when
XkbDDXLoadKeymapsByNames() is called by XkbInitKeyboardDeviceStruct.
Perhaps some bug got introduced into the config parser or some other
area of this xkb code.
> > Here is a trace from some of the relevant code:
> > InitKeyboardDeviceStruct(dev[0x338bb8],pSyms[0xff9ad5b8])=1
> > InitKeyboardDeviceStruct: dev->key->curKeySyms.map[(nil)]
> > So XKB is passing in the non-NULL pSyms but for some reason
> > it isn't getting attached to dev->key->curKeySyms.map
> > GetKeyboardValuatorEvents: pDev(0x338bb8) map((nil))
> > And then we crash in GetKeyboardValuatorEvents because it is
> > NULL.
> Please file a bug at http://bugs.freedesktop.org.
Sorry, I don't have time to do this.
I did however fully track down the cause of the problem and traced the
whole initialization of the keyboard map and showed why the code sets
it to NULL. And if you read the rest of my replies you'll see not
only that information, but the exact changeset of your's that
introduced the crash.
So hopefully you'll be motivated enough by that to fix the regression
you changes added. Although, in my opinion, the mere existence of a
known regression like this one should be sufficient for that.
BTW, even with this oops fixed there are lots of other keyboard
related problems resulting from your changes. For example, xterm's
"Alt/Numlock Modifiers" setting no longer has any effect.
More information about the xorg