From kde-core-devel Fri Nov 08 19:04:20 2002 From: Ravikiran Rajagopal Date: Fri, 08 Nov 2002 19:04:20 +0000 To: kde-core-devel Subject: KJanusWidget problem (also with noatun/kopete): showstopper? X-MARC-Message: https://marc.info/?l=kde-core-devel&m=103678273823118 Hello, I am reposting this here following the advice of Martijn Klingens: http://lists.kde.org/?l=kde-devel&m=103678129321270&w=2 There seems to be a problem in qSmartMinisize in Qt-copy or kdelibs HEAD that affects quite a few applications. Specifically this triggers a crash on exit in noatun & kopete atleast. I cannot verify whether this is KDE-related or Qt-related. Here is example code that works perfectly with Qt-3.0.5 and KDE-3.0.3 but crashes & burns on Qt-copy and CVS HEAD: -------------------------------------------------------------------------------- #include #include #include #include #include #include int main( int argc, char **argv ) { KApplication *app = new KApplication( argc, argv, "Testing" ); KJanusWidget *wid = new KJanusWidget(0,0,KJanusWidget::TreeList); app->setMainWidget( wid ); QStringList list1, list2; list1 << "level1" << "page"; list2 << "level2" << "page"; QHBox *box1, *box2; box1 = wid->addHBoxPage(list1); new QTextEdit(box1); box2 = wid->addHBoxPage(list2); new QTextEdit(box2); wid->show(); delete box1; wid->hide(); wid->show(); kdDebug() << "After deletion" << endl; return app->exec(); } -------------------------------------------------------------------------------- Valgrinding gives the output posted at: http://lists.kde.org/?l=kde-devel&m=103677913418828&w=2 It is interesting to note that the call that fails is actually the first one that attempts to access the data members of the widget. I think that the widget has already been deleted, and the parent's layout has probably not updated the list of children. I can produce a similar backtrace from noatun & kopete crashes on exit. Ravi