[Bug 47877] New: PartManager does not inform its parts that it is going to be destroyed

bugzilla at kde.org bugzilla at kde.org
Sun Sep 15 10:13:04 UTC 2002

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
           Summary: PartManager does not inform its parts that it is going
                    to be destroyed
           Product: kdevelop
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at barney.cs.uni-potsdam.de
        ReportedBy: Hornung-Heinz at t-online.de

Version:           gideon HEAD from approximately 13/09/2002 (using KDE KDE 3.0.7)
Installed from:    Compiled From Sources
OS:          Linux

I came accross a bug which causes gideon to crash on leaving. 
The bug is located in the PartManager of kdelib-3.0.7. The PartManager does not inform its parts if it is about to be destroyed. Therefore, a part tries to access its PartManager, even if it is gone. The following patch takes care of this bug:

*** ../../temp/kdelibs-3.0.7/kparts/partmanager.cpp	Mon Aug  5 17:39:45 2002
--- kparts/partmanager.cpp	Sun Sep 15 09:47:08 2002
*** 103,108 ****
--- 103,116 ----

    // core dumps ... setActivePart( 0L );
    qApp->removeEventFilter( this );
+   // Inform all parts that their manager is gone.
+   QPtrListIterator<Part> itpart ( d->m_parts );
+   for ( ; itpart.current() ; ++itpart )
+   {
+       itpart.current()->setManager(0);
+   }
    delete d;

More information about the KDevelop-devel mailing list