Bug 130471 - Crash while loading XMI with collaboration diagram
Summary: Crash while loading XMI with collaboration diagram
Status: RESOLVED DUPLICATE of bug 84739
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-08 17:32 UTC by Krzysztof Nowicki
Modified: 2006-07-14 08:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
XMI file exploiting the bug (90.25 KB, text/plain)
2006-07-08 17:33 UTC, Krzysztof Nowicki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Nowicki 2006-07-08 17:32:14 UTC
Version:           3.5.3 (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0 
OS:                Linux

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.
Comment 1 Krzysztof Nowicki 2006-07-08 17:33:29 UTC
Created attachment 16924 [details]
XMI file exploiting the bug
Comment 2 Oliver Kellogg 2006-07-08 20:34:11 UTC
Workaround: Deactivate the advanced code generators (i.e. go to
Configure -> General Settings and switch off "use new C++/Java/Ruby code
generators".)
Comment 3 Oliver Kellogg 2006-07-14 08:14:38 UTC
see also #125331, #126262

*** This bug has been marked as a duplicate of 84739 ***