Subject: pkg/18412: x11/xkbset dumps core if the XKB extension is not loaded
To: None <>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 09/25/2002 14:05:28
>Number:         18412
>Category:       pkg
>Synopsis:       x11/xkbset dumps core if the XKB extension is not loaded
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 25 00:09:00 PDT 2002
>Originator:     Robert Elz
>Release:        NetBSD 1.6F   pkgsrc of 20020924
	Prince of Songkla University
System: NetBSD 1.6F NetBSD 1.6F (FUCHSIA) #16: Sat Aug 24 14:26:40 ICT 2002 i386
Architecture: i386
Machine: i386
	If XKB is not loaded in the X server (perhaps because the
	xkb compiler fails, perhaps because /usr (containing /usr/X11R6)
	is mounted read only, so /usr/X11R6/lib/X11/xkb/compiled cannot
	be written to, then xkbset will dump core (for most usages).
	Arrange (one way or another) to not be using xkb.   Run
	xkbset q (or almost any other usage of xkb, aside from printing
	the usage/help message)   Watch for the core dump...
	Create a new file patches/patch-ab containing the following

--- main.c.orig	Thu Aug 17 11:36:15 2000
+++ main.c	Wed Sep 25 01:45:12 2002
@@ -91,6 +91,10 @@
   xkb = XkbGetKeyboard(display,XkbControlsMask,XkbUseCoreKbd);
+  if (xkb == 0) {
+      fprintf(stderr, "XKB not supported for display %s\n", getenv("DISPLAY"));
+      exit(1);
+  }
   XkbGetControls(display, XkbAccessXTimeoutMask|XkbAllControlsMask, xkb);
   if (query) {