Ticket #138 (closed crash: fixed)
Xquartz 2.30 fails to load keymap from US - International
| Reported by: | fabriciosn@… | Owned by: | jeremyhu@… |
|---|---|---|---|
| Priority: | Blocker | Milestone: | 2.3.1 |
| Component: | xserver | Version: | 2.3.0 (xserver-1.4.2-apple5) |
| Keywords: | keymap, US International | Cc: | gustavo.michels@… |
Description
The command startx works pretty nice if using the keyboard layout U.S., but if instead i use US - International, a custom keyboard input from http://www.brockerhoff.net/usi/ it does not work. The Stock version of X11 that comes with Leopard doens't show this problem.
font_cache: Scanning user font directories to generate X11 font caches font_cache: Updating FC cache
Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11 Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly X11.app: main(): argc=2
argv[1] = --listenonly
Waiting for startup parameters via Mach IPC. X11.app: do_start_x11_server(): argc=2
InitConnectionLimits: MaxClients = 255 Xquartz starting: X.Org X Server 1.4.2-apple5 Build Date: 20080715 Launchd socket fd: -1 Sync Extension 3.0 Popen: `"/usr/X11/bin/xkbcomp" -w 1 "-R/usr/X11/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/var/tmp/server-0.xkm"', fp = 0xa080c5a0 Pclose: fp = 0xa080c5a0 XKB: Loaded /var/tmp/server-0.xkm, defined=0x7f (dix) initialising device 0 (dix) initialising device 1 (dix) initialising device 2 (dix) initialising device 3 (dix) initialising device 4 Couldn't get uchr or kchr resource
Fatal server error: Could not build a valid keymap.
AbortDDX
Quitting Xquartz... start_x11_server: (ipc/mig) server died font_cache: Done
Change History
comment:2 Changed 5 years ago by jeremyhu@…
- Version set to 2.3.0 (xserver-1.4)
If you nuke the /usr/X11/share/X11/xkb directory (move it somewhere else to back it up), I think that will "fix" the problem... Please try this.
comment:3 Changed 5 years ago by gustavo.michels@…
Unfortunately no, it didn't change anything. See console log:
04/08/08 09:29:01 sudo[3254] gmichels : TTY=ttys000 ; PWD=/usr/X11/share/X11 ; USER=root ; COMMAND=/bin/mv xkb /tmp/ 04/08/08 09:29:05 login[3255] USER_PROCESS: 3255 ttys001 04/08/08 09:29:06 org.x.startx[3266] font_cache: Scanning user font directories to generate X11 font caches 04/08/08 09:29:07 org.x.privileged_startx[3282] font_cache: Scanning user font directories to generate X11 font caches 04/08/08 09:29:07 org.x.startx[3266] font_cache: Updating FC cache 04/08/08 09:29:07 org.x.privileged_startx[3282] font_cache: Updating FC cache 04/08/08 09:29:07 org.x.startx[3266] xauth: creating new authority file /Users/gmichels/.serverauth.3266 04/08/08 09:29:07 org.x.startx[3266] Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11 04/08/08 09:29:07 org.x.startx[3266] Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly 04/08/08 09:29:07 org.x.startx[3266] X11.app: main(): argc=2 04/08/08 09:29:07 org.x.startx[3266] argv[1] = --listenonly 04/08/08 09:29:07 org.x.startx[3266] Waiting for startup parameters via Mach IPC. 04/08/08 09:29:07 org.x.startx[3266] Xquartz: Listening on socket for fd handoff: /var/tmp/tmp.0.ADpqJR 04/08/08 09:29:07 org.x.startx[3266] X11.app: Prepping for fd handoff. 04/08/08 09:29:07 org.x.startx[3266] X11.app: socket created for fd handoff: fd=3 04/08/08 09:29:07 org.x.startx[3266] X11.app: Connection established for fd handoff: fd=3 04/08/08 09:29:07 org.x.startx[3266] X11.app: Thread created for handoff. Returning success to tell sender to push the fd. 04/08/08 09:29:07 org.x.startx[3266] Xquartz: Waiting for fd handoff connection. 04/08/08 09:29:07 org.x.startx[3266] Xquartz: Handoff connection established. Sending message. 04/08/08 09:29:07 org.x.startx[3266] Xquartz: Message sent. Closing. 04/08/08 09:29:07 org.x.startx[3266] Xquartz: end of send debug: 4 3 2 No such file or directory 04/08/08 09:29:07 org.x.startx[3266] Received new DISPLAY fd: 4 04/08/08 09:29:07 org.x.startx[3266] X11.app: do_start_x11_server(): argc=6 04/08/08 09:29:07 org.x.startx[3266] argv[0] = /usr/X11/bin/X 04/08/08 09:29:07 org.x.startx[3266] argv[1] = :0 04/08/08 09:29:07 org.x.startx[3266] argv[2] = -nolisten 04/08/08 09:29:07 org.x.startx[3266] argv[3] = tcp 04/08/08 09:29:07 org.x.startx[3266] argv[4] = -auth 04/08/08 09:29:07 org.x.startx[3266] argv[5] = /Users/gmichels/.serverauth.3266 04/08/08 09:29:07 org.x.startx[3266] DarwinListenOnOpenFD: 4 04/08/08 09:29:07 org.x.startx[3266] InitConnectionLimits: MaxClients = 255 04/08/08 09:29:07 org.x.startx[3266] Xquartz starting: 04/08/08 09:29:07 org.x.startx[3266] X.Org X Server 1.4.2-apple5 04/08/08 09:29:07 org.x.startx[3266] Build Date: 20080715 04/08/08 09:29:07 org.x.startx[3266] Launchd socket fd: 4 04/08/08 09:29:07 org.x.startx[3266] Sync Extension 3.0 04/08/08 09:29:08 org.x.startx[3266] (EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base 04/08/08 09:29:08 org.x.startx[3266] (dix) initialising device 0 04/08/08 09:29:08 org.x.startx[3266] (dix) initialising device 1 04/08/08 09:29:08 org.x.startx[3266] (dix) initialising device 2 04/08/08 09:29:08 org.x.startx[3266] (dix) initialising device 3 04/08/08 09:29:08 org.x.startx[3266] (dix) initialising device 4 04/08/08 09:29:08 org.x.startx[3266] Couldn't get uchr or kchr resource 04/08/08 09:29:08 org.x.startx[3266] Fatal server error: 04/08/08 09:29:08 org.x.startx[3266] Could not build a valid keymap. 04/08/08 09:29:08 org.x.startx[3266] AbortDDX 04/08/08 09:29:08 org.x.startx[3266] Quitting Xquartz... 04/08/08 09:29:08 org.x.startx[3266] start_x11_server: (ipc/mig) server died 04/08/08 09:29:09 org.x.privileged_startx[3282] font_cache: Done 04/08/08 09:29:09 org.x.startx[3266] font_cache: Done 04/08/08 09:29:13 org.x.startx[3266] giving up. 04/08/08 09:29:13 org.x.startx[3266] xinit: Operation timed out (errno 60): unable to connect to X server 04/08/08 09:29:13 org.x.startx[3266] xinit: No such process (errno 3): Server error. 04/08/08 09:29:13 com.apple.launchd[1112] (org.x.startx) Throttling respawn: Will start in 4 seconds
And then it keeps repeating this on and on until I logout.
comment:4 Changed 5 years ago by jeremyhu@…
- Status changed from new to assigned
So here's the core part of that log:
04/08/08 09:29:08 org.x.startx[3266] Couldn't get uchr or kchr resource 04/08/08 09:29:08 org.x.startx[3266] Fatal server error: 04/08/08 09:29:08 org.x.startx[3266] Could not build a valid keymap. 04/08/08 09:29:08 org.x.startx[3266] AbortDDX
This fatal error occurs in quartzKeyboard.c:
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
keyboard_type = LMGetKbdType ();
if (currentKeyLayoutRef) {
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
}
if (chr_data == NULL) {
ErrorF ( "Couldn't get uchr or kchr resource\n");
return FALSE;
}
I recently removed a fallback that was probably still triggering for your setup, but that fallback was using deprecated code slated for removal (and the functionality replaced by this code path).
I wonder if the keyboard data from http://www.brockerhoff.net/usi is causing a problem here.
Are you seeing this issue with any apple-provided keyboard layouts?
comment:5 Changed 5 years ago by gustavo.michels@…
No, using default keyboard layouts everything' s fine. I guess I should contact the USI keyboard layout developer and ask him for a fix.
Thanks for your help.
comment:6 Changed 5 years ago by jeremyhu@…
I wouldn't punt to him just yet. Users have been reporting this with the GB layout as well (which is Apple supplied)...
comment:7 Changed 5 years ago by gustavo.michels@…
Ok then, I'll wait until things are clearer on this issue.
comment:8 Changed 5 years ago by jeremyhu@…
Please try out 2.3.1_beta1 and report back. Does it work for you? Please copy the relevant debug sections from your system log (EVEN IF IT'S WORKING). See this post for more information:
http://lists.macosforge.org/pipermail/xquartz-dev/2008-August/000911.html
comment:9 Changed 5 years ago by gustavo.michels@…
Yes, it's working now. Here's the relevant log part:
10/08/08 19:24:18 org.x.startx[3186] X11.app: Error detected in determining keyboard layout. Please report this error at http://xquartz.macosforge.org 10/08/08 19:24:18 org.x.startx[3186] X11.app: Debug Info: currentKeyLayoutRef=0x567420, chr_data=0x0 10/08/08 19:24:18 org.x.startx[3186] X11.app: Debug Info: kKLuchrData fallback failed, trying kKLKCHRData. 10/08/08 19:24:18 org.x.startx[3186] X11.app: Fallback succeeded, but this is still a bug. Please report the above information.
You are probably aware, but the value in currentKeyLayoutRef changes each time I start a new server instance.
comment:10 Changed 5 years ago by jeremyhu@…
- Status changed from assigned to closed
- Resolution set to fixed
Ok, so this is slightly a bug in your keyboard layout. I'll leave the workaround in place for now, but you should report this information to the keyboard layout provider:
""" Any KCHR can be converted to an XML-style keyboard layout using the tools here:
http://developer.apple.com/textfonts/download/
The tool isn't listed on the download page, but it's included in the install. It's called klkchrtoxml.
We strongly recommend that people using third-party keyboard layouts that are not already in XML format convert them. """

Same thing here, just adding me to the cc list.