[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Konqueror segfaults
From:       Maks Orlovich <mo002j () mail ! rochester ! edu>
Date:       2002-10-06 15:42:54
[Download RAW message or body]

Till Krech wrote:

> On Sunday 06 October 2002 16:04, Shu-yu Guo wrote:
>> Hello,
>>
>> Upon trying 3.1-beta2, konqueror crashes with a segfault upon exit. So, I
>> decided to switch back to branch, unfortunately, this happens in branch
>> as well. The backtrace in branch is different, and I have no idea what is
>> causing this, though I'm leaning towards qt since that has changed since
>> last time I used branch.
>>
>> FreeBSD 4.7-PRERELEASE,
>> gcc version 2.95.4 20020320 [FreeBSD]
>> KDE_3_0_BRANCH built from CVS
>> qt-copy 3.1.0-b2
> Same here.
> The following code, enhanced with debug output to track down the problem,
> is in kdebase/konqueror/konq_main.cc . Look at the comment!
> -------------------------------------------------------------
>   app.exec();
> 
>  //// Temporary code, waiting for Qt to do this properly
> 
>   // Delete all toplevel widgets that have WDestructiveClose, so that we
>   don't have // any parts loaded when KLibLoader::cleanUp is called.
>   QWidgetList *list = QApplication::topLevelWidgets();
>   QWidgetListIt it(*list);
>   QWidget * w;
> 
>   qDebug( "count: %i", list->count() );
>   int i=0;
>   while( (w=it.current()) != 0 ) {
>      ++it;
>      ++i;
>      qDebug( "#%3i: Class: %s, Name: %s", i, w->className(), w->name() );
>      if ( w->testWFlags( Qt::WDestructiveClose ) )
>           delete w;
>   }··
> 
>   KonqMainWindow::s_crashlog_file->remove();

Adding: 

@@ -137,6 +139,7 @@ int main( int argc, char **argv )
   QWidgetListIt it(*list);
   QWidget * w;
   while( (w=it.current()) != 0 ) {
+     qDebug("Testing:%s, flags=%d", w->className(),  w->testWFlags( 
Qt::WDestructiveClose ) );
      ++it;
      if ( w->testWFlags( Qt::WDestructiveClose ) )
           delete w;

In the debug output I get:
....
Testing:QWidget, flags=0
Testing:KonqMainWindow, flags=0
Testing:KPopupMenu, flags=0
......

But in KonqMainWindow ctor, we have:
KonqMainWindow::KonqMainWindow( const KURL &initialURL, bool openInitialURL, 
const char *name )
 : KParts::MainWindow( name, WDestructiveClose | WStyle_ContextHelp )

So it probably somehow gets cleared or lost..



 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic