Summary: | KWin crashed after maximizing a window by pressing the maximize button (with Aurorae) | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Jan Gerrit Marker <jangerrit> |
Component: | decorations | Assignee: | Martin Flöser <mgraesslin> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bayleak38, kde, kwin-bugs-null, wizard.karan |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.5.0 |
Description
Jan Gerrit Marker
2010-06-19 14:13:20 UTC
*** This bug has been marked as a duplicate of bug 242116 *** backtraces are different. This crash is caused by clicking maximize button, other crash is caused by closing a window. both traces end on: QGraphicsScene::mouseReleaseEvent() -> QGraphicsItem::update() -> QGraphicsItemPrivate::invalidateParentGraphicsEffectsRecursively (this=0x0) the maximize causes a reset which sets the buttons, apparently invoking (on a rough look on the code) a deletion of the former ones, long story short_ AuroraeButton::mouseReleaseEvent() can cause self deletion through "emit clicked();" which you want to emit after the update and baseclass call... :-P yes that's what I just figured out, too. I guess for clicks on close buttons that happens, too - also I'm not able to reproduce it there. damn it - if I ensure that the internal handling is called before emitting the signal, it just dies somewhere else: Application: KWin (kwin), signal: Segmentation fault The current source language is "auto; currently asm". [KCrash Handler] #6 0x00007f2a882440b4 in QAbstractScrollArea::viewport (this=0x2ed06c0) at widgets/qabstractscrollarea.cpp:568 #7 0x00007f2a883feb81 in QGraphicsView::mouseReleaseEvent (this=0x2ed06c0, event=<value optimized out>) at graphicsview/qgraphicsview.cpp:3267 #8 0x00007f2a87e12602 in QWidget::event (this=0x2ed06c0, event=0x7fff59ef39b0) at kernel/qwidget.cpp:8044 #9 0x00007f2a881b9946 in QFrame::event (this=0x2ed06c0, e=0x7fff59ef39b0) at widgets/qframe.cpp:557 #10 0x00007f2a883fcdab in QGraphicsView::viewportEvent (this=0x2ed06c0, event=0x7fff59ef39b0) at graphicsview/qgraphicsview.cpp:2787 #11 0x00007f2a88e92577 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x2ed5ea0, event=0x7fff59ef39b0) at kernel/qcoreapplication.cpp:841 #12 0x00007f2a87dbc2fc in QApplicationPrivate::notify_helper (this=0x2616d20, receiver=0x2ed5ea0, e=0x7fff59ef39b0) at kernel/qapplication.cpp:4298 #13 0x00007f2a87dc2fdb in QApplication::notify (this=0x7fff59ef4510, receiver=0x2ed5ea0, e=0x7fff59ef39b0) at kernel/qapplication.cpp:3867 #14 0x00007f2a89b48bb6 in KApplication::notify (this=0x7fff59ef4510, receiver=0x2ed5ea0, event=0x7fff59ef39b0) at /opt/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302 #15 0x00007f2a88e9315c in QCoreApplication::notifyInternal (this=0x7fff59ef4510, receiver=0x2ed5ea0, event=0x7fff59ef39b0) at kernel/qcoreapplication.cpp:726 #16 0x00007f2a87dc21be in QCoreApplication::sendEvent (receiver=0x2ed5ea0, event=0x7fff59ef39b0, alienWidget=0x0, nativeWidget=0x2ed5ea0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #17 QApplicationPrivate::sendMouseEvent (receiver=0x2ed5ea0, event=0x7fff59ef39b0, alienWidget=0x0, nativeWidget=0x2ed5ea0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:2967 #18 0x00007f2a87e4203b in QETWidget::translateMouseEvent (this=0x2ed5ea0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4380 #19 0x00007f2a87e409ac in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff59ef4130) at kernel/qapplication_x11.cpp:3513 #20 0x00007f2a87e6c552 in x11EventSourceDispatch (s=0x261aa60, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146 #21 0x00007f2a80a0f6c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #22 0x00007f2a80a13538 in ?? () from /lib/libglib-2.0.so.0 #23 0x00007f2a80a136ec in g_main_context_iteration () from /lib/libglib-2.0.so.0 #24 0x00007f2a88ebc713 in QEventDispatcherGlib::processEvents (this=0x25f3970, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #25 0x00007f2a87e6c14e in QGuiEventDispatcherGlib::processEvents (this=0x2ed06c0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #26 0x00007f2a88e91a82 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #27 0x00007f2a88e91e5c in QEventLoop::exec (this=0x7fff59ef4450, flags=) at kernel/qeventloop.cpp:201 #28 0x00007f2a88e96aeb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003 #29 0x00007f2a8b3c62c2 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /opt/kde/src/KDE/kdebase/workspace/kwin/main.cpp:527 #30 0x00007f2a85129c4d 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=0x7fff59ef4b18) at libc-start.c:228 #31 0x0000000000400849 in _start () try "event->accept()" to prevent further handling. however i don't know how QGraphicsStuff handles this, so it might actually be required to take the item out of moc and use a deleteLater() on it (or pass the click signal through a QTimer::singleShot to get it outside the current event loop From Qt documentation: Calling QEvent::ignore() or QEvent::accept() on event has no effect. It get's further processed and it just crashes somewhere else. I tried with deleteLater and the singleShot and it always just crashed somewhere else. I have now a solution which solves this crash (and probably the other ones, too) but causes kwin to crash on shutdown: diff --git a/client.cpp b/client.cpp index 61656c2..c2c17cf 100644 --- a/client.cpp +++ b/client.cpp @@ -374,7 +374,7 @@ void Client::destroyDecoration() QRect oldgeom = geometry(); if( decoration != NULL ) { - delete decoration; + decoration->deleteLater(); decoration = NULL; QPoint grav = calculateGravitation( true ); border_left = border_right = border_top = border_bottom = 0; SVN commit 1139942 by graesslin: Defer deletion of the AuroraeScene and View to the next event loop. It is possible that the scene get's deleted before processing mouse events is finished which causes crashes. BUG: 242165 FIXED-IN: 4.5.0 CCBUG: 241876 CCBUG: 242116 M +8 -1 aurorae.cpp M +1 -0 aurorae.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1139942 *** Bug 269237 has been marked as a duplicate of this bug. *** re-appeared in 4.6.n (some git master i presume) reopening for the moment... :-( i just counterchecked. this bug does not occur in kwin 4.6.0, just in 4.6.1 *** Bug 271435 has been marked as a duplicate of this bug. *** I don't think it is the same crash as the duplicate is an assert while the original crash was a crash. *** Bug 280704 has been marked as a duplicate of this bug. *** |