Bug 311340 - Intermittent crashing on shaded window
Summary: Intermittent crashing on shaded window
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 4.9.3
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-08 12:36 UTC by dexter
Modified: 2012-12-14 21:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments
last crash trace (4.26 KB, text/plain)
2012-12-08 12:39 UTC, dexter
Details
Fix attempt (1.06 KB, patch)
2012-12-08 14:37 UTC, Thomas Lübking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dexter 2012-12-08 12:36:44 UTC
I always have a konsole window set to [hover enabled,always on top and shaded] containing a few tabs on my desktop. So while I surf etc I come back to konsole by hovering over the shaded window. nine times out of ten the window will unshade and I'm back at konsole but some times it will just crash and kwin auto restarts. Ive been seeing this for some time now ~4.8.x - 4.9.3 yep its now bugging me enuff to report it :-)

Reproducible: Sometimes

Steps to Reproduce:
1. set konsole window to always ontop, shaded and enable hover settings
2. use your desktop for your normal workflow
3. If kwin hasn't crashed after returning to konsole, just wait longer


Expected Results:  
konsole should spring to life.
Comment 1 dexter 2012-12-08 12:39:30 UTC
Created attachment 75710 [details]
last crash trace
Comment 2 Thomas Lübking 2012-12-08 13:38:35 UTC
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb76f87c0 (LWP 801))]

Thread 2 (Thread 0xb2bcdb40 (LWP 822)):
#0  0xb772e424 in __kernel_vsyscall ()
#1  0x4f6d412c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:172
#2  0x493675dd in QTWTF::TCMalloc_PageHeap::scavengerThread (this=this@entry=0x49476280) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#3  0x49367610 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x49476280) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#4  0x4f6d0adf in start_thread (arg=0xb2bcdb40) at pthread_create.c:309
#5  0x4784f42e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:133

Thread 1 (Thread 0xb76f87c0 (LWP 801)):
[KCrash Handler]
#7  __cxxabiv1::__dynamic_cast (src_ptr=0x9f1c4d8, src_type=0x49d29720, dst_type=0x49d28c8c, src2dst=0) at ../../../../libstdc++-v3/libsupc++/dyncast.cc:61
#8  0x49c89488 in KWin::Toplevel::windowType (this=0x9f1c4d8, direct=false, supported_types=0) at /usr/src/debug/kde-workspace-4.9.3/kwin/toplevel.cpp:164
#9  0x49c25ca1 in isNormalWindow (this=<optimized out>) at /usr/src/debug/kde-workspace-4.9.3/kwin/toplevel.h:483
#10 KWin::Client::setShade (this=this@entry=0x9e2ac38, mode=<optimized out>, mode@entry=KWin::ShadeHover) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:1137
#11 0x49c25ea9 in KWin::Client::shadeHover (this=this@entry=0x9e2ac38) at /usr/src/debug/kde-workspace-4.9.3/kwin/client.cpp:1161
#12 0x49c26217 in qt_static_metacall (_a=0xbfeb79bc, _id=29, _o=0x9e2ac38, _c=<optimized out>) at /usr/src/debug/kde-workspace-4.9.3/i686-redhat-linux-gnu/kwin/client.moc:251
#13 KWin::Client::qt_static_metacall (_o=0x9e2ac38, _c=QMetaObject::InvokeMetaMethod, _id=29, _a=0xbfeb79bc) at /usr/src/debug/kde-workspace-4.9.3/i686-redhat-linux-gnu/kwin/client.moc:216
#14 0x461681ce in QMetaObject::activate (sender=0x9e7cde0, m=0x462bca18, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3539
#15 0x461bb476 in QTimer::timeout (this=0x9e7cde0) at .moc/release-shared/moc_qtimer.cpp:147
#16 0x46170916 in QTimer::timerEvent (this=0x9e7cde0, e=0xbfeb7ef0) at kernel/qtimer.cpp:280
#17 0x4616750c in QObject::event (this=0x9e7cde0, e=0xbfeb7ef0) at kernel/qobject.cpp:1156
#18 0x46a6405c in QApplicationPrivate::notify_helper (this=0x97943a0, receiver=0x9e7cde0, e=0xbfeb7ef0) at kernel/qapplication.cpp:4562
#19 0x46a68b1f in QApplication::notify (this=0xbfeb7ef0, receiver=0x9e7cde0, e=0xbfeb7ef0) at kernel/qapplication.cpp:3944
#20 0x48d5cfe2 in KApplication::notify (this=0xbfeb82b8, receiver=0x9e7cde0, event=0xbfeb7ef0) at /usr/src/debug/kdelibs-4.9.3/kdeui/kernel/kapplication.cpp:311
#21 0x49c319a0 in notify (e=0xbfeb7ef0, o=0x9e7cde0, this=0xbfeb82b8) at /usr/src/debug/kde-workspace-4.9.3/kwin/main.cpp:371
#22 KWin::Application::notify (this=0xbfeb82b8, o=0x9e7cde0, e=0xbfeb7ef0) at /usr/src/debug/kde-workspace-4.9.3/kwin/main.cpp:367
#23 0x4615100e in QCoreApplication::notifyInternal (this=0xbfeb82b8, receiver=0x9e7cde0, event=0xbfeb7ef0) at kernel/qcoreapplication.cpp:946
#24 0x461864b0 in sendEvent (event=0xbfeb7ef0, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#25 QTimerInfoList::activateTimers (this=0x9794b1c) at kernel/qeventdispatcher_unix.cpp:622
#26 0x46186535 in QEventDispatcherUNIX::activateTimers (this=0x9794b1c, this@entry=0x97507e0) at kernel/qeventdispatcher_unix.cpp:879
#27 0x461866b8 in QEventDispatcherUNIX::processEvents (this=0x97507e0, flags=...) at kernel/qeventdispatcher_unix.cpp:941
#28 0x46b17703 in QEventDispatcherX11::processEvents (this=0x97507e0, flags=...) at kernel/qeventdispatcher_x11.cpp:152
#29 0x4614faad in QEventLoop::processEvents (this=this@entry=0xbfeb8138, flags=...) at kernel/qeventloop.cpp:149
#30 0x4614fda9 in QEventLoop::exec (this=0xbfeb8138, flags=...) at kernel/qeventloop.cpp:204
#31 0x461552eb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#32 0x46a61ed5 in QApplication::exec () at kernel/qapplication.cpp:3823
#33 0x49c34340 in kdemain (argc=3, argv=0xbfeb83a4) at /usr/src/debug/kde-workspace-4.9.3/kwin/main.cpp:545
#34 0x0804876c in main (argc=3, argv=0xbfeb83a4) at /usr/src/debug/kde-workspace-4.9.3/i686-redhat-linux-gnu/kwin/kwin_dummy.cpp:3
Comment 3 Thomas Lübking 2012-12-08 13:50:35 UTC
if order.indexOf(this) + 1 >=  order.count() "shade_below" is not researched and might end up being a dangeling pointer.

Matches the onTop condition, don't you have any panels covering all windows?
(Not a complain, but to harden the theory)
Comment 4 dexter 2012-12-08 14:32:08 UTC
(In reply to comment #3)
> if order.indexOf(this) + 1 >=  order.count() "shade_below" is not researched
> and might end up being a dangeling pointer.
> 
> Matches the onTop condition, don't you have any panels covering all windows?
> (Not a complain, but to harden the theory)

Errm, I have my main panel at the bottom of the screen and this set to autohide.
Comment 5 Thomas Lübking 2012-12-08 14:37:27 UTC
Created attachment 75718 [details]
Fix attempt

Fits.
Can you try the attached patch?
Comment 6 dexter 2012-12-10 09:57:53 UTC
(In reply to comment #5)
> Created attachment 75718 [details]
> Fix attempt
> 
> Fits.
> Can you try the attached patch?

My main build box is down atm (dead psu) I'll see if I can get the fedora kde folk to do me scratch build for testing if not it'll most likely be two weeks before I can put this patch to the test ....
Comment 7 Thomas Lübking 2012-12-10 11:06:15 UTC
too late, i'll just push it and you can try rc1 then
Comment 8 dexter 2012-12-10 11:25:53 UTC
ok I'll back port to 4.9.x when I get a chance
Comment 9 Thomas Lübking 2012-12-14 21:55:11 UTC
Git commit 89f8c4a1514fb76139207c9e18f8803dfa128d73 by Thomas Lübking.
Committed on 08/12/2012 at 14:52.
Pushed by luebking into branch 'master'.

invalidate old shade_below before searching a new

for the search could be implicitly skipped and we end up
with a dangeling pointer
FIXED-IN: 4.10

M  +2    -0    kwin/client.cpp

http://commits.kde.org/kde-workspace/89f8c4a1514fb76139207c9e18f8803dfa128d73