Version: 1.5.7beta1 (using KDE KDE 3.5.1) Installed from: Compiled From Sources Compiler: gcc 4.1.0 OS: Linux The class diagram have two classes C1 and C2. For C2 an operation op() is defined. Now I create a new sequence diagram, put two objects (:C1, :C2) from both classes (C1, C2) into and try to insert a message from ":C1" to ":C2". The result is a umbrello crash with following message umbrello: MessageWidget::activate: role A object not found KCrash: Application 'umbrello' crashing...
Cannot confirm. Tried with an existing XMI file, and also tried with two new classes created ad-hoc.
Perhaps you could attach the XMI file for which this happens to you.
Ouch. Forget my previous comments, I do confirm. #0 0x0816bbe1 in FloatingTextWidget::showOpDlg (this=0x0) at /kdesdk-3.5-branch/umbrello/umbrello/floatingtextwidget.cpp:272 #1 0x081acc7b in ToolBarStateMessages::setSecondWidget (this=0x8744ea0, secondObject=0x89def50, messageType=NormalMessage) at /kdesdk-3.5-branch/umbrello/umbrello/toolbarstatemessages.cpp:147 #2 0x081aca01 in ToolBarStateMessages::mouseReleaseWidget (this=0x8744ea0) at /kdesdk-3.5-branch/umbrello/umbrello/toolbarstatemessages.cpp:106 #3 0x081a9979 in ToolBarState::mouseRelease (this=0x8744ea0, ome=0xbfffe210) at /kdesdk-3.5-branch/umbrello/umbrello/toolbarstate.cpp:84 #4 0x081e2de2 in UMLView::contentsMouseReleaseEvent (this=0x89ae888, ome=0xbfffe210) at /kdesdk-3.5-branch/umbrello/umbrello/umlview.cpp:381 #5 0x40f81168 in QScrollView::viewportMouseReleaseEvent () from /usr/lib/qt3/lib/libqt-mt.so.3
SVN commit 654857 by okellogg: activate(): Attempt resolving m_widget{A,B}Id only if the m_pOw[] is NULL. BUG:144293 M +1 -0 ChangeLog M +26 -22 umbrello/messagewidget.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #654856:654857 @@ -30,6 +30,7 @@ * Support duplication of diagrams (139856, 143581) * Crash on changing multiplicity in an association in ERD (143909) * Class diagram in folder not loaded correctly from xmi (144119) +* Sequence diagram crashs during message inserting (144293) Version 1.5.61 --- branches/KDE/3.5/kdesdk/umbrello/umbrello/messagewidget.cpp #654856:654857 @@ -407,35 +407,39 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) { m_pView->resetPastePoint(); // UMLWidget::activate(Log); CHECK: I don't think we need this ? - UMLWidget *pWA = m_pView->findWidget(m_widgetAId); - if (pWA == NULL) { - kDebug() << "MessageWidget::activate: role A object " - << ID2STR(m_widgetAId) << " not found" << endl; - return false; - } - UMLWidget *pWB = m_pView->findWidget(m_widgetBId); - if (pWB == NULL) { - kDebug() << "MessageWidget::activate: role B object " - << ID2STR(m_widgetBId) << " not found" << endl; - return false; - } - m_pOw[Uml::A] = dynamic_cast<ObjectWidget*>(pWA); if (m_pOw[Uml::A] == NULL) { - kDebug() << "MessageWidget::activate: role A widget " - << ID2STR(m_widgetAId) << " is not an ObjectWidget" << endl; - return false; + UMLWidget *pWA = m_pView->findWidget(m_widgetAId); + if (pWA == NULL) { + kDebug() << "MessageWidget::activate: role A object " + << ID2STR(m_widgetAId) << " not found" << endl; + return false; + } + m_pOw[Uml::A] = dynamic_cast<ObjectWidget*>(pWA); + if (m_pOw[Uml::A] == NULL) { + kDebug() << "MessageWidget::activate: role A widget " + << ID2STR(m_widgetAId) << " is not an ObjectWidget" << endl; + return false; + } } - m_pOw[Uml::B] = dynamic_cast<ObjectWidget*>(pWB); if (m_pOw[Uml::B] == NULL) { - kDebug() << "MessageWidget::activate: role B widget " - << ID2STR(m_widgetBId) << " is not an ObjectWidget" << endl; - return false; + UMLWidget *pWB = m_pView->findWidget(m_widgetBId); + if (pWB == NULL) { + kDebug() << "MessageWidget::activate: role B object " + << ID2STR(m_widgetBId) << " not found" << endl; + return false; + } + m_pOw[Uml::B] = dynamic_cast<ObjectWidget*>(pWB); + if (m_pOw[Uml::B] == NULL) { + kDebug() << "MessageWidget::activate: role B widget " + << ID2STR(m_widgetBId) << " is not an ObjectWidget" << endl; + return false; + } } updateResizability(); - UMLClassifier *c = dynamic_cast<UMLClassifier*>(pWB->getUMLObject()); + UMLClassifier *c = dynamic_cast<UMLClassifier*>(m_pOw[Uml::B]->getUMLObject()); UMLOperation *op = NULL; - if (c) { + if (c && !m_CustomOp.isEmpty()) { Uml::IDType opId = STR2ID(m_CustomOp); op = dynamic_cast<UMLOperation*>( c->findChildObjectById(opId, true) ); if (op) {