[Uml-devel] [Bug 126994] crashed when import classes

Oliver Kellogg okellogg at users.sourceforge.net
Mon May 15 23:53:56 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=126994         
okellogg users sourceforge net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From okellogg users sourceforge net  2006-05-16 08:43 -------
SVN commit 541389 by okellogg:

getPackage(): Guard against circularity in the m_pUMLPackage chain.
BUG:126994


 M  +1 -0      ChangeLog  
 M  +9 -5      umbrello/umlobject.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #541388:541389
 @ -14,6 +14,7  @
 * Crash loading xmi file (125331, 126968)
 * User interaction with UMLWidget improvements (126391)
 * Comments are cut short when generating PHP code (126480)
+* Freeze on C++ class import (126994)
 * Crash on importing Java 1.5 classes containing annotations (127160)
 
 Version 1.5.2
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlobject.cpp #541388:541389
 @ -349,15 +349,19  @
 QString UMLObject::getPackage(QString separator) {
     if (m_pUMLPackage == NULL)
         return "";
-    QStringList pkgList;
+    UMLPackageList pkgList;
+    QStringList pkgNames;
     UMLPackage* pkg = m_pUMLPackage;
-    while (pkg != NULL) {
-        pkgList.prepend(pkg->getName());
-        pkg = pkg->getUMLPackage();
+    while (1) {
+        pkgList.prepend(pkg);
+        pkgNames.prepend(pkg->getName());
+        if ((pkg = pkg->getUMLPackage()) == NULL ||
+            pkgList.containsRef(pkg))
+            break;
     }
     if (separator.isEmpty())
         separator = UMLApp::app()->activeLanguageScopeSeparator();
-    return pkgList.join(separator);
+    return pkgNames.join(separator);
 }
 
 UMLPackageList UMLObject::getPackages() const {




More information about the umbrello-devel mailing list