(*** This bug was imported into bugs.kde.org ***) Package: kwin Version: 4.0 (KDE 3.0.6 (using KDE 3.0.6 ) Severity: crash Installed from: compiled sources Compiler: gcc version 3.1 OS: SunOS (sun4u) release 5.7 OS/Compiler notes: The short description says it all. When I press ^B (Ctrl-B) a couple of times kwin crashes. Since I use vi (and emacs-mode in ksh also) I tend to use ^B a lot. It doesn't matter what app I am using. Pressing ^B in konsole/rxvt/konqueror/anywhere makes kwin crash :-( Here's the stacktrace -- [Switching to Thread 1 (LWP 1)] 0xfe39a02c in _waitid () from /usr/lib/libc.so.1 #0 0xfe39a02c in _waitid () from /usr/lib/libc.so.1 #1 0xfe358138 in _waitpid () from /usr/lib/libc.so.1 #2 0xfe2dafe0 in waitpid () from /usr/lib/libthread.so.1 #3 0xfe2d92d8 in __libthread_segvhdlr () from /usr/lib/libthread.so.1 #4 0xfe2dbd80 in __sighndlr () from /usr/lib/libthread.so.1 #5 <signal handler called> #6 0xfe336f54 in strlen () from /usr/lib/libc.so.1 #7 0xfecfee5c in _XTextListToTextProperty () from /usr/openwin/lib/libX11.so.4 #8 0xfecff030 in _XmbTextListToTextProperty () from /usr/openwin/lib/libX11.so.4 #9 0xfe5aa244 in _ZN10QClipboard5eventEP6QEvent () from /usr/local/qt/lib/libqt-mt.so.3 #10 0xfe5faa4c in _ZN12QApplication14internalNotifyEP7QObjectP6QEvent () from /usr/local/qt/lib/libqt-mt.so.3 #11 0xfe5fa348 in _ZN12QApplication6notifyEP7QObjectP6QEvent () from /usr/local/qt/lib/libqt-mt.so.3 #12 0xfeee88a0 in _ZN12KApplication6notifyEP7QObjectP6QEvent () from /usr/local/KDE/lib/libkdecore.so.4 #13 0xfe59f25c in _ZN12QApplication15x11ProcessEventEP7_XEvent () from /usr/local/qt/lib/libqt-mt.so.3 #14 0xfe59e568 in _ZN12QApplication16processNextEventEb () from /usr/local/qt/lib/libqt-mt.so.3 #15 0xfe5fc350 in _ZN12QApplication10enter_loopEv () from /usr/local/qt/lib/libqt-mt.so.3 #16 0xfe59df04 in _ZN12QApplication4execEv () from /usr/local/qt/lib/libqt-mt.so.3 #17 0xff37920c in kdemain () from /usr/local/KDE/lib/kwin.so What is going on here? Who is listening to ^B? Thanks Devendra (Submitted via bugs.kde.org) (Called from KBugReport dialog)
I would think your X is buggy. do you get any output from kwin?
Waiting for an answer.
Sorry about the non-response. I thought this could be a Qt/X bug (like Stephen suggested before). So I built the new 3.1RC3 (with qt-copy,/KDE 3.1 RC3 from cvs, and gcc-3.1 on Solaris 7). Now, kwin doesn't crash anymore. However, any ^B I press silently disappears! The vi in xterm never gets to see them "^B"s!! And no, I do not see any output for kwin at all :-( Thanks, Devendra
Hi, This is no longer a crash, just a minor irritation (that all ^B are eaten up). I did more investigation over the last few days, here is what is happening: kdecore (KAccel): Key: Ctrl+B => 'Desktop Screenshot' Where does 'Desktop Screenshot' get the Ctrl+B accelerator? (And why, of all the apps, is kwin taking a screenshot)? More stack traces using pstack during startup of the app resulted in this output: kdecore (KAccel): grabKey( key: 'Ctrl+B', bGrab: 1 ): keyCodeX: 6f keyModX: 4 8228:
Simply go to the KControl shortcuts module and check what key is configured for the 'Desktop Screenshot'. If it's configured to use the default key, try if it works after you change it to something different. The default for the action is Alt+PrintScreen, which IIRC Sun keyboards don't have, so maybe it gets the keyboard combination wrong.
Subject: Re: kwin crashes when ^B is pressed a couple of times On 28 Nov 2002 11:37:27 -0000 Lubos Lunak <l.lunak@kde.org> wrote: > > ------- Additional Comments From l.lunak@kde.org 2002-11-28 12:37 > ------- Simply go to the KControl shortcuts module and check what key > is configured for the 'Desktop Screenshot'. If it's configured to use > the default key, try if it works after you change it to something > different. The default for the action is Alt+PrintScreen, which IIRC > Sun keyboards don't have, so maybe it gets the keyboard combination > wrong. Wow! I did see Ctrl+Print for Screenshot. But the Sun keybaord I have DOES have a PrintScreen key, hence I never suspected foul play. But you were right, I explicitly assigned Ctrl+PrintScreen (which BTW is Ctrl+F22) and things work like a charm. Is it Qt that does not understand the PrintScreen key? Should I report this problem to Trolltech (this stuff worked Qt < 3.1, it only broke starting with Qt 3.1 Betas) ... Thanks a lot! Devendra
There was a similar problem a couple months ago where X was returning keycodes for unassigned keys on some systems (!), but unfortunately I didn't think to report the bug to XFree at the time, and instead just wrote a work-around into kdelibs. I'll try to track it down again...
I have also seen the same type of crash in _XmbTextListToTextProperty. I have a fix which I made in qt-3.0.5 but it hasn't yet made it into qt 3.1 or 3.0.6. The fix is as follows: in file qt-x11-free-3.0.5/src/kernel/qclipboard_x11.cpp 771c771,777 < char *list[] = { data.data() }; --- > if (data.resize(data.size()+1)) > *data.end() = 0; > char *list[] = { data.data(), ""}; > if (0 == list) { > qDebug("qclipboard_x11.cpp: encoded text/plain data is NULL"); > break; > } I have seen this problem elsewhere in KDE with many random crashes. The above fix solves the problem. I believe the problem is specific to Solaris and does not affect XFree86. The documentation on XmbTextListToTextProperty is somewhat ambiguous with how the list data should be formatted. Note that the main fix is appending a second NULL character to the first string. The second empty string is not really needed. Hopefully this will be fixed in qt 3.1.1. -Aaron
Subject: Re: kwin crashes when ^B is pressed a couple of times On 4 Dec 2002 01:20:57 -0000 aaronw@net.com wrote: > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=45312 > > > > > ------- Additional Comments From aaronw@net.com 2002-12-04 02:20 > ------- I have also seen the same type of crash in > _XmbTextListToTextProperty. I have a fix which I made in qt-3.0.5 but > it hasn't yet made it into qt 3.1 or 3.0.6. The fix is as follows: > > in file qt-x11-free-3.0.5/src/kernel/qclipboard_x11.cpp Well, I did this to fix the problem: if ( (list[0] != NULL) && ( XmbTextListToTextProperty( dpy, list, 1, style, &textprop ) == Success ) ) { Note that, the third argument already specifies how many elements are going to be in the list. So, appending another element to data might not be required. Besides, what use is a property that has no text in it? But what do I know :-) Thanks, Devendra
*** Bug 54174 has been marked as a duplicate of this bug. ***
*** Bug 54046 has been marked as a duplicate of this bug. ***
I too found this problem running on a Sun running Solaris 7. The workaround is as stated above. Change the keybindings for window and desktop screencapture to use something other than the default. For some reason Ctrl+Print maps to Ctrl+B.
Could one of you with a Sun keyboard run 'xev' and tell me what symbol name you get for Sun's PrintScreen key? I'll add a hack to make sure that if Print returns Ctrl+B, to return Sun's PrintScreen key.
Solaris does not appear to contain the 'xev' program. On my Ultrasparc, though, PrintScreen maps to F22.
Is there a define that I can use to know if we're on solaris? I've taken a look at the code, and it would require a very inconvenient work-around for what I think is an X problem if I have to determine the problem dynamically. With a define the problem could be worked around with just 7 lines of simple code...
Subject: Re: kwin eats Ctrl-B In Solaris (at least on Sparc), sun is defined. Using #ifdef sun #endif works fine. -Aaron
Created attachment 1327 [details] Patch for Sun's F22/Print key Please try this out. It's a patch to kdelibs/kdecore/kkeyserver_x11.cpp -- an initial attempt to make the Print key work on Solaris instead of being converted to Ctrl+B.
Comment on attachment 1327 [details] Patch for Sun's F22/Print key Woops -- wrong patch
Created attachment 1328 [details] The right patch file this time... Please try this one instead -- the last one was the wrong file
I committed the patch to HEAD, so someone who is running head please let me know if it works.
misty on IRC confirms that it works. thanks Ellis =)))