Summary: | Segmentation fault when copy&paste of sequence diagram | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Danny Havenith <dh.bugs.kde.org> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ashley, benoit.masse, drososx, elidigui, geroxp, jmunin, ralf.habacker, ralf.habacker, shay.mcinerney, uliessedraouil |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.9.0 | |
Attachments: |
document on which the application crashes consistently
original header file that was used to create banking_example.xmi |
Description
Danny Havenith
2011-11-21 16:42:41 UTC
Created attachment 65911 [details]
document on which the application crashes consistently
This is the input file on which the application crashes consistently for me. This file was edited and created in umbrello only. Classes were created by importing from a C++ header file (also attached).
Created attachment 65912 [details]
original header file that was used to create banking_example.xmi
This file was used to create the classes in banking_example.xmi. It may have changed since it was imported into umbrello, but such changes should be minor (commenting, whitespace).
The problem is a faulty implementation of the PointArray class, which is used by IDChangeLog. In void IDChangeLog::addIDChange(Uml::IDType OldID, Uml::IDType NewID) it resizes the array pos = m_LogArray.size(); m_LogArray.resize(pos + 1); and adds the point m_LogArray.setPoint(pos, NewID, OldID); which is implemented as void setPoint(uint i, const Uml::IDType &x, const Uml::IDType &y) { QVector<Point*>::insert(i, new Point(x, y)); The resize adds a 0 pointer at position 0, the ::insert insert the new point at position 0, which moves the 0 pointer to index 1. void QVector::insert ( int i, const T & value ) says: Inserts value at index position i in the vector. If i is 0, the value is prepended to the vector. If i is size(), the value is appended to the vector. That identifies the resize() as the problem. SVN commit 1273902 by habacker: Fixed copy & paste crash bug. M +0 -1 idchangelog.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1273902 *** Bug 241915 has been marked as a duplicate of this bug. *** *** Bug 262842 has been marked as a duplicate of this bug. *** *** Bug 286449 has been marked as a duplicate of this bug. *** *** Bug 274265 has been marked as a duplicate of this bug. *** *** Bug 275372 has been marked as a duplicate of this bug. *** *** Bug 280770 has been marked as a duplicate of this bug. *** *** Bug 294638 has been marked as a duplicate of this bug. *** *** Bug 294480 has been marked as a duplicate of this bug. *** apply fixed bug from 4.9.0 changelog |