Re: XWin.exe crashes
Sven Köhler wrote: executing XWin export DISPLAY=:0.0 setxkbmap de crashes XWin.exe with a segmentation fault. i also get a core dump please check if /tmp is mounted in binmode i hope it can be reproduced on your systems. xkb is working perfectly for me bye ago NP: grauzone.02-10-07 -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: XWin.exe crashes
executing XWin export DISPLAY=:0.0 setxkbmap de crashes XWin.exe with a segmentation fault. i also get a core dump please check if /tmp is mounted in binmode good hint, now it works why? what's the problem using text-mounts with XWin?
Re: XWin.exe crashes
Sven Köhler wrote: good hint, now it works why? what's the problem using text-mounts with XWin? either xkbcomp or XWin opens the file in the wrong mode (they do not specify if the data is binary or text) so it get's opened in the mode which was specified with mount. I've just fixed the line in XWin but have not tested if it fails too. But I guess it's xkbcomp which is the problem. bye ago NP: grauzone.02-10-14 -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: XWin.exe crashes
Alexander Gottwald wrote: Sven Köhler wrote: good hint, now it works why? what's the problem using text-mounts with XWin? either xkbcomp or XWin opens the file in the wrong mode (they do not specify if the data is binary or text) so it get's opened in the mode which was specified with mount. I've just fixed the line in XWin but have not tested if it fails too. But I guess it's xkbcomp which is the problem. xkbcomp was not aware of binary or text files. I've changed it and xkbcomp now produces files with same length for binary and text mounts. Attached is a patch for this. It also patches the Xserver to open the files in binmode. A test binary is available: http://www-user.tu-chemnitz.de/~goal/xfree/xkbcomp.exe.bz2 replace the one in /usr/X11R6/bin und /usr/X11R6/lib/X11/xkb or /etc/X11/xkb If it still fails, please test the patched XWin.exe too http://www-user.tu-chemnitz.de/~goal/xfree/XWin-binmode.exe.bz2 bye ago NP: Blutengel - Schmerz 2 - Lust -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723 Index: programs/Xserver/xkb/ddxLoad.c === RCS file: /cvs/xc/programs/Xserver/xkb/ddxLoad.c,v retrieving revision 3.30 diff -u -r3.30 ddxLoad.c --- programs/Xserver/xkb/ddxLoad.c 2002/05/31 18:46:06 3.30 +++ programs/Xserver/xkb/ddxLoad.c 2002/11/03 12:29:17 @@ -413,7 +413,7 @@ else if (strlen(xkm_output_dir)+strlen(mapName)+5 = PATH_MAX) sprintf(buf,%s%s.xkm,xkm_output_dir,mapName); if (buf[0] != '\0') - file= fopen(buf,r); + file= fopen(buf,rb); else file= NULL; } else file= NULL; Index: programs/xkbcomp/xkbcomp.c === RCS file: /cvs/xc/programs/xkbcomp/xkbcomp.c,v retrieving revision 3.17 diff -u -r3.17 xkbcomp.c --- programs/xkbcomp/xkbcomp.c 2002/06/05 00:00:37 3.17 +++ programs/xkbcomp/xkbcomp.c 2002/11/03 14:57:04 @@ -873,16 +873,30 @@ * -- Branden Robinson */ int outputFileFd; +int binMode = 0; +const char *openMode = w; unlink(outputFile); +#ifdef O_BINARY +switch (outputFormat) { +case WANT_XKM_FILE: +binMode = O_BINARY; +openMode = wb; +break; +default: +binMode = 0; +break; +} +#endif outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL, - S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); + S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH|binMode); if (outputFileFd0) { ERROR1(Cannot open \%s\ to write keyboard description\n, outputFile); ACTION(Exiting\n); exit(1); } - out= fdopen(outputFileFd, w); + + out= fdopen(outputFileFd, openMode); /* end BR */ if (out==NULL) { ERROR1(Cannot open \%s\ to write keyboard description\n,
AltGR problems with Windows XP
Hello, I use the X server of Cygwin/XFree86 (XWin) and it is working fine on my Windows 2000 Workstation but running the same version on my Notebook (Windows XP) causes problems with the AltGr handling. I've noticed that pressing the AltGr Key produces a KeyPress-Control_L KeyPress-Mode_switch KeyRelease-Control_L KeyRelease-Mode_switch event sequence (see xev output at the end of this mail). I began to trace the code (winkeybd.c, function winIsFakeCtrl_L) and found out that on my XP notebook the windows messages VK_CONTROL (the faked Control_L) and VK_MENU don't have the same timestamp and it is not always possible to get the following VK_MENU message by issuing the PeekMessage(). I don't know if this problem is relating to my Notebook (Dell Latitude) or to Windows XP. Are there other people having the same problems? Andreas PS. For now I've implemented a workarround. I'm using a translation of the incomming windows messages, which recognizes the fake Control_L messages and filters them out. Changes were made on following sources: win.h, winkeybd.c, winwndproc.c The modified sources can be obtained from mee if desired: This works fine for me... The algorithm is desccribed below as a deterministic finite automata (DFA) input \ state | 0 (start) | 1| 2 | 3 KeyPressed-CtrlL (PCL) | 1 - | 1 - | 2 PCL | 1 - KeyReleased-CtrlL (RCL) | 0 RCL | 0 PCL,RCL | 3 - | 0 RCL KeyPressed-AltR (PAR) | 0 PAR | 2 PAR | 2 PAR | 0 PAR KeyReleased-AltR (RAR) | 0 RAR | 0 PCL,RAR | 1 RAR | 0 RAR any other key (*) | 0 * | 0 PCL,* | 2 * | 0 * States: 0 (start),1,2,3 input and output alphabet: KeyPressed-CtrlL (PCL), KeyReleased-CtrlL (RCL), KeyPressed-AltR (PAR), KeyReleased-AltR (RAR), no key (-), any other key(*) the table shows the transitions: new-state output e.g. assume you are in state 1 and you receive a KeyReleased-CtrlL message then the new state of the DFA would be 0 and the events for KeyPressed-CtrlL and KeyReleased-CtrlL are sent to the XWin X-Server. Implementation: = void winProcessKeyEvent (DWORD dwVirtualKey, DWORD dwKeyData) { static int iState = 0; /* initial State of DFA */ static int iCtrlCode = 0; /* initialized when first pressed... */ Bool fDown= ((dwKeyData 0x8000) == 0); Bool fExt = ((HIWORD(dwKeyData) KF_EXTENDED) != 0); intiPreKeyCode = XK_VoidSymbol; Bool fCtrlUp, fCtrlDown, fMenuUp, fMenuDown; intiKeyCode, i; winTranslateKey (dwVirtualKey, dwKeyData, iKeyCode); /* * determine the input for the DFA * (we use boolean indicators instead of an real alphabet) */ fCtrlUp = fCtrlDown = fMenuUp = fMenuDown = FALSE; if (dwVirtualKey == VK_CONTROL) { iCtrlCode = iKeyCode; /* save the scan code for VK_CONTROL */ if (fDown) fCtrlDown=TRUE; else fCtrlUp =TRUE; } else if (dwVirtualKey == VK_MENU fExt) { if (fDown) fMenuDown=TRUE; else fMenuUp =TRUE; } #if CYGDEBUG ErrorF(winProcessKeyEvent: 0x%0x, 0x%0x\n,dwVirtualKey,dwKeyData); ErrorF(State=%d Input=0x%0x (%s) ,iState,dwVirtualKey,(fDown?DOWN:UP)); #endif switch (iState) { default: case 0 : if (fCtrlDown) { iState=1; iKeyCode=XK_VoidSymbol; } else { iState=0; } break; case 1 : if (fCtrlDown) { iState=1; } else if (fMenuDown) { iState=2; } else { iState=0; iPreKeyCode=iCtrlCode; } break; case 2 : if (fCtrlUp){ iState=3; } else if (fMenuUp){ iState=1; } else { iState=2; } break; case 3 : if (fCtrlDown) { iState=1; iKeyCode=XK_VoidSymbol; } else{ iState=0; } break; } #if CYGDEBUG ErrorF( - State=%d, iState); if (iPreKeyCode != XK_VoidSymbol) ErrorF( 0x%0x [0x0],,iPreKeyCode); ErrorF( 0x%0x [0x%0x]\n,iKeyCode,dwKeyData); #endif if (iPreKeyCode != XK_VoidSymbol) winSendKeyEvent(iPreKeyCode,TRUE); if (iKeyCode!= XK_VoidSymbol) for (i = 0; i LOWORD(dwKeyData); ++i) winSendKeyEvent(iKeyCode, (dwKeyData 0x8000)==0); } Output of xev with the original XWin: = KeyPress event, serial 22, synthetic NO, window 0xa1, root 0x36, subw 0xa2, time 249118172, (38,43), root:(591,66), state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 characters: KeyPress event, serial 22, synthetic NO, window 0xa1, root 0x36, subw 0xa2, time 249118172, (38,43), root:(591,66), state 0x4, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
Re: XWin.exe crashes
On Sun, Nov 03, 2002 at 04:10:28PM +0100, Alexander Gottwald wrote: Alexander Gottwald wrote: Sven K?hler wrote: good hint, now it works why? what's the problem using text-mounts with XWin? either xkbcomp or XWin opens the file in the wrong mode (they do not specify if the data is binary or text) so it get's opened in the mode which was specified with mount. I've just fixed the line in XWin but have not tested if it fails too. But I guess it's xkbcomp which is the problem. xkbcomp was not aware of binary or text files. I've changed it and xkbcomp now produces files with same length for binary and text mounts. Attached is a patch for this. It also patches the Xserver to open the files in binmode. A test binary is available: http://www-user.tu-chemnitz.de/~goal/xfree/xkbcomp.exe.bz2 replace the one in /usr/X11R6/bin und /usr/X11R6/lib/X11/xkb or /etc/X11/xkb Maybe everything in Cygwin/XFree86 should be linked with /usr/lib/binmode.o? cgf
Re: XWin.exe crashes
I just installed KDE-cygwin, and I haven't gotten it start properly. Based on the errors I'm getting and the FAQs I've read, the suggestion was to make sure the paths are mounted in binmode, which involves changing a registry key. Since I'd prefer not to do that, will this patch work for me as well? I am running Cygwin 1.3.13-2, XFree86 4.2.0-2, and KDE 2.2.2-b1 on Win 98. I realize I am not being very specific about the problem, I am not looking for a personalized solution (yet!) I just want to know if this solution might apply to KDE as well. Any other advice is appreciated as well. Thanks, -Lisi At 04:10 PM 11/3/02 +0100, Alexander Gottwald wrote: Alexander Gottwald wrote: Sven Köhler wrote: good hint, now it works why? what's the problem using text-mounts with XWin? either xkbcomp or XWin opens the file in the wrong mode (they do not specify if the data is binary or text) so it get's opened in the mode which was specified with mount. I've just fixed the line in XWin but have not tested if it fails too. But I guess it's xkbcomp which is the problem. xkbcomp was not aware of binary or text files. I've changed it and xkbcomp now produces files with same length for binary and text mounts. Attached is a patch for this. It also patches the Xserver to open the files in binmode. A test binary is available: http://www-user.tu-chemnitz.de/~goal/xfree/xkbcomp.exe.bz2 replace the one in /usr/X11R6/bin und /usr/X11R6/lib/X11/xkb or /etc/X11/xkb If it still fails, please test the patched XWin.exe too http://www-user.tu-chemnitz.de/~goal/xfree/XWin-binmode.exe.bz2 bye ago NP: Blutengel - Schmerz 2 - Lust -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: XWin.exe crashes
I just installed KDE-cygwin, and I haven't gotten it start properly. Based on the errors I'm getting and the FAQs I've read, the suggestion was to make sure the paths are mounted in binmode, which involves changing a registry key. Since I'd prefer not to do that, will this patch work for me as well? you can use setup.exe to change back from textmode to binmode, but the problem is, that most of the programs won't be abled to read the text-files they've writte in textmode. Christopher Faylor always suggests linking with binmode.o - and i would recomm that too, for the KDE-cygwin project. i don't know, why they don't do it - perhaps because binmode.o is too unknown yet. but to request, that the user runs cygwin in binmode is not always possible, because migrating back from text- to binmode takes much time (you have to convert every text-file)
Re: XWin.exe crashes
Christopher Faylor wrote: Maybe everything in Cygwin/XFree86 should be linked with /usr/lib/binmode.o? What about compilers (as xkbcomp) they read a textfile and write a binary file. What happens if input is textfile on text-mount (with CRLF) and the program does not check for \r as possible line ending. IMHO the better way is to fix the programs to use fopen(..,rb) and O_BINARY. bye ago NP: Blutengel - Weg zu mir -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: XWin.exe crashes
Lisi wrote: I just installed KDE-cygwin, and I haven't gotten it start properly. Based on the errors I'm getting and the FAQs I've read, the suggestion was to make sure the paths are mounted in binmode, which involves changing a registry key. Since I'd prefer not to do that, will this patch work for me as well? the binmode answers in the FAQ do refer to the fonts. The patch does not change anything in the fontreading code. So this patch will most likely not solve your problem. bye ago NP: Blutengel - My time -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: XWin.exe crashes
On Sun, Nov 03, 2002 at 11:00:09PM +0100, Alexander Gottwald wrote: Christopher Faylor wrote: Maybe everything in Cygwin/XFree86 should be linked with /usr/lib/binmode.o? What about compilers (as xkbcomp) they read a textfile and write a binary file. What happens if input is textfile on text-mount (with CRLF) and the program does not check for \r as possible line ending. /usr/lib/automode.o cgf
Re: XWin.exe crashes
Yup, automode.o is what XWin.exe has been linking with for quite some time now. This fixed all the problems with the fonts directory not being mounted in binmode. It would be a pain to change all X binaries to link automode.o, but we can easily change the few binaries that are known to have problems, like xkbcomp. Harold Christopher Faylor wrote: On Sun, Nov 03, 2002 at 11:00:09PM +0100, Alexander Gottwald wrote: Christopher Faylor wrote: Maybe everything in Cygwin/XFree86 should be linked with /usr/lib/binmode.o? What about compilers (as xkbcomp) they read a textfile and write a binary file. What happens if input is textfile on text-mount (with CRLF) and the program does not check for \r as possible line ending. /usr/lib/automode.o cgf
Re: XWin.exe crashes
On Sun, Nov 03, 2002 at 10:58:16PM -0500, Harold L Hunt II wrote: Yup, automode.o is what XWin.exe has been linking with for quite some time now. This fixed all the problems with the fonts directory not being mounted in binmode. It would be a pain to change all X binaries to link automode.o, but we can easily change the few binaries that are known to have problems, like xkbcomp. It didn't sound like the xkbcomp problem would be solved by linking with automode.o. Since that was reading a binary file, it would need to be linked with binmode.o. cgf -- Please do not send me personal email with cygwin questions or observations. Use the resources at http://cygwin.com/ .