Bug 111351 - Crash on undo (and that's what it is, can't add more text to please the wizard, sorry)
Summary: Crash on undo (and that's what it is, can't add more text to please the wizar...
Status: RESOLVED WORKSFORME
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-23 15:14 UTC by Halla Rempt
Modified: 2006-05-21 22:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
An umbrello diagram that can be used to reproduce the crash (388.05 KB, application/x-uml)
2005-08-23 15:15 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2005-08-23 15:14:19 UTC
Version:           svn 3.5 branch of 22/08/2005 (using KDE KDE 3.4.2)
Installed from:    Unlisted Binary Package
Compiler:          g++ 3.3.5 
OS:                Linux

When I undo in Umbrello, I get a crash fairly often. I have attached a file that you can use to reproduce the crash. 

* Select everything on the diagram called QUPA.
* Select copy
* Create a new Collaboration Diagran
* Select paste
* Notice that Umbrello is right, shouldn't have done that, so press undo to remove all the arrows that have been pasted.
* Crash:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1241120064 (LWP 6538)]
[KCrash handler]
#4  0x00000048 in ?? ()
#5  0xb72cf01e in QGList::clear () from /usr/lib/libqt-mt.so.3
#6  0x081724f5 in QPtrList<QCanvasLine>::clear (this=0x8cad4e0)
    at qptrlist.h:93
#7  0x08170ffd in LinePath::cleanup (this=0x8cad4b4) at linepath.cpp:833
#8  0x08127471 in AssociationWidget::cleanup (this=0x8cad228)
    at associationwidget.cpp:768
#9  0x08124dfa in ~AssociationWidget (this=0x8cad228)
    at associationwidget.cpp:128
#10 0xb6fd323e in QWidget::~QWidget () from /usr/lib/libqt-mt.so.3
#11 0xb70d0bff in QScrollView::~QScrollView () from /usr/lib/libqt-mt.so.3
#12 0xb71e5f92 in QCanvasView::~QCanvasView () from /usr/lib/libqt-mt.so.3
#13 0x081d3608 in ~UMLView (this=0x8af19e8) at umlview.cpp:209
#14 0x08161dd1 in QPtrList<UMLView>::deleteItem (this=0x8511a78, d=0x8af19e8)
    at qptrlist.h:150
#15 0xb72cec5c in QGList::remove () from /usr/lib/libqt-mt.so.3
#16 0x081ba22c in QPtrList<UMLView>::remove (this=0x8511a78, d=0x8af19e8)
    at qptrlist.h:85
#17 0x081a9865 in UMLDoc::removeView (this=0x8511a50, view=0x8af19e8, 
    enforceCurrentView=false) at umldoc.cpp:174
#18 0x081b6e20 in UMLDoc::removeAllViews (this=0x8511a50) at umldoc.cpp:2335
#19 0x081a9c87 in UMLDoc::closeDocument (this=0x8511a50) at umldoc.cpp:279
#20 0x081b8c43 in UMLDoc::loadUndoData (this=0x8511a50) at umldoc.cpp:2738
#21 0x081a2251 in UMLApp::slotEditUndo (this=0x850e200) at uml.cpp:819
#22 0x081a62ed in UMLApp::qt_invoke (this=0x850e200, _id=130, _o=0xbfffeb10)
    at uml.moc:321
#23 0xb6f9ab84 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#24 0xb6f9a951 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#25 0xb79dcdcb in KAction::activated () from /usr/lib/libkdeui.so.4
#26 0xb79dc53a in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#27 0xb79dd0b1 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#28 0xb6f9ab84 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#29 0xb6f9a951 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#30 0xb778741b in KAccelPrivate::menuItemActivated ()
   from /usr/lib/libkdecore.so.4
#31 0xb7785c58 in KAccelPrivate::eventFilter () from /usr/lib/libkdecore.so.4
#32 0xb6f98244 in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#33 0xb6f9816c in QObject::event () from /usr/lib/libqt-mt.so.3
#34 0xb6fd938f in QWidget::event () from /usr/lib/libqt-mt.so.3
#35 0xb70b02a2 in QMainWindow::event () from /usr/lib/libqt-mt.so.3
#36 0xb6f32bef in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#37 0xb6f323e4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#38 0xb76ff8a5 in KApplication::notify () from /usr/lib/libkdecore.so.4
#39 0xb6f290d2 in QAccelManager::tryAccelEvent () from /usr/lib/libqt-mt.so.3
#40 0xb6f28965 in qt_tryAccelEvent () from /usr/lib/libqt-mt.so.3
#41 0xb6ebd82c in QETWidget::translateKeyEvent () from /usr/lib/libqt-mt.so.3
#42 0xb6eb8775 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#43 0xb6ed1d9e in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#44 0xb6f47c38 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#45 0xb6f47ae8 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#46 0xb6f32e51 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#47 0x0817c67a in main (argc=7, argv=0xbffffad4) at main.cpp:113

Notice that this isn't the only way to get the crash, I get it fairly often. Maybe it happens when removing a connection, maybe when I remove more than one thing at a time -- I don't know...
Comment 1 Halla Rempt 2005-08-23 15:15:41 UTC
Created attachment 12346 [details]
An umbrello diagram that can be used to reproduce the crash
Comment 2 Halla Rempt 2005-08-23 15:16:30 UTC
Ps. Despite this crash, Umbrello really has improved a lot! I have used it for teaching UML, and I'm really happy to have it around to work with this new project. Colleagues are impressed & jealous :-).
Comment 3 Oliver Kellogg 2005-08-27 22:07:47 UTC
hmm, indeed I see some interesting crashes here :)
Comment 4 Oliver Kellogg 2005-08-28 10:22:09 UTC
Some cleaning was done, in particular by commits 453995 and 454157.
Could you try again? Thanks.
Comment 5 Halla Rempt 2005-09-14 15:08:13 UTC
I'm afraid that with svn of today, I still get a crash:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1233249856 (LWP 31812)]
[KCrash handler]
#4  0x00000241 in ?? ()
#5  0x081727ef in QPtrList<QCanvasLine>::deleteItem (this=0x85c17c0, 
    d=0x85bfd90) at qptrlist.h:150
#6  0xb739012a in QGList::clear () from /usr/lib/libqt-mt.so.3
#7  0x081724f5 in QPtrList<QCanvasLine>::clear (this=0x85c17c0)
    at qptrlist.h:93
#8  0x08170ffd in LinePath::cleanup (this=0x85c1794) at linepath.cpp:833
#9  0x08127471 in AssociationWidget::cleanup (this=0x85c1508)
    at associationwidget.cpp:768
#10 0x08124dfa in ~AssociationWidget (this=0x85c1508)
    at associationwidget.cpp:128
#11 0xb70ced1b in QWidget::~QWidget () from /usr/lib/libqt-mt.so.3
#12 0x08165d76 in ~QFrame (this=0x86eb0b8) at kplayerslideraction.h:112
#13 0xb71cd058 in QScrollView::~QScrollView () from /usr/lib/libqt-mt.so.3
#14 0xb72c78aa in QCanvasView::~QCanvasView () from /usr/lib/libqt-mt.so.3
#15 0x081d3608 in ~UMLView (this=0x86eb0b8) at umlview.cpp:209
#16 0x08161dd1 in QPtrList<UMLView>::deleteItem (this=0x84dfa68, d=0x86eb0b8)
    at qptrlist.h:150
#17 0xb739012a in QGList::clear () from /usr/lib/libqt-mt.so.3
#18 0x08161c59 in QPtrList<UMLView>::clear (this=0x84dfa68) at qptrlist.h:93
#19 0x081b6e41 in UMLDoc::removeAllViews (this=0x84dfa40) at umldoc.cpp:2337
#20 0x081a9c87 in UMLDoc::closeDocument (this=0x84dfa40) at umldoc.cpp:279
#21 0x081b8c43 in UMLDoc::loadUndoData (this=0x84dfa40) at umldoc.cpp:2738
#22 0x081a2251 in UMLApp::slotEditUndo (this=0x84d3468) at uml.cpp:819
#23 0x081a62ed in UMLApp::qt_invoke (this=0x84d3468, _id=130, _o=0xbf93131c)
    at uml.moc:321
#24 0xb7095929 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#25 0xb70963c4 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#26 0xb7970dc9 in KAction::activated () from /usr/lib/libkdeui.so.4
#27 0xb79a57ce in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#28 0xb79c06b4 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#29 0xb7095929 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#30 0xb70963c4 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#31 0xb76d001d in KAccelPrivate::menuItemActivated ()
   from /usr/lib/libkdecore.so.4
#32 0xb7762d7f in KAccelPrivate::eventFilter () from /usr/lib/libkdecore.so.4
#33 0xb7092a72 in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#34 0xb7092af0 in QObject::event () from /usr/lib/libqt-mt.so.3
#35 0xb70d0268 in QWidget::event () from /usr/lib/libqt-mt.so.3
#36 0xb71a027a in QMainWindow::event () from /usr/lib/libqt-mt.so.3
#37 0xb702cf80 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#38 0xb702d30e in QApplication::notify () from /usr/lib/libqt-mt.so.3
#39 0xb7783ae7 in KApplication::notify () from /usr/lib/libkdecore.so.4
#40 0xb77065d7 in KAccelEventHandler::x11Event () from /usr/lib/libkdecore.so.4
#41 0xb778212e in KApplication::x11EventFilter () from /usr/lib/libkdecore.so.4
#42 0xb6fa9db3 in qt_set_x11_event_filter () from /usr/lib/libqt-mt.so.3
#43 0xb6fb6fe4 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#44 0xb6fd0fff in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#45 0xb7044cfb in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#46 0xb7044c1e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#47 0xb702bc13 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#48 0x0817c67a in main (argc=1, argv=0xbf932014) at main.cpp:113
Comment 6 Oliver Kellogg 2005-09-19 04:38:53 UTC
> * Select everything on the diagram called QUPA.

I don't see anything called QUPA in the XMI you attached?
(I see the diagrams: "class diagram","Autorisatieproces",
"Verstrekking medicatieinformatie", "Autorisatie componenten".)
Comment 7 Halla Rempt 2005-09-19 10:24:02 UTC
Zut, I pasted the wrong file... Anyway, it's simple enough to recreate the crash: create a class diagram with two classes and one connection. Select everything, copy and create a collaboration diagram. Paste. Click away the notification and see that only the connection is pasted. Undo. Crash.
Comment 8 Oliver Kellogg 2005-09-19 23:42:23 UTC
SVN commit 462075 by okellogg:

pasteClip4(): If checkPasteWidgets() returns false then remove any
 associations.
CCBUG:111351 - only CCing not closing as there are multitudinous other
ways to produce similar crashes. Boud?


 M  +15 -5     umlclipboard.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/clipboard/umlclipboard.cpp #462074:462075
@@ -478,6 +478,8 @@
 
     if( diagramType != doc->getCurrentView()->getType() ) {
         if( !checkPasteWidgets(widgets) ) {
+            assocs.setAutoDelete(true);
+            assocs.clear();
             return false;
         }
     }
@@ -636,6 +638,7 @@
 }
 
 bool UMLClipboard::checkPasteWidgets( UMLWidgetList & widgetList ) {
+    bool retval = true;
     UMLWidget * p = 0;
     UMLWidgetListIt it( widgetList );
     while ( ( p = it.current()) != 0 ) {
@@ -645,17 +648,24 @@
             break;
 
         case Uml::wt_Text:
-            if( static_cast<FloatingText *>( p )->
-                    getRole() != Uml::tr_Floating )
-                return false;
+            {
+                FloatingText *ft = static_cast<FloatingText*>(p);
+                if (ft->getRole() != Uml::tr_Floating) {
+                    widgetList.remove(p);
+                    delete ft;
+                    retval = false;
+                }
+            }
             break;
 
         default:
-            return false;
+            widgetList.remove(p);
+            delete p;
+            retval = false;
             break;
         }
     }
-    return true;
+    return retval;
 }
 
 void UMLClipboard::pasteItemAlreadyExists() {
Comment 9 Halla Rempt 2005-09-20 10:37:02 UTC
On Monday 19 September 2005 23:42, Oliver Kellogg wrote:
> only CCing not closing as there are multitudinous other
> ways to produce similar crashes. Boud?


I'll report other crashes as I come across them, and I'll update my umbrello 
today.
Comment 10 Halla Rempt 2006-05-19 12:34:30 UTC
I've been using Umbrello on and off almost every month and I haven't experienced crashes of this kind anymore. As far as I'm concerned, you can close the bug.
Comment 11 Oliver Kellogg 2006-05-21 22:54:30 UTC
Thanks.