Bug 191894 - class importer inserts classes in the wrong package
Summary: class importer inserts classes in the wrong package
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 12:13 UTC by Ralf Habacker
Modified: 2014-08-09 04:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2009-05-07 12:13:47 UTC
When importing http://websvn.kde.org/*checkout*/trunk/kdesupport/kdewin32/tools/mt/xml.h?revision=964607 

in the UMLModell view one will see two class Assembly in the Base package. 
- The first class is located in the Base package, which is correct 
- The second class belongs to the Security namespace and is therefore inserted wrongly into the Base package. 

When I open the property tab of the second class item and press apply, a new Security package entry in the UMLModel view will be created instead of reusing the already available. 

In this newly created package the class Assembly is then visible.

I detect this error on windows, but I guess that it will also occur on unix.
Comment 1 Christoph Feck 2013-09-12 21:40:12 UTC
This crash report is at least 3 years old and there were no further comments or status updates since then.

Therefore we believe that this crash is already fixed in recent KDE 4 versions or the backtrace is no longer applicable to the current KDE 4 sources.

If the crash still happens with a recent KDE version (4.10.5 or 4.11), please add an updated backtrace or provide steps to reproduce. For more information, see http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports

(To prevent automatic closing of this bug in the future, please set the bug status to ASSIGNED or CONFIRMED)
Comment 2 Ralf Habacker 2014-02-02 18:11:20 UTC
At least with 4.11.4 no crash happens and 4.10 isn't maintained anymore, so this seems to be fixed.
Comment 3 Ralf Habacker 2014-02-02 18:33:29 UTC
Has been misguided by commit 1: The original report did not report a crash, instead it reports wrongly assignments of classes to packages which is still present in git master.
Comment 4 Ralf Habacker 2014-02-02 20:47:16 UTC
There seems to be a logic failure in import_utils:cpp:createUMLObject()
at line 206 there is 
    UMLObject * o = umldoc->findUMLObject(name, type, parentPkg);
with 
name = "Base::XML"
parentPkg = 0 
-> returned o has already the "Base" parent package 


at line 299 
parentPkg = "Logical View";  !!! wrong parentPkg 

} else if (parentPkg && !bPutAtGlobalScope) {
        UMLPackage *existingPkg = o->umlPackage();
= "Base"
        if (existingPkg != umldoc->datatypeFolder()) {
            if (existingPkg)
                existingPkg->removeObject(o);
            else
                uError() << "createUMLObject(" << name << "): "
                    << "o->getUMLPackage() was NULL";
            o->setUMLPackage(parentPkg);
> assign to "logical view" which is incorrect
            parentPkg->addObject(o);
-> there is already an object XML in Logical View
        }
    }
Comment 5 Ralf Habacker 2014-06-30 22:12:50 UTC
Works with git master