Crash with Python scripting

Luca Beltrame einar at heavensinferno.net
Sun Jan 18 23:42:25 CET 2009


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, 
styleInfo=@0xbf8d058c, contentsGeometry=@0xbf8d0568) at 
graphicsview/qgridlayoutengine.cpp:970
#11 0xb72e6aef in QGraphicsGridLayout::setGeometry (this=0x82ce928, 
rect=@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, 
rect=@0xbf8d0bd8) at graphicsview/qgraphicswidget.cpp:307
#22 0xb72d2331 in QGraphicsWidget::resize (this=0x8163448, size=@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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.py
Type: text/x-python
Size: 2071 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090118/ade1ed8f/attachment-0001.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090118/ade1ed8f/attachment-0001.sig 


More information about the Plasma-devel mailing list