Bug 117677

Summary: crash while switching show desktop state
Product: [Plasma] kwin Reporter: Luboš Doležel <dolezel.lubos>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: aaltoset, anupam.srivastava, chw, clcevboxvjeo, cypress, elijahlofgren, explinux, grimhen, jtate+kde, lecit, Marcin.Kasperski, neksa, pau.capdevila, tuliouel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: KWin crash backtrace
Another backtrace
Two backtraces of similar crashes
gdb bt of the alt-tab crash
testcase which causes crash in kwin
another backtrace

Description Luboš Doležel 2005-12-04 22:16:59 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages
Compiler:          GCC 3.4.4 
OS:                Linux

Since I have installed KDE 3.5, KWin is VERY unstable.

Some window operations like minimizing and maximizing windows, opening new windows etc. often make KWin crash. But not always.
There is a high crash probability when I want to start Konqueror.

I have re-emerged KWin and other related libs with debug information and I have some backtrace of the crash.
Comment 1 Luboš Doležel 2005-12-04 22:18:49 UTC
Created attachment 13771 [details]
KWin crash backtrace

Output from GDB...
Comment 2 Luboš Doležel 2005-12-04 22:23:51 UTC
Created attachment 13772 [details]
Another backtrace

Just annother backtrace
Comment 3 Thiago Macieira 2005-12-04 23:12:03 UTC
Pasting the backtrace that looked better:

#0  0xb7f7728b in QValueList<KWinInternal::Client*>::begin (this=0x180000a) at qvaluelist.h:475
#1  0xb7f6017d in KWinInternal::Workspace::updateMinimizedOfTransients (this=0x81ed460, c=0x83286f8) at group.cpp:202
#2  0xb7f602c0 in KWinInternal::Client::unminimize (this=0x83286f8, avoid_animation=true) at client.cpp:597
#3  0xb7f6042d in KWinInternal::Workspace::resetShowingDesktop (this=0x81ed460, keep_hidden=128) at workspace.cpp:2565
#4  0xb7f6ac5b in KWinInternal::Client::manage (this=0x825bc28, w=4194311, isMapped=false) at manage.cpp:449
#5  0xb7f6f490 in KWinInternal::Workspace::createClient (this=0x81ed460, w=25165834, is_mapped=false) at workspace.cpp:477
#6  0xb7f6fcb1 in KWinInternal::Workspace::workspaceEvent (this=0x81ed460, e=0xbfd87c30) at events.cpp:360
#7  0xb7f6fdd3 in KWinInternal::Application::x11EventFilter (this=0x180000a, e=0xbfd87c30) at main.cpp:154
#8  0xb7774459 in qt_x11EventFilter (ev=0xbfd87c30) at qapplication_x11.cpp:386
#9  0xb778012f in QApplication::x11ProcessEvent (this=0xbfd87d80, event=0xbfd87c30) at qapplication_x11.cpp:3308
#10 0xb779e7b6 in QEventLoop::processEvents (this=0x81dffe0, flags=4) at qeventloop_x11.cpp:192
#11 0xb781ba0f in QEventLoop::enterLoop (this=0x81dffe0) at qeventloop.cpp:198
#12 0xb781b92a in QEventLoop::exec (this=0x81dffe0) at qeventloop.cpp:145
#13 0xb7803c9d in QApplication::exec (this=0xbfd87d80) at qapplication.cpp:2758
#14 0xb7f71621 in kdemain (argc=3, argv=0xbfd87fd4) at main.cpp:282
#15 0x080486c2 in main (argc=25165834, argv=0x180000a) at kwin.la.cpp:2
Comment 4 Thiago Macieira 2005-12-04 23:14:04 UTC
*** Bug 117363 has been marked as a duplicate of this bug. ***
Comment 5 Boris Dušek 2005-12-11 17:15:31 UTC
Hi,

I experience the same problems with 3.5.0, Gentoo, I have debug information compiled in all of KDE - Luboš, please how did you get the backtrace? I am too able to start kwin in terminal after it crashed, but I once did start kwin in debug mode - "gdb kwin" - "start" - "continue" and it went well, but at the end it crashed and nothing responded; even <CTRL>+<ALT>+<BACKSPACE>, although the clock in kicker (I have it animated) was running and blinking as usual; I just saw this information from gdb in terminal, but was unable to do backtrace:

Program received signal SIGSEGV, Segmentation fault
0xb7f8fc9c in KWinInternal::Client::findModel (this=0x81c2ef8) at qvaluelist.h:180

That's all, I think that with gdb it's kind of a chicken-egg problem - I have to work with gdb in konsole but can't give the konsole focus (or even type with keyboard) since kwin is frozen by gdb at the moment of crash. I really wonder how to get a backtrace. (Would Dr. Konqi help? I don't have it.)

Without gdb, I could work with windows, when closing by a menu option (File->Quit), next maximized window was shown. I therefore could relaunch kwin in embedded konsole in konqueror ;)
Comment 6 Luboš Doležel 2005-12-11 17:45:15 UTC
It's quite simple:

startx& from console...KDE starts
Switch back to console and attach gdb:

gdb --pid $(pidof kwin) > trace.log

Type c to continue the process.

Switch back to KDE and make KWin crash.
Switch to console and type bt (or bt full), then q and y (quit and (y)es really quit ;-). You won't see what are you typing because everything is redirected to file.

Write me in case there is something unclear (Jabber: LubosD@njs.netlab.cz)
Comment 7 Boris Dušek 2005-12-12 11:26:21 UTC
Hi,

thanks Luboš for the instructions, I made it finally by going to console after kwin crashes and attaching gdb there (gdb 6551 2>&1 | tee gdb.out).

Result of my backtrace is different from yours:

(gdb) backtrace
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb69575e3 in waitpid () from /lib/libpthread.so.0
#2  0xb7706a83 in KCrash::defaultCrashHandler (sig=11) at kcrash.cpp:251
#3  <signal handler called>
#4  0xb64f1c9c in KWinInternal::Client::findModal (this=0x8253628) at qvaluelist.h:180
#5  0xb64f1cbb in KWinInternal::Client::findModal (this=0x8278f88) at qvaluelist.h:186
#6  0xb651d178 in KWinInternal::Workspace::takeActivity (this=0x8184220, c=0x8278f88, flags=1, handled=false)
    at activation.cpp:324
#7  0xb651d3bc in KWinInternal::Workspace::requestFocus (this=0xffeff2f1, c=0xffeff2f1, force=false)
    at activation.cpp:307
#8  0xb651f886 in KWinInternal::Workspace::setShowingDesktop (this=0x8184220, showing=5) at qvaluelist.h:531
#9  0xb651fb68 in KWinInternal::RootInfo::changeShowingDesktop (this=0xffeff2f1, showing=false) at events.cpp:185
#10 0xb7645fee in NETRootInfo::event (this=0x818ad28, event=0xbfc26990, properties=0xbfc264f0, properties_size=1)
    at netwm.cpp:2001
#11 0xb76466b3 in NETRootInfo::event (this=0xffeff2f1, ev=0xffeff2f1) at netwm.cpp:1816
#12 0xb64f19b2 in KWinInternal::Workspace::netCheck (this=0x8184220, e=0xffeff2f1) at events.cpp:504
#13 0xb652f200 in KWinInternal::Workspace::workspaceEvent (this=0x8184220, e=0xbfc26990) at events.cpp:205
#14 0xb652fbee in KWinInternal::Application::x11EventFilter (this=0xffeff2f1, e=0xbfc26990) at workspace.h:79
#15 0xb6d78539 in qt_x11EventFilter (ev=0xbfc26990) at qapplication_x11.cpp:386
#16 0xb6d8420f in QApplication::x11ProcessEvent (this=0xbfc26af0, event=0xbfc26990) at qapplication_x11.cpp:3308
#17 0xb6da2ada in QEventLoop::processEvents (this=0x81476d8, flags=4) at qeventloop_x11.cpp:192
#18 0xb6e1fd33 in QEventLoop::enterLoop (this=0x81476d8) at qeventloop.cpp:198
#19 0xb6e1fc4e in QEventLoop::exec (this=0x81476d8) at qeventloop.cpp:145
#20 0xb6e07fc1 in QApplication::exec (this=0xbfc26af0) at qapplication.cpp:2758
#21 0xb6531680 in kdemain (argc=3, argv=0x812eed8) at main.cpp:282
#22 0xb65427a4 in kdeinitmain (argc=-1051919, argv=0xffeff2f1) at kwin_dummy.cpp:3
#23 0x0804eb0e in launch (argc=3, _name=0x812e1c4 "kwin", args=0x812e20a "", cwd=0x0, envc=0, envs=0x812e20e "",
    reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0xffeff2f1 <Address 0xffeff2f1 out of bounds>)
    at kinit.cpp:637
#24 0x0804f251 in handle_launcher_request (sock=8) at kinit.cpp:1201
#25 0x0804f785 in handle_requests (waitForPid=0) at kinit.cpp:1404
#26 0x0804ffb4 in main (argc=2, argv=0xbfc27534, envp=0xffeff2f1) at kinit.cpp:1848

Hope this helps.
Cheers
Comment 8 Lubos Lunak 2005-12-14 14:55:56 UTC
*** Bug 117111 has been marked as a duplicate of this bug. ***
Comment 9 Lubos Lunak 2005-12-14 14:57:11 UTC
Please try to find out at least somewhat reproducible way to trigger the problem, the backtraces alone are not sufficient for fixing this problem.
Comment 10 Luboš Doležel 2005-12-14 15:07:02 UTC
1) Open several windows and then repeatedly press the Desktop access/Show desktop button until it crashes (it minimizes and then unminimizes all windows).

2) Open several windows, press the Desktop access/Show desktop button and then start some windowed application using some desktop "link" (Konqueror for example). This unminimizes all previously minimized windows and sometimes crashes.
Comment 11 Lubos Lunak 2005-12-14 15:36:21 UTC
No luck here, I guess the "several windows" parts needs to be more specific. This problem very likely depends on exactly which windows are open.
Comment 12 Boris Dušek 2005-12-14 21:21:32 UTC
Hi,

I have finally found a specific way to reproduce this bug:
1. start yakuake
2. make it appear (animated roll-down)
3. show desktop (CTRL+ALT+D) - shows the desktop
4. again show desktop - crashes

If another window(s) is open before step 3 (doesn't matter whether maximized, restored, or minimized), then it is shown after step 4, but without title bar (=kwin has crashed). Note that the backtrace for this bug is the same as the one that I posted, I could not reproduce Luboš Doležel's-like backtrace with the above procedure.
Comment 13 Boris Dušek 2005-12-14 21:25:09 UTC
Just to clarify: it happens also with yakuake as the only window (no other window is neccessary to reproduce the bug)
Comment 14 Pau Capdevila 2005-12-17 04:01:28 UTC
*** This bug has been confirmed by popular vote. ***
Comment 15 Pau Capdevila 2005-12-17 04:03:45 UTC
It also happens in 3.5.0 Debian experimental packages from Alioth.
Comment 16 Pau Capdevila 2005-12-27 03:34:20 UTC
Created attachment 14043 [details]
Two backtraces of similar crashes
Comment 17 Lubos Lunak 2006-01-05 17:26:27 UTC
I cannot reproduce the problem as described in comment #12, with a fresh user account.
Comment 18 Pau Capdevila 2006-02-03 18:04:07 UTC
Needless to say this leaves KDE useless so it shoud be considered GRAVE.

It's really very annoying having to switch to console and type:

DISPLAY=:0.0 kwin&

To restore desktop every once it happens. It reminds me when iexplore crashed on windows but here you must descend to command line to fix it.

cu
Comment 19 Thiago Macieira 2006-02-04 16:33:21 UTC
*** Bug 121331 has been marked as a duplicate of this bug. ***
Comment 20 Martin Steigerwald 2006-02-26 15:09:44 UTC
Hello,

I had some rare KWin crashes when switching desktop to front and opening the trashcan. Then when KWin popped all windows to front again it crashed.

I did not have this recently, so it might be fixed. I will monitor this.

Regards,
Martin Steigerwald
Comment 21 carsten madsen 2006-03-15 09:48:45 UTC
When running a swing application from eclipse I get the kwin dies with the following bt:

[KCrash handler]
#6  0x04c05a29 in KWinInternal::Client::findModal ()
   from /usr/lib/libkdeinit_kwin.so
#7  0x04c05a43 in KWinInternal::Client::findModal ()
   from /usr/lib/libkdeinit_kwin.so
#8  0x04c05a43 in KWinInternal::Client::findModal ()
   from /usr/lib/libkdeinit_kwin.so
#9  0x04c0d4d2 in KWinInternal::Workspace::takeActivity ()
   from /usr/lib/libkdeinit_kwin.so
#10 0x04c0d60c in KWinInternal::Workspace::requestFocus ()
   from /usr/lib/libkdeinit_kwin.so
#11 0x04bffd3d in KWinInternal::Workspace::workspaceEvent ()
   from /usr/lib/libkdeinit_kwin.so
#12 0x04bf347a in KWinInternal::Application::x11EventFilter ()
   from /usr/lib/libkdeinit_kwin.so
#13 0x00fa67f1 in qt_set_x11_event_filter ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#14 0x00fb3384 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#15 0x00fc7a08 in QEventLoop::processEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#16 0x0103622b in QEventLoop::enterLoop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#17 0x01036136 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x0101d4a9 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#19 0x04bf485b in kdemain () from /usr/lib/libkdeinit_kwin.so
#20 0x0028253c in kdeinitmain () from /usr/lib/kde3/kwin.so
#21 0x0804de8f in ?? ()
#22 0x0804e533 in ?? ()
#23 0x0804eabc in ?? ()
#24 0x0804fb83 in ?? ()
#25 0x009a2d5f in __libc_start_main () from /lib/libc.so.6
#26 0x0804b851 in ?? ()
Comment 22 Luboš Doležel 2006-03-17 12:38:24 UTC
I can't reproduce it any more on kwin-3.5.1-r1. Probably fixed?
Comment 23 carsten madsen 2006-03-17 14:13:25 UTC
I'm a voter.

 When developing with eclipse/swing under KDE it is rather annying 
having to restart KDE several times per day.

/carsten

Luboš Doležel wrote:

[bugs.kde.org quoted mail]
Comment 24 Luboš Doležel 2006-03-17 19:18:10 UTC
Umm, you're right... I've got a crash a few moments ago :-(

Can we expect a fix or are we all supposed to switch to another desktop environment?
Comment 25 Lubos Lunak 2006-03-20 13:41:55 UTC
No, you're supposed to read comment #9 and do what it says instead of adding even more of useless complaints.
Comment 26 mgjoka 2006-03-20 14:28:54 UTC
I have also voted for this bug.

For me what is described in comment 12 is the only way to reproduce this bug every time.

I currently have kwin-3.5.1-r1 installed 

Let me repeat the procedure. :
1. Open different programs (windows)
2. Pressing "Show Desktop" (CTRL+ALT+D) multiple times (like 20 times) has the intended effect. no problems till now. no crashes. (all windows minimized or previous function --show desktop-- inverted)

On the other hand, if the same sequence of events is executed while yakuake is running and NOT retracted then the bug is reproduced.
1. Run "yakuake"
2. Press F12 button (default shortcut--show yakuake -- access key)
3. Press "CTRL+ALT+D" ("Show desktop") once (1)  
4. Press "CTRL+ALT+D" ("Show desktop") once again ==> kwin crashes.

If between (3) and (4) I do something else (like pressing again F12) then the bug is supressed.
Comment 27 Lubos Lunak 2006-03-22 12:06:12 UTC
As already said, I cannot reproduce that problem. Perhaps the "open different programs" part is too vague.
Comment 28 anupam.srivastava 2006-03-25 14:01:28 UTC
I can also reproduce this bug.

1. Open yakuake by pressing F12
2. Press Ctrl+Alt+D
3. Press Ctrl+Alt+D again.

Kwin crashes.

I am running composite manager and crystal theme on Kwin-3.5.1-r1 on Gentoo.
Comment 29 mgjoka 2006-03-26 03:23:31 UTC
Seeing comment 27 I would like to clarify what I said in comment 26

There are two scenarios:
----------------(A)--------------------
1. Open different programs (windows)
2. Pressing "Show Desktop" (CTRL+ALT+D) multiple times (like 20 times) has the intended effect. no problems till now. no crashes. (all windows minimized or previous function --show desktop-- inverted) 
----------------(end of A)-------------

In (A) I'm trying to reproduce the problem without any success. That means that kwin does NOT CRASH. I added this scenario to show that this feature ("Show desktop") does not always cause a crash. You may as well discard this example.

----------------(B)--------------------
1. Run "yakuake"
2. Press F12 button (default shortcut--show yakuake -- access key)
3. Press "CTRL+ALT+D" ("Show desktop") once (1)  
4. Press "CTRL+ALT+D" ("Show desktop") once again ==> kwin crashes. 
----------------(end of A)-------------

In (B) I managed to reproduce the crash.

Comment 28 confirms that also.

Is there anything I can report on any kind of configuration that might help eliminate the bug?
Comment 30 Cypress Twist 2006-03-28 19:20:00 UTC
I see KDE 3.5.2 is out and this bug hasnt been fixed :( And I was so happy to upgrade to this new version. 
Comment 31 Valentin Plugaru 2006-04-02 13:29:03 UTC
Same problem appeared in Debian a few days ago when KDE 3.5.2 entered SID (unstable).
Comment 32 Joseph Tate 2006-04-19 15:00:19 UTC
I can reproduce one crash (not sure if it's the same), by doing the following simple steps:

1.  Go to a desktop with no windows open.  
2.  Hit Alt-Tab.  Leave Alt depressed.  The "No windows" message is displayed.  
3.  Hit Alt-Tab again.
4.  Boom

This with kde 3.5.2.  As described here: http://lists.debian.org/debian-kde/2006/04/msg00025.html

I will post this back trace in a moment.
Comment 33 Joseph Tate 2006-04-19 15:06:22 UTC
Created attachment 15690 [details]
gdb bt of the alt-tab crash
Comment 34 Tim Riker 2006-04-19 17:33:44 UTC
when "Show window list while switching windows" 
and "Traverse windows on all desktops"

It does NOT traverse windows on all desktops

and using alt-tab twice on an empty desktop causes an immediate crash.

When will this get fixed?
Comment 35 Lubos Lunak 2006-04-19 17:50:16 UTC
Comment #34: In about minus 20 days (bug #124511), and that's completely irrelevant to this bugreport.
Comment 36 Tim Riker 2006-04-19 18:04:55 UTC
ok, thanx!

Still have the "Traverse windows on all desktops" option that does not work anymore.
Comment 37 Cypress Twist 2006-04-19 19:51:38 UTC
Minus 20 days would be greeeeat! If I managed to wait for so long without touching the "Show Desktop" button, I'll live for a few more weeks. BTW: the bug is still around in KDE 3.5.2 [using Kubuntu].
Comment 38 Bob Hopwood 2006-04-26 18:04:20 UTC
I am running Red Hat Fedora 4 2.6.16-1.2096_FC4, 
kwin -version
Qt: 3.3.4
KDE: 3.5.2-0.1.fc4 Red Hat
KWin: 3.0
and I experience regular crashes (SIGSEGV, Segmentation fault) with KWin.  I've tried to gather some useful information, but I am not sure if I have or not...  I attached gdb to KWin and get a message such as:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209083040 (LWP 29506)]
0x0063a9ca in XSetTile () from /usr/X11R6/lib/libX11.so.6

with a back trace (in the GUI crash handler) such as:
[KCrash handler]
#6  0x0805ed46 in QScrollView::metaObject ()
#7  0x0805cac6 in QGList::count ()
#8  0x0805e40a in QGList::count ()
#9  0x0805e9e5 in QGList::count ()
#10 0x05ee50b7 in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#11 0x05ee5cea in QObject::activate_signal_bool ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#12 0x06263b1e in QButton::toggled () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#13 0x05f84876 in QButton::nextState () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#14 0x05f84a23 in QButton::mouseReleaseEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#15 0x0668082a in KToolBarButton::mouseReleaseEvent ()
   from /usr/lib/libkdeui.so.4
#16 0x05f23300 in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#17 0x06680f4d in KToolBarButton::event () from /usr/lib/libkdeui.so.4
#18 0x05e8074d in QApplication::internalNotify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#19 0x05e8167f in QApplication::notify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#20 0x001be8e1 in KApplication::notify () from /usr/lib/libkdecore.so.4
#21 0x05e18098 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#22 0x05e16813 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x05e2a848 in QEventLoop::processEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x05e98dcb in QEventLoop::enterLoop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x05e98cd6 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#26 0x05e80119 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#27 0x08058ff1 in ?? ()
#28 0x004b2d7f in __libc_start_main () from /lib/libc.so.6
#29 0x08057fb1 in ?? ()


Are there debugging settings or setup that I need to perform for more useful backtrace information.  Is there an FAQ/HOW-TO someone can point me to?  I want to help.

My crash scenarios only seem to happen when using IntelliJ Idea 5.1.1 on this version of KDE and primary when performing CVS actions (which happen to open several windoes in succession usually).  When gdb is attached it takes longer for a crash to occur, but without it it happens after a few such operations.

Can someone point me in the right direction.  Thanks in advance. -- Bob
Comment 39 Lubos Lunak 2006-04-26 18:13:19 UTC
Please don't add random unrelated crash reports to this bugreport just because this one has 'KWin crashes' in the summary. File a new bugreport.
Comment 40 Bob Hopwood 2006-04-26 18:33:40 UTC
Lubos, I did not file what I thought was a "random unrelated crash report" just because "KWin crashes" in the summary.  Your assessment in this case was wrong.  Also, I notice you just changed the title of the Bug report from "KWin crashes during some window operations" which is where I thought this report belonged.  I will attempt to added another bug report if you feel this has nothing to do with this bug.  However, any constructive information you have would be appreciated as to how to help with this bug as well.
Comment 41 Lubos Lunak 2006-04-27 19:21:19 UTC
*** Bug 123037 has been marked as a duplicate of this bug. ***
Comment 42 Iñaki Baz Castillo 2006-05-04 20:37:33 UTC
The same in Debian 2.5.2, it crashes a lot and many times of them Kwin crashes when I'm using Yakuake and press Alt+Tab or similar.

This is the backtrace (is the same as other I've read in this bug):



[KCrash handler]
#5  0xb697681d in KWinInternal::Client::findModal ()
   from /usr/lib/libkdeinit_kwin.so
#6  0xb697683d in KWinInternal::Client::findModal ()
   from /usr/lib/libkdeinit_kwin.so
#7  0xb69a7d7d in KWinInternal::Workspace::takeActivity ()
   from /usr/lib/libkdeinit_kwin.so
#8  0xb69a7eca in KWinInternal::Workspace::requestFocus ()
   from /usr/lib/libkdeinit_kwin.so
#9  0xb69a9cdf in KWinInternal::Workspace::setShowingDesktop ()
   from /usr/lib/libkdeinit_kwin.so
#10 0xb69a9ee8 in KWinInternal::RootInfo::changeShowingDesktop ()
   from /usr/lib/libkdeinit_kwin.so
#11 0xb77eb4ff in NETRootInfo::event () from /usr/lib/libkdecore.so.4
#12 0xb77ebaa4 in NETRootInfo::event () from /usr/lib/libkdecore.so.4
#13 0xb6988e72 in KWinInternal::Workspace::netCheck ()
   from /usr/lib/libkdeinit_kwin.so
#14 0xb69c138c in KWinInternal::Workspace::workspaceEvent ()
   from /usr/lib/libkdeinit_kwin.so
#15 0xb69c1c0e in KWinInternal::Application::x11EventFilter ()
   from /usr/lib/libkdeinit_kwin.so
#16 0xb714f423 in qt_set_x11_event_filter () from /usr/lib/libqt-mt.so.3
#17 0xb715c68f in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#18 0xb71762a2 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#19 0xb71ea255 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#20 0xb71ea17a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#21 0xb71d038d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#22 0xb69be7ef in kdemain () from /usr/lib/libkdeinit_kwin.so
#23 0xb7f38524 in kdeinitmain () from /usr/lib/kde3/kwin.so
Comment 43 81joe81 2006-06-05 14:35:24 UTC
I have the same problem clicking on the "show the desktop" icon that I have in my panel...the backtrace is the same as those posted before...
I'm using KDE 3.5.3 from Kubuntu package
Comment 44 81joe81 2006-06-05 14:36:43 UTC
I have the same problem clicking on the "show the desktop" icon that I have in my panel...the backtrace is the same as those posted before...
I'm using KDE 3.5.3 from Kubuntu package
Comment 45 MM 2006-06-05 20:13:21 UTC
My 2 cents. Gentoo, KDE 3.5.3 with GCC 3.3.6, QT 3.3.6 

1. Start aMule (trying with 2.1.1)
2. Click on Preferences
3. In the general tab, check "Enable system tray" and "Minimize to tray"
4. Now press the show desktop button, and release it. If it won't crash at the first time, try clicking and releasing it again... But at the end it crashes...

Here is a backtrace of the last crash:

Using host libthread_db library "/lib/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 25895)]
[KCrash handler]
#6  0xb65a1489 in QValueVectorPrivate<KWinInternal::Rules*>::size (
    this=0x32003b) at qvaluevector.h:81
#7  0xb65a112b in QValueVector<KWinInternal::Rules*>::count (this=0x32003b)
    at qvaluevector.h:467
#8  0xb659f2fe in KWinInternal::WindowRules::checkType (this=0x81defe8,
    arg=Unknown) at rules.cpp:776
#9  0xb6559ca8 in KWinInternal::Client::windowType (this=0x81def00,
    direct=false, supported_types=3276859) at client.cpp:1693
#10 0xb6559a1d in KWinInternal::Client::isTopMenu (this=0x32003b)
    at client.cpp:1648
#11 0xb65785dc in KWinInternal::Workspace::updateMinimizedOfTransients (
    this=0x8187d10, c=0x81f0978) at group.cpp:202
#12 0xb65550df in KWinInternal::Client::unminimize (this=0x81f0978,
    avoid_animation=true) at client.cpp:598
#13 0xb654c987 in KWinInternal::Workspace::setShowingDesktop (this=0x8187d10,
    showing=96) at workspace.cpp:2597
#14 0xb657017c in KWinInternal::RootInfo::changeShowingDesktop (this=0x32003b)
    at events.cpp:185
#15 0xb76cc6be in NETRootInfo::event (this=0x819b7a0, event=0xbfa164c0,
    properties=0xbfa15ff0, properties_size=1) at netwm.cpp:2001
#16 0xb76cc35d in NETRootInfo::event (this=0x32003b, ev=0x32003b)
    at netwm.cpp:1816
#17 0xb6570aca in KWinInternal::Workspace::netCheck (this=0x8187d10,
    e=0x32003b) at events.cpp:503
#18 0xb6570a19 in KWinInternal::Workspace::workspaceEvent (this=0x8187d10,
    e=0xbfa164c0) at events.cpp:205
#19 0xb6566b71 in KWinInternal::Application::x11EventFilter (this=0x32003b,
    e=0xbfa164c0) at main.cpp:154
#20 0xb6db6a35 in qt_x11EventFilter (ev=0xbfa164c0)
    at qapplication_x11.cpp:386
#21 0xb6dc27c5 in QApplication::x11ProcessEvent (this=0xbfa16620,
    event=0xbfa164c0) at qapplication_x11.cpp:3313
#22 0xb6de0e19 in QEventLoop::processEvents (this=0x813c970, flags=4)
    at qeventloop_x11.cpp:192
#23 0xb6e5d7f9 in QEventLoop::enterLoop (this=0x813c970) at qeventloop.cpp:198
#24 0xb6e5d712 in QEventLoop::exec (this=0x813c970) at qeventloop.cpp:145
#25 0xb6e46431 in QApplication::exec (this=0xbfa16620)
    at qapplication.cpp:2758
#26 0xb6566f9e in kdemain (argc=3, argv=0x8121d60) at main.cpp:282
#27 0xb758577a in kdeinitmain (argc=3276859, argv=0x32003b)
    at kwin_dummy.cpp:3
#28 0x0804dc6a in launch (argc=3, _name=0x8122674 "kwin", args=0x81226b9 "",
    cwd=0x0, envc=0, envs=0x81226bd "", reset_env=false, tty=0x0,
    avoid_loops=false,
    startup_id_str=0x32003b <Address 0x32003b out of bounds>) at kinit.cpp:639
#29 0x0804f2b1 in handle_launcher_request (sock=8) at kinit.cpp:1204
#30 0x0804f83d in handle_requests (waitForPid=0) at kinit.cpp:1407
#31 0x080509f6 in main (argc=3, argv=0xbfa16dd4, envp=0x32003b)
    at kinit.cpp:1863
Comment 46 Boris Dušek 2006-06-05 20:21:38 UTC
I also notice that there is high probability of kwin crash when the system is on high memory load (e.g. if 512 MB is full + swapping). Typical example: I leave my computer since it performs a lengthy, memory consuming compilation, I return back in 1 hour and kwin is crashed.
Comment 47 Cypress Twist 2006-06-06 22:10:44 UTC
I gave up on KDE because of this Bug. I'm starting to really enjoy Gnome. Good luck with the bug submitting.

Pe 05 Jun 2006, la 15:35, Federico <81joe81@gmail.com> a scris:

[bugs.kde.org quoted mail]
Comment 48 clcevboxvjeo 2006-06-07 22:23:16 UTC
I have fear of clicking the show destop button....
Comment 49 Lubos Lunak 2006-06-08 13:56:34 UTC
I cannot reproduce using the way described in comment #45 either.
Comment 50 Andreas Kling 2006-07-31 13:43:22 UTC
*** Bug 121897 has been marked as a duplicate of this bug. ***
Comment 51 Sergio Martins 2006-08-02 23:24:12 UTC
While running kde 3.5.2 i could crash kwin with:
    1. Run "yakuake"
    2. Press F12 button (default shortcut--show yakuake -- access key)
    3. Press "CTRL+ALT+D" ("Show desktop") once
    4. Press "CTRL+ALT+D" ("Show desktop") once again

but now i upgraded to kde 3.5.4 and it seems fixed :)

Can anyone confirm that the bug is gone? I can't find any reference to this bug in the changelog.
Comment 52 Iñaki Baz Castillo 2006-08-03 21:27:09 UTC
> but now i upgraded to kde 3.5.4 and it seems fixed :)
>
> Can anyone confirm that the bug is gone? I can't find any reference to this
> bug in the changelog.


I can confirm this bug with your test, but using KDE 3.5.2 of Kubuntu Dapper. 
I'll try it when upgrade to 3.5.4.
Comment 53 grimhen 2006-08-06 17:44:02 UTC
Same problem with Krusader 1.70.1 (KDE 3.5.2 on Gentoo). KWin crashed when Krusader is open and you click "Show Desktop" applet. This only happens when you use "minimalize to tray" option in Krusader. Without this option seems to be ok.
Comment 54 Luboš Doležel 2006-08-06 20:00:10 UTC
I also cannot reproduce this bug any more... I think it was fixed before 3.5.4 because I can remember myself switching virtual desktops witouht any crashes before updating to 3.5.4.
Comment 55 Klaus Friedel 2006-10-20 22:01:28 UTC
Bug still persists with 3.5.5:

Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47188202974080 (LWP 4197)]
[KCrash handler]
#5  0x00002aeadc7b78fc in KWinInternal::Client::findModal ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#6  0x00002aeadc7b7929 in KWinInternal::Client::findModal ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#7  0x00002aeadc7b7929 in KWinInternal::Client::findModal ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#8  0x00002aeadc7e8df5 in KWinInternal::Workspace::takeActivity ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#9  0x00002aeadc7ec352 in KWinInternal::Workspace::setCurrentDesktop ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#10 0x00002aead8b255cf in NETRootInfo::event ()
   from /opt/kde3/lib64/libkdecore.so.4
#11 0x00002aead8b25801 in NETRootInfo::event ()
   from /opt/kde3/lib64/libkdecore.so.4
#12 0x00002aeadc7ddf1d in KWinInternal::Workspace::netCheck ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#13 0x00002aeadc7fb5eb in KWinInternal::Workspace::workspaceEvent ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#14 0x00002aeadc7fbd03 in KWinInternal::Application::x11EventFilter ()
   from /opt/kde3/lib64/libkdeinit_kwin.so
#15 0x00002aead904a2d7 in qt_x11EventFilter ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#16 0x00002aead9058a99 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#17 0x00002aead90682af in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#18 0x00002aead90c67f1 in QEventLoop::enterLoop ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#19 0x00002aead90c669a in QEventLoop::exec ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#20 0x00002aeadc7fa0da in kdemain () from /opt/kde3/lib64/libkdeinit_kwin.so
#21 0x0000000000407431 in launch ()
#22 0x0000000000407d6c in handle_launcher_request ()
#23 0x00000000004080f5 in handle_requests ()
#24 0x000000000040914a in main ()
Comment 56 Lubos Lunak 2006-10-30 12:49:15 UTC
The request to provide a way to reproduce the problem unfortunately persists as well. Posting the same backtrace over and over again is not going to help with anything.
Comment 57 Tim 2006-11-24 23:22:26 UTC
Created attachment 18694 [details]
testcase which causes crash in kwin

Lubos, i attach a Java reproducer which always causes crash in kwin.

Steps to reproduce the crash:

Make sure you have java installed

Open a console window

javac DialogTest.java
java DialogTest

A window should pop up. 
Press "Create a dialog"
Another window will pop up.
Press New dialog several times. (about 10 times should do it).
Press "Close dialog" on each window.

You should see kwin crash while you are closing these dialogs.
Comment 58 anupam.srivastava 2006-11-25 19:57:14 UTC
I can confirm that this Java file crashes KWin on SuSE Linux 9.3 (i586) (Kde release 3.4.0 Level "b")
Comment 59 Lubos Lunak 2006-11-28 16:30:40 UTC
Which Java version should be used? With Sun Java 1.4.2 it actually doesn't work and requires changing line 69 to "getContentPane().add(panel);" and after doing so I cannot reproduce any crash with KDE3.5.5.
Comment 60 anupam.srivastava 2006-11-28 17:08:01 UTC
% java -version                                                              [17:06]
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)
Comment 61 anupam.srivastava 2006-11-28 17:16:16 UTC
Even with changing add(panel) to getContentPane().add(panel), if you compile it with Java 1.5, kwin crashes.
Comment 62 Tim 2006-11-29 21:11:55 UTC
java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20061002a (SR3) )
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20061001 (JIT enabled)
Comment 63 Tim 2006-12-04 22:45:06 UTC
comments findModal seems to resolve the crash

--- kdebase-3.5.5/kwin/group.cpp.orig  2006-11-24 22:31:44.000000000 +0100
+++ kdebase-3.5.5/kwin/group.cpp 2006-12-04 22:32:35.000000000 +0100
@@ -745,11 +745,13 @@

 Client* Client::findModal()
     {
+/*
     for( ClientList::ConstIterator it = transients().begin();
          it != transients().end();
          ++it )
         if( Client* ret = (*it)->findModal())
             return ret;
+*/
     if( isModal())
         return this;
     return NULL;
Comment 64 Chris 2006-12-08 01:04:07 UTC
I was having the same problem with a swing app running java 1.5 on KDE 3.4-Suse 9.3.  I was able to stop kwin from crashing by making sure that all my nested dialogs had parents and were modal.  The example code posted by Tim in #57 creates new dialogs that are modal but with no parent specified.  I altered the code to create dialogs with parents (either JFrame or JDialog) and no crash.
Comment 65 Lubos Lunak 2006-12-13 19:52:54 UTC
SVN commit 613275 by lunakl:

Remove group transients from transient_list of windows from old group.
I have to say I'm rather impressed by the level of brokeness of Java's
window handling.
BUG: 117677



 M  +9 -18     group.cpp  


--- branches/KDE/3.5/kdebase/kwin/group.cpp #613274:613275
@@ -872,6 +872,7 @@
     {
     TRANSIENCY_CHECK( this );
     Group* old_group = in_group;
+    Window old_group_leader = old_group != NULL ? old_group->leader() : None;
     if( set_group != NULL )
         {
         if( set_group != in_group )
@@ -958,35 +959,25 @@
                 ++it;
             }
         if( groupTransient())
-            { // and make transient for all in the group
-            for( ClientList::ConstIterator it = group()->members().begin();
-                 it != group()->members().end();
-                 ++it )
-                {
-                if( *it == this )
-                    break; // this means the window is only transient for windows mapped before it
-                (*it)->addTransient( this );
-                }
-            }
-#if 0 // TODO
-        if( groupTransient())
             {
-            if( workspace()->findGroup( old_group )) // if it still exists
-                { // it's no longer transient for windows in the old group
+            // no longer transient for ones in the old group
+            if( old_group != NULL && workspace()->findGroup( old_group_leader ) == old_group ) // if it still exists
+                {
                 for( ClientList::ConstIterator it = old_group->members().begin();
                      it != old_group->members().end();
                      ++it )
                     (*it)->removeTransient( this );
                 }
-            // and it's transiet for all windows in the new group (this one is the most recent
-            // in the group, so it is transient only for all previous windows)
-            // loops are checked in checkGroupTransients()
+            // and make transient for all in the new group
             for( ClientList::ConstIterator it = group()->members().begin();
                  it != group()->members().end();
                  ++it )
+                {
+                if( *it == this )
+                    break; // this means the window is only transient for windows mapped before it
                 (*it)->addTransient( this );
+                }
             }
-#endif
         // group transient splashscreens should be transient even for windows
         // in group mapped later
         for( ClientList::ConstIterator it = group()->members().begin();
Comment 66 Lubos Lunak 2006-12-13 20:18:41 UTC
*** Bug 118787 has been marked as a duplicate of this bug. ***
Comment 67 Lubos Lunak 2006-12-13 20:20:36 UTC
*** Bug 117881 has been marked as a duplicate of this bug. ***
Comment 68 anupam.srivastava 2006-12-14 14:02:58 UTC
Hope windows handling gets corrected since Java is open now.
Comment 69 Sune Vuorela 2006-12-24 15:32:26 UTC
This still happens with newest svn (http://bugs.kde.org/show_bug.cgi?id=139180)
Comment 70 Michael Seiwert 2006-12-27 09:37:14 UTC
For me it crashes also with latest svn. It's reproducible using projectX (http://www.lucike.info/index.htm?http://www.lucike.info/page_projectx.htm) while adding a file (File -> add). Try it 2-3 times. Maybe reopen bug ? 
Comment 71 Lubos Lunak 2007-01-04 18:18:50 UTC
Please try the latest svn again.
Comment 72 Michael Seiwert 2007-01-05 09:31:41 UTC
Doesn't seem to crash anymore. Thank you very much!
Comment 73 Tommi Tervo 2007-02-21 09:36:35 UTC
*** Bug 142005 has been marked as a duplicate of this bug. ***
Comment 74 Kevin Funk 2007-03-28 00:51:33 UTC
I don't know if others still have the same problem, but this issue with yakuake still persists for me. I already tried a new user, but same problem.
Using kde-3.5.6, yakuake-2.7.5, kwin-3.5.6 (distri: Gentoo).
Comment 75 Lubos Lunak 2007-03-28 11:45:05 UTC
Please file a new bugreport about it and provide info to reproduce the problem.
Comment 76 Axel Braun 2007-04-19 08:41:40 UTC
Created attachment 20320 [details]
another backtrace

Got the same kwin-problem here (KDE 3.5.6 "release 64.1", SuSE build), in this
case after opening digikam.
Is there another chance to resolve this than killing the X-Server?