Bug 310142

Summary: KWin crash due to wobbly windows effect when closing window
Product: [Plasma] kwin Reporter: Sandro Mani <manisandro>
Component: window-tabbingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: arne_bab, xgdgsc
Priority: NOR Flags: thomas.luebking: ReviewRequest+
Version: 4.9.3   
Target Milestone: 4.10   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.10
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Sandro Mani 2012-11-15 11:33:41 UTC
Application: kwin (4.9.3)
KDE Platform Version: 4.9.3
Qt Version: 4.8.3
Operating System: Linux 3.7.0-0.rc5.git1.3.fc19.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
Closed a window

Reproducibility: Occasionally (no particular pattern noticable though)

The crash can be reproduced some of the time.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f4beaf55880 (LWP 1254))]

Thread 2 (Thread 0x7f4bd691a700 (LWP 1260)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f4bff276ac7 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f4bff584660 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f4bff276af9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f4bfd5f8ef5 in start_thread (arg=0x7f4bd691a700) at pthread_create.c:308
#4  0x00007f4bfb584e0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f4beaf55880 (LWP 1254)):
[KCrash Handler]
#6  parent (this=0x0) at /usr/include/QtCore/qobject.h:273
#7  KWin::EffectWindow::isUserMove (this=0x0) at /usr/src/debug/kde-workspace-4.9.3/kwin/libkwineffects/kwineffects.cpp:379
#8  0x00007f4bd6a4cff3 in KWin::WobblyWindowsEffect::slotWindowMaximizeStateChanged (this=0x2f76ed0, w=0x0, horizontal=<optimized out>, vertical=<optimized out>) at /usr/src/debug/kde-workspace-4.9.3/kwin/effects/wobblywindows/wobblywindows.cpp:403
#9  0x00007f4bfd99afaf in QMetaObject::activate (sender=0x2bb7de0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8388a360) at kernel/qobject.cpp:3547
#10 0x00007f4bfeaa71cc in KWin::EffectsHandler::windowMaximizedStateChanged (this=<optimized out>, _t1=0x0, _t2=false, _t3=false) at /usr/src/debug/kde-workspace-4.9.3/x86_64-redhat-linux-gnu/kwin/libkwineffects/kwineffects.moc:503
#11 0x00007f4bfd99afaf in QMetaObject::activate (sender=0x35f3300, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8388a4c0) at kernel/qobject.cpp:3547
#12 0x00007f4c022a1d70 in KWin::Client::clientMaximizedStateChanged (this=<optimized out>, _t1=0x35f3300, _t2=KDecorationDefines::MaximizeRestore) at /usr/src/debug/kde-workspace-4.9.3/x86_64-redhat-linux-gnu/kwin/client.moc:411
#13 0x00007f4c022e660d in KWin::Client::setMaximize (this=0x35f3300, vertically=false, horizontally=<optimized out>) at /usr/src/debug/kde-workspace-4.9.3/kwin/geometry.cpp:2084
#14 0x00007f4c022e9f9a in KWin::Client::setQuickTileMode (this=0x35f3300, mode=..., keyboard=false) at /usr/src/debug/kde-workspace-4.9.3/kwin/geometry.cpp:3186
#15 0x00007f4c022a256c in untab (toGeometry=..., this=0x35f3300) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:1966
#16 KWin::Client::untab (this=0x35f3300, toGeometry=...) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:1954
#17 0x00007f4c02292496 in KWin::Workspace::removeClient (this=0x2723d20, c=0x35f3300) at /usr/src/debug/kde-workspace-4.9.3/kwin/workspace.cpp:655
#18 0x00007f4c022a6c8e in KWin::Client::releaseWindow (this=0x35f3300, on_shutdown=false) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:271
#19 0x00007f4c022bf09b in KWin::Client::windowEvent (this=0x35f3300, e=0x7fff8388bdf0) at /usr/src/debug/kde-workspace-4.9.3/kwin/events.cpp:583
#20 0x00007f4c022bfec3 in KWin::Workspace::workspaceEvent (this=0x2723d20, e=0x7fff8388bdf0) at /usr/src/debug/kde-workspace-4.9.3/kwin/events.cpp:294
#21 0x00007f4c022b2298 in KWin::Application::x11EventFilter (this=0x7fff8388c350, e=0x7fff8388bdf0) at /usr/src/debug/kde-workspace-4.9.3/kwin/main.cpp:362
#22 0x00007f4bfcb865ac in qt_x11EventFilter (ev=0x7fff8388bdf0) at kernel/qapplication_x11.cpp:435
#23 qt_x11EventFilter (ev=0x7fff8388bdf0) at kernel/qapplication_x11.cpp:423
#24 0x00007f4bfcb93bcb in QApplication::x11ProcessEvent (this=0x7fff8388c350, event=0x7fff8388bdf0) at kernel/qapplication_x11.cpp:3363
#25 0x00007f4bfcbbb1c9 in QEventDispatcherX11::processEvents (this=0x264b790, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#26 0x00007f4bfd98353f in QEventLoop::processEvents (this=this@entry=0x7fff8388c060, flags=...) at kernel/qeventloop.cpp:149
#27 0x00007f4bfd9837c8 in QEventLoop::exec (this=0x7fff8388c060, flags=...) at kernel/qeventloop.cpp:204
#28 0x00007f4bfd9885b8 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#29 0x00007f4c022b4924 in kdemain (argc=1, argv=0x7fff8388c498) at /usr/src/debug/kde-workspace-4.9.3/kwin/main.cpp:545
#30 0x00007f4bfb4acdb5 in __libc_start_main (main=0x400910 <main(int, char**)>, argc=1, ubp_av=0x7fff8388c498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff8388c488) at libc-start.c:258
#31 0x0000000000400941 in _start ()

Reported using DrKonqi
Comment 1 Thomas Lübking 2012-11-15 13:41:14 UTC
#12 0x00007f4c022a1d70 in KWin::Client::clientMaximizedStateChanged (this=<optimized out>, _t1=0x35f3300, _t2=KDecorationDefines::MaximizeRestore) at /usr/src/debug/kde-workspace-4.9.3/x86_64-redhat-linux-gnu/kwin/client.moc:411
#13 0x00007f4c022e660d in KWin::Client::setMaximize (this=0x35f3300, vertically=false, horizontally=<optimized out>) at /usr/src/debug/kde-workspace-4.9.3/kwin/geometry.cpp:2084
#14 0x00007f4c022e9f9a in KWin::Client::setQuickTileMode (this=0x35f3300, mode=..., keyboard=false) at /usr/src/debug/kde-workspace-4.9.3/kwin/geometry.cpp:3186
#15 0x00007f4c022a256c in untab (toGeometry=..., this=0x35f3300) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:1966
#16 KWin::Client::untab (this=0x35f3300, toGeometry=...) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:1954
#17 0x00007f4c02292496 in KWin::Workspace::removeClient (this=0x2723d20, c=0x35f3300) at /usr/src/debug/kde-workspace-4.9.3/kwin/workspace.cpp:655
#18 0x00007f4c022a6c8e in KWin::Client::releaseWindow (this=0x35f3300, on_shutdown=false) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:271


Untabbing for release should rather not reset states, i'd say.
Comment 2 GSC 2012-11-29 18:14:37 UTC
Created attachment 75534 [details]
New crash information added by DrKonqi

kwin (4.9.3) on KDE Platform 4.9.3 using Qt 4.8.3

- What I was doing when the application crashed:
close an activity in another activity

- Unusual behavior I noticed:
It crashed immediatly I push the stop button
- Custom settings of the application:
wobby windows effect

-- Backtrace (Reduced):
#5  0x00007f79b1894d0e in KWin::EffectWindow::isUserMove() const () from /usr/lib/libkwineffects.so.1
[...]
#8  0x00007f79b189671c in KWin::EffectsHandler::windowMaximizedStateChanged(KWin::EffectWindow*, bool, bool) () from /usr/lib/libkwineffects.so.1
[...]
#20 0x00007f79adf1aceb in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
[...]
#22 0x00007f79aed0c31f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0x00007f79aed0c5a8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
Comment 3 Martin Flöser 2012-12-28 06:45:48 UTC
*** Bug 312286 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Lübking 2012-12-29 14:41:13 UTC
https://git.reviewboard.kde.org/r/108003/
Comment 5 Thomas Lübking 2013-01-02 18:00:16 UTC
Git commit f3fbfaabcdcbe8abe94482efc6916e823f0b6f4c by Thomas Lübking.
Committed on 29/12/2012 at 17:02.
Pushed by luebking into branch 'KDE/4.10'.

disconnect all client signals when it's closed

the client can still live on and emit stuff, but the
compositing has been fininshed for it, so the effect window is NULL
FIXED-IN: 4.10
REVIEW: 108008

M  +1    -0    kwin/effects.cpp

http://commits.kde.org/kde-workspace/f3fbfaabcdcbe8abe94482efc6916e823f0b6f4c
Comment 6 Thomas Lübking 2013-01-02 18:04:00 UTC
This one as well:
----------------------------
Git commit 276dfc615030465f01358a11ac98b11075e5ddec by Thomas Lübking.
Committed on 29/12/2012 at 15:36.
Pushed by luebking into branch 'KDE/4.10'.

skip reset states if client untabbed for release
FIXED-IN: 4.10
REVIEW: 108003

M  +3    -1    kwin/client.cpp
M  +1    -1    kwin/client.h
M  +1    -1    kwin/workspace.cpp

http://commits.kde.org/kde-workspace/276dfc615030465f01358a11ac98b11075e5ddec
Comment 7 Thomas Lübking 2013-01-02 18:06:42 UTC
Git commit 7cbd2d3bda8b44935c136366aa510b33762bf14b by Thomas Lübking.
Committed on 29/12/2012 at 15:36.
Pushed by luebking into branch 'master'.

skip reset states if client untabbed for release
FIXED-IN: 4.10
REVIEW: 108003

M  +3    -1    kwin/client.cpp
M  +1    -1    kwin/client.h
M  +1    -1    kwin/workspace.cpp

http://commits.kde.org/kde-workspace/7cbd2d3bda8b44935c136366aa510b33762bf14b
Comment 8 Thomas Lübking 2013-01-02 18:06:42 UTC
Git commit 84b63d4b45ee980ed29d2893326eaa4fae45c5da by Thomas Lübking.
Committed on 29/12/2012 at 17:02.
Pushed by luebking into branch 'master'.

disconnect all client signals when it's closed

the client can still live on and emit stuff, but the
compositing has been fininshed for it, so the effect window is NULL
FIXED-IN: 4.10
REVIEW: 108008

M  +1    -0    kwin/effects.cpp

http://commits.kde.org/kde-workspace/84b63d4b45ee980ed29d2893326eaa4fae45c5da
Comment 9 Arne Babenhauserheide 2013-01-02 23:06:51 UTC
Cool, thank you!