[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#287566: KAccel handling causes mass konqueror segfaults on russian systems



> * Nikita V. Youshchenko [Tue, 28 Dec 2004 23:52:01 +0300]:
> > Please, if at all possible, apply at least the workaround described in
> > that message to libkdecore/kaccell.cpp before accepting KDE 3.3
> > packages into sarge.
> > Without it, russian KDE users will have sarge with hardly usable
> > konqueror.
>
>   if the bug is confirmed ...

Well, here is how to reproduce.

0. Ensure that Xserver is configured to support english/russian keyboard.
We use followinf lines in /etc/X11/XF86Config-4:
...
Option "XkbLayout"  "us,ru"
Option "XkbOptions" "grp:menu_toggle,grp_led:scroll"
...

1. Start konqueror
2. Open http://ya.ru/
3. Create a new tab (e.g. from menu)
4. Open http://ya.ru/ in the second tab
5. Switch keyboard to russian more (in the above config - by pressing 
"Menu" key)
6. Press Ctrl+W

And it crashes.
The http://ya.ru/ is not the only site that causes the crash; many do. We 
used this one while debugging because with it, crash was 100% 
reproducable.

>   if the bug is confirmed, I suggest that this fix gets included in the
>   next kdelibs upload to unstable and meant for sarge (3.3.1-5,
>   including the fix for the ftp injection bug).

I'm duplicating suggested workaround here:

diff -urN kdelibs-3.3.1-4/kdecore/kaccel.cpp 
kdelibs-3.3.1/kdecore/kaccel.cpp
--- kdelibs-3.3.1-4/kdecore/kaccel.cpp  2004-05-27 12:43:47.000000000 +0400
+++ kdelibs-3.3.1/kdecore/kaccel.cpp    2004-12-28 23:55:09.000000000 +0300
@@ -94,7 +94,10 @@
                return false;

        if( pEvent->type == XKeyPress ) {
+               unsigned int tmp = pEvent->xkey.state;
+               pEvent->xkey.state &= ~0x2000;
                KKeyNative keyNative( pEvent );
+               pEvent->xkey.state = tmp;
                KKey key( keyNative );
                key.simplify();
                int keyCodeQt = key.keyCodeQt();

I don't think it's a real fix, it's just a workaround that forces kaccell 
code to assume english keyboard layout while searching for accelerator. 
However, this looks harmless (because accelerators should be independent 
of current keyboard layout, and nothing other that accelerator search is 
affected), and this really stops that crashes.




Reply to: