[Uml-devel] [Bug 203092] umbrello idl import crash
Ralf Habacker
ralf.habacker at freenet.de
Wed Nov 30 14:39:33 UTC 2011
https://bugs.kde.org/show_bug.cgi?id=203092
--- Comment #3 from Ralf Habacker <ralf habacker freenet de> 2011-11-30 14:39:32 ---
The first issue with the exceeded limits is fixed in r1266700.
The second issue is caused by a code bug: In IDLImport::parseStmt() there is
the following code with the problematic line marked with !!!
if (keyword == "interface") {
[1]
const QString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(UMLObject::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
!!! m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
m_klass->setStereotype("CORBAInterface");
m_klass->setAbstract(m_isAbstract);
m_isAbstract = false;
m_comment.clear();
if (advance() == ";") // forward declaration
return true;
[2]
This line is responsible for setting the current parent scope, which.
Unfortunally the part between [1] and [2] handles also the interface forward
declaration, which mean each forward declaration adds a new parent scope, which
let at last m_scope overflow.
The solution to this problem is to split
!!! m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
into the following part at the original location
!!! m_klass = static_cast<UMLClassifier*>(ns);
and the remaining part at [2] where real interfaces are hANDÖED:-
if (advance() == ";") // forward declaration
return true;
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the umbrello-devel
mailing list