Bug 242206 - Grouping windows automatically while one similar window is already open and shaded makes kwin crash
Summary: Grouping windows automatically while one similar window is already open and s...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 242246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-19 23:33 UTC by Micael Capitão
Modified: 2010-06-20 14:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.4.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Micael Capitão 2010-06-19 23:33:00 UTC
Application: kwin (4.4.4 (KDE 4.4.4))
KDE Platform Version: 4.4.4 (KDE 4.4.4)
Qt Version: 4.6.3
Operating System: Linux 2.6.34-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
I have the option "Automatically group similar windows" active in SystemSettings -> Window Behavior -> Window Behavior -> Advanced.
I opened Dolphin (or other application that allows multiple instances), shaded it and then I opened other instance of Dolphin. Kwin simply crashed and it happens all the time I repeat this procedure.

The crash can be reproduced every time.

 -- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
[KCrash Handler]
#5  0x00007ff2b117375c in KWin::Client::setShade(KWin::ShadeMode) () from /usr/lib/libkdeinit4_kwin.so
#6  0x00007ff2b1177989 in KWin::ClientGroup::add(KWin::Client*, int, bool) () from /usr/lib/libkdeinit4_kwin.so
#7  0x00007ff2b11ac21f in KWin::Client::manage(unsigned long, bool) () from /usr/lib/libkdeinit4_kwin.so
#8  0x00007ff2b1168702 in KWin::Workspace::createClient(unsigned long, bool) () from /usr/lib/libkdeinit4_kwin.so
#9  0x00007ff2b116b0b5 in KWin::Workspace::init() () from /usr/lib/libkdeinit4_kwin.so
#10 0x00007ff2b116c05c in KWin::Workspace::Workspace(bool) () from /usr/lib/libkdeinit4_kwin.so
#11 0x00007ff2b117fe38 in KWin::Application::Application() () from /usr/lib/libkdeinit4_kwin.so
#12 0x00007ff2b1181550 in kdemain () from /usr/lib/libkdeinit4_kwin.so
#13 0x00007ff2b0df9c4d in __libc_start_main () from /lib/libc.so.6
#14 0x00000000004005c9 in _start ()

Reported using DrKonqi
Comment 1 Nicolas L. 2010-06-20 00:06:21 UTC
 -- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
[KCrash Handler]
#5  0x00007ff2b117375c in KWin::Client::setShade(KWin::ShadeMode) () from
/usr/lib/libkdeinit4_kwin.so
#6  0x00007ff2b1177989 in KWin::ClientGroup::add(KWin::Client*, int, bool) ()
from /usr/lib/libkdeinit4_kwin.so
#7  0x00007ff2b11ac21f in KWin::Client::manage(unsigned long, bool) () from
/usr/lib/libkdeinit4_kwin.so

Please install kdebase-workspace debug packages and paste a new backtrace
Comment 2 Micael Capitão 2010-06-20 00:15:05 UTC
Arch linux don't have debug packages. KDEmod has debug packages, but the standard ones don't.
It is easy to reproduce. Can you reproduce the bug?
Comment 3 Igor Cardoso 2010-06-20 12:28:48 UTC
I can reproduce this on Archlinux x86 with KDE 4.4.4.
Comment 4 Thomas Lübking 2010-06-20 12:38:54 UTC
*** Bug 242246 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Lübking 2010-06-20 12:42:05 UTC
Bug #242246 has a more complete trace

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f2844949780 (LWP 2968))]

Thread 1 (Thread 0x7f2844949780 (LWP 2968)):
[KCrash Handler]
#6  0x00007f28444af89c in KWin::Client::setShade (this=0x1d8a3c0, mode=<value
optimized out>) at ../../kwin/client.cpp:984
#7  0x00007f28444b30f9 in KWin::ClientGroup::add (this=0x1d14f40, c=0x1d8a3c0,
before=-1, becomeVisible=true) at ../../kwin/clientgroup.cpp:69
#8  0x00007f28444ee116 in KWin::Client::manage (this=0x1d8a3c0, w=<value
optimized out>, isMapped=<value optimized out>) at ../../kwin/manage.cpp:325
#9  0x00007f28444a3772 in KWin::Workspace::createClient (this=0x19d6380,
w=71398080, is_mapped=208) at ../../kwin/workspace.cpp:558
#10 0x00007f28444e0101 in KWin::Workspace::workspaceEvent (this=0x19d6380,
e=0x7fffc2f04eb0) at ../../kwin/events.cpp:385
#11 0x00007f28444bbc28 in KWin::Application::x11EventFilter
(this=0x7fffc2f052a0, e=0x7fffc2f04eb0) at ../../kwin/main.cpp:362
#12 0x00007f283fc29fe1 in qt_x11EventFilter (ev=0x7fffc2f04eb0) at
kernel/qapplication_x11.cpp:408
#13 0x00007f283fc39c51 in QApplication::x11ProcessEvent (this=<value optimized
out>, event=0x7fffc2f04eb0) at kernel/qapplication_x11.cpp:3248
#14 0x00007f283fc66482 in x11EventSourceDispatch (s=0x1883770, callback=<value
optimized out>, user_data=<value optimized out>) at
kernel/qguieventdispatcher_glib.cpp:146
#15 0x00007f28396028c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#16 0x00007f2839606748 in ?? () from /lib/libglib-2.0.so.0
#17 0x00007f28396068fc in g_main_context_iteration () from
/lib/libglib-2.0.so.0
#18 0x00007f2840a73973 in QEventDispatcherGlib::processEvents (this=0x1865d60,
flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#19 0x00007f283fc65dee in QGuiEventDispatcherGlib::processEvents (this=0x0,
flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#20 0x00007f2840a465b2 in QEventLoop::processEvents (this=<value optimized
out>, flags=) at kernel/qeventloop.cpp:149
#21 0x00007f2840a4698c in QEventLoop::exec (this=0x7fffc2f051e0, flags=) at
kernel/qeventloop.cpp:201
#22 0x00007f2840a4aa3b in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:1009
#23 0x00007f28444bdecf in kdemain (argc=<value optimized out>, argv=<value
optimized out>) at ../../kwin/main.cpp:523
#24 0x00007f2844104c4d in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized
out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fffc2f05798) at
libc-start.c:226
#25 0x00000000004006b9 in _start ()
Comment 6 Martin Flöser 2010-06-20 14:05:57 UTC
SVN commit 1140341 by graesslin:

Ensure that a decoration is created before we try to shade the client. This fixes a crash when auto-grouping is enabled and a client should be added to a shaded group.
It still crashes when kwin is restarted with a shade group (same backtrace, but needs a different fix).
BUG: 242206
FIXED-IN: 4.4.5



 M  +2 -0      manage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1140341
Comment 7 Martin Flöser 2010-06-20 14:07:41 UTC
SVN commit 1140342 by graesslin:

Forward port rev 1140341: Ensure that a decoration is created before we try to shade the client. This fixes a crash when auto-grouping is enabled and a client should be added to a shaded group.
It still crashes when kwin is restarted with a shade group (same backtrace, but needs a different fix).
CCBUG: 242206

 M  +2 -0      manage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1140342
Comment 8 Martin Flöser 2010-06-20 14:12:57 UTC
SVN commit 1140343 by graesslin:

When restarting kwin and there is a shaded group, set shade is called before a decoration is created. Catch this case, so that kwin doesn't crash.
This fix is related to rev 1140342.
CCBUG: 242206

 M  +2 -0      client.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1140343
Comment 9 Martin Flöser 2010-06-20 14:14:16 UTC
SVN commit 1140344 by graesslin:

Backport rev 1140343: When restarting kwin and there is a shaded group, set shade is called before a decoration is created. Catch this case, so that kwin doesn't crash.
CCBUG: 242206



 M  +2 -0      client.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1140344