Bug 146386 - automatic generated composition won't be deleted when changing the attributes data type
Summary: automatic generated composition won't be deleted when changing the attributes...
Status: CONFIRMED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-05 10:24 UTC by savar
Modified: 2021-03-09 07:00 UTC (History)
1 user (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 savar 2007-06-05 10:24:08 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 4.1.3 20070601 (prerelease) (Debian 4.1.2-11) 
OS:                Linux

Hi,

when I add an Attribute to a class in the class diagram which is of type of another class in the same diagram it generates an composition between it. That's correct, but if you change the type of the attribute after this, the association won't be deleted. That's a fault AND

when you then click the association and delete it the app crashes with sig sev. It seems to me, that the app tries to delete something which isn't there anymore.

\s

Backtrace:

...
[KCrash handler]
#5  0x085fd090 in ?? ()
#6  0x08176c3d in AssociationWidget::saveToXMI ()
#7  0x0813982d in UMLView::saveToXMI ()
#8  0x081571cd in UMLFolder::saveContents ()
#9  0x081573a2 in UMLFolder::save ()
#10 0x081c9db0 in UMLFolder::saveToXMI ()
#11 0x08184a38 in UMLDoc::saveToXMI ()
#12 0x08161017 in UMLDoc::addToUndoStack ()
#13 0x081610bc in UMLDoc::setModified ()
#14 0x081b78e3 in UMLView::removeWidget ()
#15 0x081b7501 in AssociationWidget::cleanup ()
#16 0x081b761a in UMLView::removeAssoc ()
#17 0x081b859d in UMLView::deleteSelection ()
#18 0x081b8673 in UMLApp::slotDeleteSelectedWidget ()
#19 0x081f1005 in UMLApp::qt_invoke ()
#20 0xb7730e1b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#21 0xb77318ac in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#22 0xb67fa729 in KAction::activated () from /usr/lib/libkdeui.so.4
#23 0xb682fb02 in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#24 0xb68fc06f in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#25 0xb7730e1b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#26 0xb77318ac in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#27 0xb7d9df49 in KAccelPrivate::menuItemActivated ()
   from /usr/lib/libkdecore.so.4
#28 0xb7dee3f7 in KAccelPrivate::emitActivatedSignal ()
   from /usr/lib/libkdecore.so.4
#29 0xb7e87dde in KAccelPrivate::eventFilter () from /usr/lib/libkdecore.so.4
#30 0xb77303ce in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#31 0xb773044c in QObject::event () from /usr/lib/libqt-mt.so.3
#32 0xb77676de in QWidget::event () from /usr/lib/libqt-mt.so.3
#33 0xb783c988 in QMainWindow::event () from /usr/lib/libqt-mt.so.3
#34 0xb76c8cf2 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#35 0xb76caca6 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#36 0xb7e6a142 in KApplication::notify () from /usr/lib/libkdecore.so.4
#37 0xb7dfa4b7 in KAccelEventHandler::x11Event () from /usr/lib/libkdecore.so.4
#38 0xb7e51483 in KApplication::x11EventFilter () from /usr/lib/libkdecore.so.4
#39 0xb7649223 in ?? () from /usr/lib/libqt-mt.so.3
#40 0xbf9d6d54 in ?? ()
#41 0xbf9d6ba8 in ?? ()
#42 0x00000001 in ?? ()
#43 0xb7bf55a4 in ?? () from /usr/lib/libqt-mt.so.3
#44 0xbf9d6ba8 in ?? ()
#45 0xb7bf55a4 in ?? () from /usr/lib/libqt-mt.so.3
#46 0xbf9d6ad8 in ?? ()
#47 0xb765914b in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
Backtrace stopped: frame did not save the PC
Comment 1 Ralf Habacker 2013-08-14 21:04:37 UTC
Do not crash with recent git source anymore. 
Association is still not removed.
Comment 2 Ralf Habacker 2013-08-15 14:41:36 UTC
After looking into this stuff i found out that there is a problem with the create-auto-associations logic. 

In bool UMLAttributeDialog::apply() a rename of an attribute type (the referenced class) is applied to the model and widgets. m_pAttribute->setName, setType and other methods  emits the UMLObject::modified() signal, which is connected to UMLWidget::updateWidget(), which itself calls UMLScene::createAutoAssociations(). 

createAutoAssociations() add's an AssociationWidget instance for each class attribute, if the related class widget is displayed. Unfortunally it do not remove outdated associations, which should happens before.
Comment 3 Justin Zobel 2021-03-09 07:00:36 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.