[Uml-devel] [Bug 63897] Crash when trying to associate two classes in a collaboration diagram

David Faure faure at kde.org
Thu Sep 18 07:32:18 UTC 2003


On Thursday 18 September 2003 16:06, you wrote:
> David Faure <faure at kde.org> [030918 15:15]:
> > What about the associations not loaded back bug? I write them out with the
> > current CVS version of umbrello, so surely they should be loaded back?
> 
> What bug number do you mean? If you mean #54573, it only means that the
> connection position of the line to a widget are not restored correctly. Or
> do you mean #63884? I think this one will be fixed by Oliver.

Good timing, I was about to write to you :)
Associations are indeed saved and loaded just fine, now.

But now I get a crash when trying to set a text on an association. The problem is,
I'm not sure exactly how I'm supposed to do that. But I tried "New operation",
and this time I got a dialog. Upon closing it, I got a crash:

#2  0x08126648 in FloatingText::slotMenuSelection(int) (this=0x846d868, sel=1940)
    at /mnt/devel/kde/kdecvs/kdesdk/umbrello/umbrello/floatingtext.cpp:144
144                                     m_pMessage->setOperation( newOperation->toString(st_NoSigNoScope) );

(gdb) p m_pMessage
$1 = (struct MessageWidget *) 0x0

Ouch.

Context:
140                             Uml::UMLObject_Type ot = ListPopupMenu::convert_MT_OT((ListPopupMenu::Menu_Type)sel);
141                             UMLObject* umlObj = m_pView->getDocument()->createUMLObject(c, ot);
142                             UMLOperation* newOperation = dynamic_cast<UMLOperation*>( umlObj );
143                             if (newOperation) {
144                                     m_pMessage->setOperation( newOperation->toString(st_NoSigNoScope) );
145                                     setVisible(getText().length() > 0);
146                                     calculateSize();
147                                     setPositionFromMessage(); //force it to display
148                             }

Backtrace:
#0  0x410f4cde in QString::deref() (this=0x10c) at /mnt/devel/kde/kdecvs/qt-copy/src/tools/qstring.cpp:1523
#1  0x410f4da6 in QString::operator=(QString const&) (this=0x10c, s=@0xbfffe550)
    at /mnt/devel/kde/kdecvs/qt-copy/src/tools/qstring.cpp:1568
#2  0x08126648 in FloatingText::slotMenuSelection(int) (this=0x846d868, sel=1940)
    at /mnt/devel/kde/kdecvs/kdesdk/umbrello/umbrello/floatingtext.cpp:144
#3  0x0814286b in AssociationWidget::slotMenuSelection(int) (this=0x846cfe0, sel=1940)
    at /mnt/devel/kde/kdecvs/kdesdk/umbrello/umbrello/associationwidget.cpp:2439
#4  0x0814746a in AssociationWidget::qt_invoke(int, QUObject*) (this=0x846cfe0, _id=2, _o=0xbfffe820)
    at associationwidget.moc:91
#5  0x40e1b75b in QObject::activate_signal(QConnectionList*, QUObject*) (this=0x840ae40, clist=0x8429e18, o=0xbfffe820)
    at /mnt/devel/kde/kdecvs/qt-copy/src/kernel/qobject.cpp:2333
#6  0x40e1bacd in QObject::activate_signal(int, int) (this=0x840ae40, signal=2, param=1940)
    at /mnt/devel/kde/kdecvs/qt-copy/src/kernel/qobject.cpp:2426
#7  0x41175e81 in QPopupMenu::activated(int) (this=0x840ae40, t0=1940)
    at /mnt/devel/kde/kdecvs/qt-copy/src/.moc/debug-shared-mt/moc_qpopupmenu.cpp:151

[Strangely enough on my previous run "new operation" didn't actually do anything,
I only got the dialog on the 2nd try after restarting umbrello. Hmm, I will valgrind.]

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the umbrello-devel mailing list