[umbrello-devel] Help with backtrace

Oliver Kellogg oliver.kellogg at t-online.de
Fri Jul 29 18:52:24 UTC 2016


Hi Lays,
 
In private part of umldoc.h there is
 
    UMLFolder *m_root[Uml::ModelType::N_MODELTYPES];
 
E.g. the global root folder of the Logical View is
 
    m_root[Uml::ModelType::Logical]
 
You can access the global root folders using
 
    UMLFolder *UMLDoc::rootFolder(Uml::ModelType::Enum mt)
 
For a usage example, see umldoc.cpp ca. line 690:
 
if (filetype.endsWith(QLatin1String(".mdl"))) {
    setUrlUntitled();
    m_bTypesAreResolved = false;
    status = Import_Rose::loadFromMDL(file);
    if (status) {
        if (UMLApp::app()->currentView() == 0) {
            QString name = createDiagramName(Uml::DiagramType::Class, 
false);
            createDiagram(m_root[Uml::ModelType::Logical], 
Uml::DiagramType::Class, name);
            setCurrentRoot(Uml::ModelType::Logical);
        }
    }
}
 
Your backtrace shows
 
7.  #2  0x000000000049a11c in UMLDoc::createDiagram (this=0xf349d0, 
folder=0x0,
           type=Uml::DiagramType::Object, name=..., id="-1")
 
 
The question is, why is folder=0x0 here.
I thought it should be UMLDoc::rootFolder(Uml::ModelType::Logical)
 
Perhaps you need to implement something to tell UMLDoc that Object Diagrams 
shall be located in the Logical View, I'm not sure.
Try looking at how other diagram types do it.
 
Oliver
 
 
 
 
-----Original Message-----
Subject: [umbrello-devel] Help with backtrace
Date: 2016-07-29T01:15:23+0200
From: "Lays Rodrigues" <laysrodriguessilva at gmail.com>
To: "Umbrello development list" <umbrello-devel at kde.org>, "Jonathan 
Riddell" <jr at jriddell.org>, "Ralf Habacker" <ralf.habacker at freenet.de>
 
 
 
Hi!
I'm needing some help with the followin backtrace:
https://paste.kde.org/pwws8yt1s <https://paste.kde.org/pwws8yt1s>
I discovered that the erro happens on the folder->name(), logicaly the 
folder of this diagram isn't set. But I wasn't able to find where I set 
this. Any tips?

thanks!

--
Lays Rodrigues
Software Developer at KDE and Br-Print3D
Computer Science Student at Federal Fluminense University
brprint3d.wordpress.com <http://brprint3d.wordpress.com>
laysrodriguesdev.wordpress.com <http://laysrodriguesdev.wordpress.com>
fb.com/laysrodrigues147 <http://fb.com/laysrodrigues147>
Telegram @lays147
IRC lays147
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20160729/35cfd8de/attachment.html>


More information about the umbrello-devel mailing list