Version: 3.5.3 (using KDE KDE 3.5.3)
Installed from: Compiled From Sources
Compiler: gcc 4.0
I have an XMI file with some classes, of which one contains an operation with parameters. There is one class diagram and one collaboration diagram. The class diagram contains two classes: Class 1 and Class 2, of which Class 1 contains a method MethodWithParams with 2 parameters.
On the collaboration diagram I dragged out both of the classes from the tree and created a new message from Class 2 to Class 1. In the properties of the message I selected Class operation and choosed MethodWithParam.
After saving this file (attached to the bugreport), Umbrello is not able to load it again and crashes with SIGSEGV.
I've tracked down the bug to the moment, where an association in the collaboration diagram is loaded (AssociationWidget::loadFromXMI). If the association references an existing method of the class, the xmi.id attribute is set to the id found in UML:Operation entry for this method. The findObjectById call (associationwidget.cpp:3464) returns a pointer to the UMLOperation object, but it is later casted to UMLAssociation and passed to setUMLAssociation. This causes an incrementation of the V-Table pointer in the m_List member of UMLAssociation and in turn a crash later at cppheadercodeoperation.cpp:148.
Created attachment 16924 [details]
XMI file exploiting the bug
Workaround: Deactivate the advanced code generators (i.e. go to
Configure -> General Settings and switch off "use new C++/Java/Ruby code
see also #125331, #126262
*** This bug has been marked as a duplicate of 84739 ***