Bug 141602 - Umbrello crashes when deleting the link between a package and a class
Summary: Umbrello crashes when deleting the link between a package and a class
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-12 18:56 UTC by Sébastien Watteau
Modified: 2007-02-12 21:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Watteau 2007-02-12 18:56:42 UTC
Version:           1.5.6 (using KDE KDE 3.5.6)
Installed from:    Unlisted Binary Package
OS:                Linux

Umbrello terminates with SIGSEGV when attempting to link a package and a class.

To reproduce this bug:
- Create a new package
- Create a new class
- Select the "Containment" line in the toolbar and draw a line beetween the package and the class
Comment 1 Oliver Kellogg 2007-02-12 19:32:35 UTC
With 1.5.61, creation of containment is okay but deletion crashes.
Comment 2 Oliver Kellogg 2007-02-12 21:30:49 UTC
SVN commit 632977 by okellogg:

removeAssocInViewAndDoc(): UMLListView::moveObject() will delete the containment
 AssociationWidget via UMLView::updateContainment().
BUG:141602


 M  +1 -0      ChangeLog  
 M  +4 -2      umbrello/umlview.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #632976:632977
@@ -1,6 +1,7 @@
 Version 1.5.7
 * Bugs fixed from http://bugs.kde.org:
 * Javascript Code Generation creates bad format methods (135540)
+* Crash when deleting the link between a package and a class (141602)
 
 Version 1.5.61
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlview.cpp #632976:632977
@@ -1767,6 +1767,8 @@
             lv->moveObject( objToBeMoved->getID(),
                             Model_Utils::convert_OT_LVT(objToBeMoved),
                             lv->theLogicalView() );
+            // UMLListView::moveObject() will delete the containment
+            // AssociationWidget via UMLView::updateContainment().
         } else {
             kDebug() << "removeAssocInViewAndDoc(containment): "
                       << "objB is NULL" << endl;
@@ -1774,9 +1776,9 @@
     } else {
         // Remove assoc in doc.
         m_pDoc->removeAssociation(a->getAssociation());
+        // Remove assoc in view.
+        removeAssoc(a);
     }
-    // Remove assoc in view.
-    removeAssoc(a);
 }
 
 /** Removes all the associations related to Widget */