Hello, while experimenting with the layout options provided by Plasma, I managed to get a reliable crash, 100% of the time. It seems that using a QGraphicsGridLayout causes a crash right when adding items.
After further investigation, the problem arises when I exceed the size set in self.resize(). In my program, self.resize(125,125) is apparently too little for a Plasma.LineEdit and a Plasma.Label. And as a matter of fact, I reliably obtain the crash if I shrink the applet. Notice that I have no such issues with QGraphicsLinearLayout. BT follows and program is attached. [Thread debugging using libthread_db enabled] [Current thread is 1 (Thread 0xb52dc710 (LWP 21007))] Thread 1 (Thread 0xb52dc710 (LWP 21007)): [KCrash Handler] #6 0xb72cfc8c in QGraphicsLayoutItem::sizePolicy (this=0x83acea8) at graphicsview/qgraphicslayoutitem.cpp:326 #7 0xb72dc0e7 in QGridLayoutItem::sizePolicy (this=0x8339670, orientation=Qt::Vertical) at graphicsview/qgridlayoutengine.cpp:524 #8 0xb72dc15f in QGridLayoutItem::box (this=0x8339670, orientation=Qt::Vertical, constraint=-1) at graphicsview/qgridlayoutengine.cpp:542 #9 0xb72dc3b7 in QGridLayoutItem::geometryWithin (this=0x8339670, x=166, y=15, width=19, height=26, rowDescent=-1) at graphicsview/qgridlayoutengine.cpp:589 #10 0xb72df918 in QGridLayoutEngine::setGeometries (this=0x82f2518, stylein...@0xbf8d058c, contentsgeomet...@0xbf8d0568) at graphicsview/qgridlayoutengine.cpp:970 #11 0xb72e6aef in QGraphicsGridLayout::setGeometry (this=0x82ce928, re...@0xbf8d0628) at graphicsview/qgraphicsgridlayout.cpp:577 #12 0xa96ada9f in ?? () from /usr/lib/python2.6/site-packages/PyQt4/QtGui.so #13 0xb72ce8ac in QGraphicsLayout::widgetEvent (this=0x82ce928, e=0xbf8d0ae0) at graphicsview/qgraphicslayout.cpp:329 #14 0xa96ad8b7 in ?? () from /usr/lib/python2.6/site-packages/PyQt4/QtGui.so #15 0xb72d3d13 in QGraphicsWidget::event (this=0x8163448, event=0xbf8d0ae0) at graphicsview/qgraphicswidget.cpp:1166 #16 0xb6d13d0c in QApplicationPrivate::notify_helper (this=0x8060960, receiver=0x8163448, e=0xbf8d0ae0) at kernel/qapplication.cpp:3803 #17 0xb6d1bb6e in QApplication::notify (this=0xbf8d149c, receiver=0x8163448, e=0xbf8d0ae0) at kernel/qapplication.cpp:3393 #18 0xb7da58fd in KApplication::notify (this=0xbf8d149c, receiver=0x8163448, event=0xbf8d0ae0) at /usr/src/debug/kdelibs-4.1.96/kdeui/kernel/kapplication.cpp:307 #19 0xb763b231 in QCoreApplication::notifyInternal (this=0xbf8d149c, receiver=0x8163448, event=0xbf8d0ae0) at kernel/qcoreapplication.cpp:586 #20 0xb6d1ec5e in QCoreApplication::sendEvent (receiver=0x8163448, event=0x2010202) at ../../src/corelib/kernel/qcoreapplication.h:208 #21 0xb72d4df6 in QGraphicsWidget::setGeometry (this=0x8163448, re...@0xbf8d0bd8) at graphicsview/qgraphicswidget.cpp:307 #22 0xb72d2331 in QGraphicsWidget::resize (this=0x8163448, si...@0xbf8d0c40) at graphicsview/qgraphicswidget.cpp:249 #23 0x0804c2eb in FullView::resizeEvent (this=0xbf8d1444, event=0xbf8d1194) at /usr/src/debug/kdebase- workspace-4.1.96/plasma/shells/plasmoidviewer/fullview.cpp:143 #24 0xb6d6bc7c in QWidget::event (this=0xbf8d1444, event=0xbf8d1194) at kernel/qwidget.cpp:7302 #25 0xb70a3783 in QFrame::event (this=0xbf8d1444, e=0xbf8d1194) at widgets/qframe.cpp:650 #26 0xb7139f1f in QAbstractScrollArea::viewportEvent (this=0xbf8d1444, e=0x2010202) at widgets/qabstractscrollarea.cpp:942 #27 0xb72c753f in QGraphicsView::viewportEvent (this=0xbf8d1444, event=0xbf8d1194) at graphicsview/qgraphicsview.cpp:2336 #28 0xb713c4c5 in QAbstractScrollAreaFilter::eventFilter (this=0x80d52d8, o=0x80db6c8, e=0xbf8d1194) at widgets/qabstractscrollarea_p.h:95 #29 0xb763a40a in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x8060960, receiver=0x80db6c8, event=0xbf8d1194) at kernel/qcoreapplication.cpp:700 #30 0xb6d13cea in QApplicationPrivate::notify_helper (this=0x8060960, receiver=0x80db6c8, e=0xbf8d1194) at kernel/qapplication.cpp:3799 #31 0xb6d1bc3a in QApplication::notify (this=0xbf8d149c, receiver=0x80db6c8, e=0xbf8d1194) at kernel/qapplication.cpp:3768 #32 0xb7da58fd in KApplication::notify (this=0xbf8d149c, receiver=0x80db6c8, event=0xbf8d1194) at /usr/src/debug/kdelibs-4.1.96/kdeui/kernel/kapplication.cpp:307 #33 0xb763b231 in QCoreApplication::notifyInternal (this=0xbf8d149c, receiver=0x80db6c8, event=0xbf8d1194) at kernel/qcoreapplication.cpp:586 #34 0xb6d6660c in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x80d5408, recursive=false, disableUpdates=false) at ../../src/corelib/kernel/qcoreapplication.h:208 #35 0xb6d6ecc6 in QWidgetPrivate::show_helper (this=0x80d5408) at kernel/qwidget.cpp:6302 #36 0xb6d6f3c3 in QWidget::setVisible (this=0x80db6c8, visible=true) at kernel/qwidget.cpp:6577 #37 0xb6d6f198 in QWidgetPrivate::showChildren (this=0x80db998, spontaneous=false) at ../../src/gui/kernel/qwidget.h:463 #38 0xb6d6ecf1 in QWidgetPrivate::show_helper (this=0x80db998) at kernel/qwidget.cpp:6308 #39 0xb6d6f3c3 in QWidget::setVisible (this=0xbf8d1444, visible=true) at kernel/qwidget.cpp:6577 #40 0x0804e6fc in main (argc=2, argv=0xbf8d17d4) at /usr/include/QtGui/qwidget.h:464
# # Copyright (C) 2005,2006,2007 by Siraj Razick # Copyright 2008 Simon Edwards <si...@simonzone.com> (Translated to Python) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # from PyQt4.QtCore import * from PyQt4.QtGui import * from PyKDE4.kdecore import * from PyKDE4.kdeui import * from PyKDE4.plasma import Plasma from PyKDE4 import plasmascript class HelloWorldApplet(plasmascript.Applet): def __init__(self,parent,args=None): plasmascript.Applet.__init__(self,parent) def init(self): self.setHasConfigurationInterface(False) self.setAspectRatioMode(Plasma.Square) self.theme = Plasma.Svg(self) self.theme.setImagePath("widgets/background") self.setBackgroundHints(Plasma.Applet.DefaultBackground) #self.layout = QGraphicsLinearLayout(Qt.Horizontal, self.applet) #label = Plasma.Label(self.applet) #label.setText("Hello world!") #self.layout.addItem(label) self.layout = QGraphicsGridLayout(self.applet) self.lineEdit = Plasma.LineEdit(self.applet) label = Plasma.Label(self.applet) label.setText("Go!") self.layout.addItem(label, 0, 0) self.layout.addItem(self.lineEdit, 0, 1) # This is enough to crash it: set X size it to 200 and it won't self.resize(125,125) def CreateApplet(parent): return HelloWorldApplet(parent)
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel