Bug 145762 - Crash on deleting class in list view
Summary: Crash on deleting class in list view
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
: 128244 146208 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-21 21:50 UTC by Oliver Kellogg
Modified: 2007-06-01 20:45 UTC (History)
2 users (show)

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 Oliver Kellogg 2007-05-21 21:50:44 UTC
Version:           1.5.7 (using KDE KDE 3.5.7)
Installed from:    Compiled From Sources

Load attachment 20639 [details] from bug 145709.
Delete the Plugin class from the Logical View in the left panel.

[KCrash handler]
#4  0x08139425 in AssociationWidget::saveToXMI (this=0x87d4950,
    qDoc=@0xbfffd6b0, qElement=@0xbfffd000)
    at /kdesdk-3.5-branch/umbrello/umbrello/associationwidget.cpp:3302
#5  0x081edce3 in UMLView::saveToXMI (this=0x87580e0, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd0e0)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:2957
#6  0x0816e57a in UMLFolder::saveContents (this=0x8753d90, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd130)
    at /kdesdk-3.5-branch/umbrello/umbrello/folder.cpp:192
#7  0x0816e743 in UMLFolder::save (this=0x8753d90, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd330)
    at /kdesdk-3.5-branch/umbrello/umbrello/folder.cpp:208
#8  0x0816e7cc in UMLFolder::saveToXMI (this=0x8753d90, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd330)
    at /kdesdk-3.5-branch/umbrello/umbrello/folder.cpp:214
#9  0x0816e41c in UMLFolder::saveContents (this=0x84e2188, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd370)
    at /kdesdk-3.5-branch/umbrello/umbrello/folder.cpp:182
#10 0x0816e743 in UMLFolder::save (this=0x84e2188, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd5d0)
    at /kdesdk-3.5-branch/umbrello/umbrello/folder.cpp:208
#11 0x0816e7cc in UMLFolder::saveToXMI (this=0x84e2188, qDoc=@0xbfffd6b0,
    qElement=@0xbfffd5d0)
    at /kdesdk-3.5-branch/umbrello/umbrello/folder.cpp:214
#12 0x081c3340 in UMLDoc::saveToXMI (this=0x84e1f80, file=@0x86e0468)
    at /kdesdk-3.5-branch/umbrello/umbrello/umldoc.cpp:1307
#13 0x081c8ae0 in UMLDoc::addToUndoStack (this=0x84e1f80)
    at /kdesdk-3.5-branch/umbrello/umbrello/umldoc.cpp:2150
#14 0x081c7a39 in UMLDoc::setModified (this=0x84e1f80, modified=true,
    addToUndo=true)
    at /kdesdk-3.5-branch/umbrello/umbrello/umldoc.cpp:1941
#15 0x081e5a0a in UMLView::removeWidget (this=0x87580e0, o=0x87d5478)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:828
#16 0x0812fdbc in AssociationWidget::cleanup (this=0x87d4950)
    at /kdesdk-3.5-branch/umbrello/umbrello/associationwidget.cpp:740
#17 0x081e9679 in UMLView::removeAssoc (this=0x87580e0, pAssoc=0x87d4950)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:1756
#18 0x081e987a in UMLView::removeAssociations (this=0x87580e0,
    Widget=0x87d2958)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:1796
#19 0x081e5905 in UMLView::removeWidget (this=0x87580e0, o=0x87d2958)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:813
#20 0x081e40f0 in UMLView::slotObjectRemoved (this=0x87580e0, o=0x8753738)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:509
#21 0x081f18ad in UMLView::qt_invoke (this=0x87580e0, _id=70, _o=0xbfffd9a0)
    at /kdesdk-3.5-branch/umbrello/umbrello/umlview.moc:252
#22 0x40e640aa in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x081c9d01 in UMLDoc::sigObjectRemoved (this=0x84e1f80, t0=0x8753738)
    at /kdesdk-3.5-branch/umbrello/umbrello/umldoc.moc:219
#24 0x081c2464 in UMLDoc::removeUMLObject (this=0x84e1f80, umlobject=0x8753738)
    at /kdesdk-3.5-branch/umbrello/umbrello/umldoc.cpp:1180
#25 0x081d6264 in UMLListView::deleteItem (this=0x850ae58, temp=0x8768258)
    at /kdesdk-3.5-branch/umbrello/umbrello/umllistview.cpp:2640
#26 0x081ccc57 in UMLListView::popupMenuSel (this=0x850ae58, sel=87)
    at /kdesdk-3.5-branch/umbrello/umbrello/umllistview.cpp:426
#27 0x081d65bb in UMLListView::qt_invoke (this=0x850ae58, _id=115,
    _o=0xbfffe110)
    at /kdesdk-3.5-branch/umbrello/umbrello/umllistview.moc:165
#28 0x40e6415e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0x40e6478d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0x411cdfa0 in QPopupMenu::activated () from /usr/lib/qt3/lib/libqt-mt.so.3
#31 0x40f7439f in QPopupMenu::actSig () from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0x40f749f9 in QPopupMenu::mouseReleaseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#33 0x4084f6b4 in KPopupMenu::mouseReleaseEvent ()
   from /opt/kde3/lib/libkdeui.so.4
#34 0x40e9a6c5 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0x40e00faf in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0x40e034b6 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0x40a8c6b1 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#38 0x40d9e50b in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#39 0x40d9d146 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#40 0x40dadc38 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#41 0x40e190a1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#42 0x40e18ee6 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#43 0x40e02b9f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#44 0x081873bf in main (argc=2, argv=0xbfffef04)
    at /kdesdk-3.5-branch/umbrello/umbrello/main.cpp:137

valgrind --tool=memcheck --num-callers=32
Invalid read of size 4
 at 0x8139413: AssociationWidget::saveToXMI(QDomDocument&, QDomElement&) (associationwidget.cpp:3302)
 by 0x81EDCE2: UMLView::saveToXMI(QDomDocument&, QDomElement&) (umlview.cpp:2957)
 by 0x816E579: UMLFolder::saveContents(QDomDocument&, QDomElement&) (folder.cpp:192)
 by 0x816E742: UMLFolder::save(QDomDocument&, QDomElement&) (folder.cpp:208)
 by 0x816E7CB: UMLFolder::saveToXMI(QDomDocument&, QDomElement&) (folder.cpp:214)
 by 0x816E41B: UMLFolder::saveContents(QDomDocument&, QDomElement&) (folder.cpp:182)
 by 0x816E742: UMLFolder::save(QDomDocument&, QDomElement&) (folder.cpp:208)
 by 0x816E7CB: UMLFolder::saveToXMI(QDomDocument&, QDomElement&) (folder.cpp:214)
 by 0x81C333F: UMLDoc::saveToXMI(QIODevice&) (umldoc.cpp:1307)
 by 0x81C8ADF: UMLDoc::addToUndoStack() (umldoc.cpp:2150)
 by 0x81C7A38: UMLDoc::setModified(bool, bool) (umldoc.cpp:1941)
 by 0x81E5A09: UMLView::removeWidget(UMLWidget*) (umlview.cpp:828)
 by 0x812FDBB: AssociationWidget::cleanup() (associationwidget.cpp:740)
 by 0x81E9678: UMLView::removeAssoc(AssociationWidget*) (umlview.cpp:1756)
 by 0x81E9879: UMLView::removeAssociations(UMLWidget*) (umlview.cpp:1796)
 by 0x81E5904: UMLView::removeWidget(UMLWidget*) (umlview.cpp:813)
 by 0x81E40EF: UMLView::slotObjectRemoved(UMLObject*) (umlview.cpp:509)
 by 0x81F18AC: UMLView::qt_invoke(int, QUObject*) (umlview.moc:252)
 by 0x4E6B0A9: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x81C9D00: UMLDoc::sigObjectRemoved(UMLObject*) (umldoc.moc:219)
 by 0x81C2463: UMLDoc::removeUMLObject(UMLObject*) (umldoc.cpp:1180)
 by 0x81D6263: UMLListView::deleteItem(UMLListViewItem*) (umllistview.cpp:2640)
 by 0x81CCC56: UMLListView::popupMenuSel(int) (umllistview.cpp:426)
 by 0x81D65BA: UMLListView::qt_invoke(int, QUObject*) (umllistview.moc:165)
 by 0x4E6B15D: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x4E6B78C: QObject::activate_signal(int, int) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x51D4F9F: QPopupMenu::activated(int) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x4F7B39E: QPopupMenu::actSig(int, bool) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x4F7B9F8: QPopupMenu::mouseReleaseEvent(QMouseEvent*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x48566B3: KPopupMenu::mouseReleaseEvent(QMouseEvent*) (in /opt/kde3/lib/libkdeui.so.4.2.0)
 by 0x4EA16C4: QWidget::event(QEvent*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x4E07FAE: QApplication::internalNotify(QObject*, QEvent*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x4E0A4B5: QApplication::notify(QObject*, QEvent*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
Address 0x755F4B0 is 0 bytes inside a block of size 276 free'd
 at 0x401D397: operator delete(void*) (vg_replace_malloc.c:244)
 by 0x816AE76: FloatingTextWidget::~FloatingTextWidget() (floatingtextwidget.cpp:67)
 by 0x8126E2F: QPtrList<UMLWidget>::deleteItem(void*) (qptrlist.h:150)
 by 0x513526B: QGList::remove(void*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x81F1DA4: QPtrList<UMLWidget>::remove(UMLWidget const*) (qptrlist.h:85)
 by 0x81E59F1: UMLView::removeWidget(UMLWidget*) (umlview.cpp:827)
 by 0x812FDBB: AssociationWidget::cleanup() (associationwidget.cpp:740)
 by 0x81E9678: UMLView::removeAssoc(AssociationWidget*) (umlview.cpp:1756)
 by 0x81E9879: UMLView::removeAssociations(UMLWidget*) (umlview.cpp:1796)
 by 0x81E5904: UMLView::removeWidget(UMLWidget*) (umlview.cpp:813)
 by 0x81E40EF: UMLView::slotObjectRemoved(UMLObject*) (umlview.cpp:509)
 by 0x81F18AC: UMLView::qt_invoke(int, QUObject*) (umlview.moc:252)
 by 0x4E6B0A9: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
 by 0x81C9D00: UMLDoc::sigObjectRemoved(UMLObject*) (umldoc.moc:219)
 by 0x81C2463: UMLDoc::removeUMLObject(UMLObject*) (umldoc.cpp:1180)
 by 0x81D6263: UMLListView::deleteItem(UMLListViewItem*) (umllistview.cpp:2640)
 by 0x81CCC56: UMLListView::popupMenuSel(int) (umllistview.cpp:426)
Comment 1 Oliver Kellogg 2007-05-21 22:00:21 UTC
SVN commit 667075 by okellogg:

Revert the part of r663014 that introduced m_{Widget,Message}List.setAutoDelete(true).
The Undo mechanism cannot deal with it.
BUG:145762


 M  +5 -0      ChangeLog  
 M  +1 -1      VERSION  
 M  +3 -2      umbrello/umlview.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #667074:667075
@@ -1,3 +1,8 @@
+Version 1.5.71
+
+* Bugs/wishes from http://bugs.kde.org:
+* Crash on deleting class in list view (145762)
+
 Version 1.5.7
 
 * Bugs/wishes from http://bugs.kde.org:
--- branches/KDE/3.5/kdesdk/umbrello/VERSION #667074:667075
@@ -1 +1 @@
-1.5.7
+1.5.71
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlview.cpp #667074:667075
@@ -131,8 +131,6 @@
 
     // Initialize other data
     m_AssociationList.setAutoDelete( true );
-    m_WidgetList.setAutoDelete( true );
-    m_MessageList.setAutoDelete( true );
 
     //Setup up booleans
     m_bChildDisplayedDoc = false;
@@ -697,6 +695,7 @@
         //make sure not in selected list
         m_SelectedList.remove(obj);
         m_MessageList.remove(obj);
+        delete obj;
     }
 }
 
@@ -826,6 +825,7 @@
     else
         m_WidgetList.remove(o);
     m_pDoc->setModified();
+    delete o;
 }
 
 bool UMLView::getUseFillColor() const {
@@ -1367,6 +1367,7 @@
             obj->setVisible(true);
         } else {
             m_WidgetList.remove(obj);
+            delete obj;
         }
     }//end while
 
Comment 2 Oliver Kellogg 2007-05-21 22:07:11 UTC
Oops, forgot to say: Only happens when Undo is enabled.
Comment 3 Bram Schoenmakers 2007-05-31 19:01:18 UTC
*** Bug 146208 has been marked as a duplicate of this bug. ***
Comment 4 Oliver Kellogg 2007-06-01 20:45:28 UTC
*** Bug 128244 has been marked as a duplicate of this bug. ***