crash, bt and patch

Jens Dagerbo jens.dagerbo at swipnet.se
Sat Apr 18 02:38:23 UTC 2009


Hi all!

I took a stroll through KDev4 tonight, and I must say it looks fantastic in 
parts. Very impressive!

Of course it didn't take long to crash it though. After a while I figured out 
what I was doing to cause it and reproduced it:

1. do some action that creates an outputview (I did 'run' on my testapp.)
2. close the outputview
3. repeat step 1.
-> KDevelop crashes with this bt:
  Thread 1 (Thread 0x7f7027294700 (LWP 31066)):
[KCrash Handler]
#5  0x00007f70236f2f82 in QAbstractItemView::model () 
from /usr/lib64/qt4/libQtGui.so.4
#6  0x00007f7013e5a29d in OutputWidget::rowsInserted (this=0x3820ac0, 
parent=@0x7fff2f3f4040, from=0, to=0) 
at /home/kdedev/devel/KDE/kdevplatform/plugins/standardoutputview/outputwidget.cpp:415
#7  0x00007f7013e5ba47 in OutputWidget::qt_metacall (this=0x3820ac0, 
_c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x7fff2f3f4010) 
at /home/kdedev/devel/KDE/kdevplatform/build/plugins/standardoutputview/outputwidget.moc:96
#8  0x00007f7024157cc5 in QMetaObject::activate () 
from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007f70241891f4 in QAbstractItemModel::rowsInserted () 
from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007f7024142a84 in QAbstractItemModel::endInsertRows () 
from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007f702377bcdf in ?? () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007f7023780628 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007f7023782f01 in QStandardItemModel::insertRows () 
from /usr/lib64/qt4/libQtGui.so.4
...

The following patch avoids the crash:
Index: outputwidget.cpp
===================================================================
--- outputwidget.cpp    (revision 955540)
+++ outputwidget.cpp    (working copy)
@@ -167,6 +167,7 @@
                 stackwidget->removeWidget( w );
             }
             delete w;
+            views.remove(id);
         } else
         {
             views.value( id )->setModel( 0 );



I'm fairly certain the fix is correct and I still have an SVN account, but I 
didn't want to commit anything without checking first.


// jens






More information about the KDevelop-devel mailing list