Bug 311102

Summary: kWin crash after apply no border in any window
Product: [Plasma] kwin Reporter: Oscar Campos <oscar.campos>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: 4.9.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Oscar Campos 2012-12-03 18:53:01 UTC
Application: kwin (4.9.3)
KDE Platform Version: 4.9.3 (Compiled from sources)
Qt Version: 4.8.2
Operating System: Linux 3.5.7-gentoo x86_64
Distribution: "Gentoo Base System release 2.1"

-- Information about the crash:
- What I was doing when the application crashed: Trying to apply the "no border" feature to any application on KDE

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f2158c3c7c0 (LWP 864))]

Thread 2 (Thread 0x7f2153424700 (LWP 879)):
#0  0x00007f21693725ec in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007f216aa6f184 in QTWTF::TCMalloc_PageHeap::scavengerThread() () from /usr/lib64/qt4/libQtScript.so.4
#2  0x00007f216aa6f1b9 in QTWTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/qt4/libQtScript.so.4
#3  0x00007f216a277764 in ?? () from /usr/lib64/libGL.so.1
#4  0x00007f216936dda6 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f216dbe199d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f2158c3c7c0 (LWP 864)):
[KCrash Handler]
#6  0x00007f216aaa9cfe in QScriptValue::toVariant() const () from /usr/lib64/qt4/libQtScript.so.4
#7  0x00007f216cb2f41e in QDeclarativeEnginePrivate::scriptValueToVariant(QScriptValue const&, int) () from /usr/lib64/qt4/libQtDeclarative.so.4
#8  0x00007f216cb35faf in QDeclarativeExpressionPrivate::value(QObject*, bool*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#9  0x00007f216cb6dea9 in QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/qt4/libQtDeclarative.so.4
#10 0x00007f216971a12b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007f216cc25f72 in QDeclarativeMouseArea::pressed(QDeclarativeMouseEvent*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#12 0x00007f216cad3d6f in QDeclarativeMouseArea::setPressed(bool) () from /usr/lib64/qt4/libQtDeclarative.so.4
#13 0x00007f216cad4adc in QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#14 0x00007f2168e47d3f in QGraphicsItem::sceneEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007f216cac7532 in QDeclarativeItem::sceneEvent(QEvent*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#16 0x00007f216cad33f9 in QDeclarativeMouseArea::sceneEvent(QEvent*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#17 0x00007f2168e714c0 in QGraphicsScenePrivate::sendMouseEvent(QGraphicsSceneMouseEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007f2168e7a549 in QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#19 0x00007f2168e7aa44 in QGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007f2168e8458f in QGraphicsScene::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007f216887d404 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007f2168881f2f in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00007f216d6ba4b6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#24 0x00007f21697045dc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#25 0x00007f2168e9661f in QGraphicsView::mousePressEvent(QMouseEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#26 0x00007f21688cf129 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#27 0x00007f2168c748f6 in QFrame::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#28 0x00007f2168e9efcb in QGraphicsView::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#29 0x00007f2169704767 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#30 0x00007f216887d3d1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#31 0x00007f2168882752 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#32 0x00007f216d6ba4b6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#33 0x00007f21697045dc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#34 0x00007f216887e3c5 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#35 0x00007f21688fc788 in QETWidget::translateMouseEvent(_XEvent const*) () from /usr/lib64/qt4/libQtGui.so.4
#36 0x00007f21688fae39 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#37 0x00007f2168923594 in QEventDispatcherX11::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
#38 0x00007f2169703332 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#39 0x00007f21697035ed in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#40 0x00007f216970807b in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#41 0x00007f216df06e9d in kdemain () from /usr/lib64/libkdeinit4_kwin.so
#42 0x00007f216db184bd in __libc_start_main () from /lib64/libc.so.6
#43 0x0000000000400789 in _start ()

Possible duplicates by query: bug 305066, bug 303450.

Reported using DrKonqi
Comment 1 Thomas Lübking 2012-12-03 19:00:52 UTC
Through the rmb context menu i assume and it's not a problem when not using the Aurorae decorations (the ones you get via GHNS)?

*** This bug has been marked as a duplicate of bug 310658 ***
Comment 2 Oscar Campos 2012-12-03 19:23:23 UTC
It only crash when Desktop effects are active
Comment 3 Oscar Campos 2012-12-03 19:29:18 UTC
No it just happens with whatever window decoration I use. I was using default KDE Oxygen decoration already.
Comment 4 Thomas Lübking 2012-12-03 19:32:41 UTC
The crash happens from within the decoration.
Whether the compositing state causes delays on the popup is interesting, but not relevant.

Bind a shortcut to hiding the decoration, hide it using that shortcut.
If it still crashes this way, please attach the new backtrace.

Try another decoration (oxygen, not some "oxygen-air" clone from GHNS)
If it still crashes on hidint the decoration, please attach that backtrace as well.

Otherwise this is a dupe.

*** This bug has been marked as a duplicate of bug 310658 ***
Comment 5 Thomas Lübking 2012-12-03 19:34:12 UTC
#6  0x00007f216aaa9cfe in QScriptValue::toVariant() const () from /usr/lib64/qt4/libQtScript.so.4
#7  0x00007f216cb2f41e in QDeclarativeEnginePrivate::scriptValueToVariant(QScriptValue const&, int) () from /usr/lib64/qt4/libQtDeclarative.so.4
#8  0x00007f216cb35faf in QDeclarativeExpressionPrivate::value(QObject*, bool*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#9  0x00007f216cb6dea9 in QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/qt4/libQtDeclarative.so.4
#10 0x00007f216971a12b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007f216cc25f72 in QDeclarativeMouseArea::pressed(QDeclarativeMouseEvent*) () from /usr/lib64/qt4/libQtDeclarative.so.4
#12 0x00007f216cad3d6f in QDeclarativeMouseArea::setPressed(bool) () from /usr/lib64/qt4/libQtDeclarative.so.4


There's a pending mousepress on some graphicsscene when the crash occured.
Oxygen does not use a graphicsscene.

=> what did you click on when the crash occured and how is that related to hiding the titlebar?
Comment 6 Oscar Campos 2012-12-03 19:48:27 UTC
Just the context menu entry for "no border", now is not crashing anymore I didn't did anything, no recompile, no reboot, no anything.
Comment 7 Thomas Lübking 2012-12-03 20:26:00 UTC
This kind of crash is unfortunately anything but deterministic.
Since it happens on destruction, the memory will, though invalid, still contain the correct data.

The core problem is however that it's not possible to stop eventprocessing inside the graphicsscene, which will continue after the nested eventloop of the popup exited (but then the GraphicsScene is gone)

I'm willing to bet your right arm that this does not happen with the actual stock oxygen decoration, nor using a shortcut.
In this case - and with a little luck ;-) the patch that closed the dupe will resolve this (it moves the destruction of the decoration to the next event cycle, when the events that caused it have been fully processed)
Comment 8 Oscar Campos 2012-12-03 20:45:42 UTC
I understand you, I'm developer too so I know how important are accurate reports. I was using the decorator that is Blue at borders and silver on center. I think this is regular Oxygen decorator theme. 

Anyway seems to be working nice now, I was doing a lot of changes to my KDE look & feel I think you shouldn't be worried about this bug report anymore.

Regards and thanks for a fast reply.