Summary: | Crash when attempting to view model from AIXM | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | M Hounsell at ACFR <m.hounsell> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | okellogg |
Priority: | NOR | ||
Version: | 2.13.2 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/umbrello/b8e138c8d708afc50a2a627ee9b80076c347b70d | Version Fixed In: | 4.14.1 |
Description
M Hounsell at ACFR
2014-08-25 04:40:44 UTC
#0 QGraphicsView::scene(this = 0x0) at graphicsview/qgraphicsview.cpp:1592 #1 UMLView::umlScene(this = <optimised out>) at ../../umbrello/umlview.cpp:60 #2 UMLListView::mousePressEvent(this = 0xfe0180, me = 0x7fffffffbf60) at ../../umbrello/umllistview.cpp:195 #3 QWidget::event(this = 0xfe0180, this@entry = 0xfe0180, event = 0x7fffffffbf60, event@entry = 0x7fffffffbf60) at kernel/qwidget.cpp:8372 #4 QFrame::event(this = 0xfe0180, e = 0x7fffffffbf60) at widgets/qframe.cpp:557 #5 QAbstractItemView::viewportEvent(this = 0xfe0180, this@entry = 0xfe0180, event = 0x7fffffffbf60, event@entry = 0x7fffffffbf60) at itemviews/qabstractitemview.cpp:1644 #6 QTreeView::viewportEvent(this = 0xfe0180, event = 0x7fffffffbf60) at itemviews/qtreeview.cpp:1252 #7 QCoreApplicationPrivate::sendThroughObjectEventFilters(this = 0xa00600, this@entry = 0xa00600, receiver = 0xfdfe40, receiver@entry = 0xfdfe40, event = 0x7fffffffbf60, event@entry = 0x7fffffffbf60) at kernel/qcoreapplication.cpp:1063 #8 QApplicationPrivate::notify_helper(this = 0xa00600, this@entry = 0xa00600, receiver = 0xfdfe40, receiver@entry = 0xfdfe40, e = 0x7fffffffbf60, e@entry = 0x7fffffffbf60) at kernel/qapplication.cpp:4563 #9 QApplication::notify(this = 0x7fffffffe3e0, this@entry = 0x7fffffffe3e0, receiver = 0xfdfe40, receiver@entry = 0xfdfe40, e = 0x7fffffffbf60, e@entry = 0x7fffffffbf60) at kernel/qapplication.cpp:4110 #10 KApplication::notify(this = 0x7fffffffe3e0, receiver = 0xfdfe40, event = 0x7fffffffbf60) at ../../kdeui/kernel/kapplication.cpp:311 #11 QCoreApplication::notifyInternal(this = 0x7fffffffe3e0, receiver = 0xfdfe40, receiver@entry = 0xfdfe40, event = 0x7fffffffbf60, event@entry = 0x7fffffffbf60) at kernel/qcoreapplication.cpp:953 #12 sendEvent(event = <optimised out>, receiver = <optimised out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #13 QApplicationPrivate::sendMouseEvent(receiver = 0xfdfe40, receiver@entry = 0xfdfe40, event = 0x7fffffffbf60, event@entry = 0x7fffffffbf60, alienWidget = 0xfdfe40, alienWidget@entry = 0xfdfe40, nativeWidget = 0xfd9370, nativeWidget@entry = 0xfd9370, buttonDown = 0x7ffff5c5b318 <qt_button_down>, buttonDown@entry = 0x7ffff5c5b318 <qt_button_down>, lastMouseReceiver = , spontaneous = true, spontaneous@entry = true) at kernel/qapplication.cpp:3178 #14 QETWidget::translateMouseEvent(this = 0xfd9370, this@entry = 0xfd9370, event = 0x7fffffffc2e0, event@entry = 0x7fffffffc2e0) at kernel/qapplication_x11.cpp:4634 #15 QApplication::x11ProcessEvent(this = 0x7fffffffe3e0, event = 0x7fffffffc2e0, event@entry = 0x7fffffffc2e0) at kernel/qapplication_x11.cpp:3627 #16 x11EventSourceDispatch(s = 0xa012b0, callback = 0x0, user_data = 0x0) at kernel/qguieventdispatcher_glib.cpp:146 #17 g_main_context_dispatch() at :0 #18 ??() at :0 #19 g_main_context_iteration() at :0 #20 QEventDispatcherGlib::processEvents(this = 0x9ce8d0, flags = ) at kernel/qeventdispatcher_glib.cpp:434 #21 QGuiEventDispatcherGlib::processEvents(this = <optimised out>, flags = <optimised out>) at kernel/qguieventdispatcher_glib.cpp:204 #22 QCoreApplication::processEvents(flags = ) at kernel/qcoreapplication.cpp:1140 #23 Object_Factory::createNewUMLObject(type = UMLObject::ot_Class, type@entry = UMLObject::ot_Class, name = , parentPkg = 0x4267ec0, parentPkg@entry = 0x4267ec0) at ../../umbrello/object_factory.cpp:151 #24 Object_Factory::createUMLObject(type = UMLObject::ot_Class, type@entry = UMLObject::ot_Class, n = , parentPkg = 0x4267ec0, solicitNewName = <optimised out>) at ../../umbrello/object_factory.cpp:193 #25 Import_Rose::umbrellify(node = 0x190d280, parentPkg = 0x4267ec0, parentPkg@entry = 0x4267ec0) at ../../umbrello/petaltree2uml.cpp:589 /** * Getter for the scene. * TODO: Should be removed. Use scene() instead. */ UMLScene* UMLView::umlScene() const { return static_cast<UMLScene*>(scene()); } segv QGraphicsView::scene On 2.14.0 and master, the backtrace is different: [...] umbrello(10522) UMLApp::executeCommand: "Set stereotype : to feature" [ 1616 ] umbrello(10522) UMLPackage::addObject: "AirportHeliportProtectionArea" is already there umbrello(10522) UMLApp::executeCommand: "Create UML object : AIXM::AIXM Features::AirportHeliport::Airport/Heliport::AirportHeliportCollocation" [ 1617 ] umbrello(10522) UMLApp::executeCommand: "Set stereotype : to feature" [ 1618 ] umbrello(10522) UMLPackage::addObject: "AirportHeliportCollocation" is already there umbrello(10522) UMLApp::executeCommand: "Set stereotype : to feature" [ 1619 ] umbrello(10522) UMLApp::executeCommand: "Create UML object : AIXM::AIXM Features::AirportHeliport::Airport/Heliport::AltimeterSource" [ 1620 ] Program received signal SIGSEGV, Segmentation fault. 0x083227b1 in UMLCanvasObject::findChildObjectById (this=0xa50b6c8, id="47965BE30126", considerAncestors=false) at /home/kellogg/tools/kdesdk/umbrello/umbrello/umlcanvasobject.cpp:270 270 for (UMLObjectListIt oit(m_List); oit.hasNext();) { (gdb) bt #0 0x083227b1 in UMLCanvasObject::findChildObjectById (this=0xa50b6c8, id="47965BE30126", considerAncestors=false) at /home/kellogg/tools/kdesdk/umbrello/umbrello/umlcanvasobject.cpp:270 #1 0x082c132c in UMLClassifier::findChildObjectById (this=0xa50b6c8, id="47965BE30126", considerAncestors=false) at /home/kellogg/tools/kdesdk/umbrello/umbrello/classifier.cpp:558 #2 0x082f3682 in Model_Utils::findObjectInList (id="47965BE30126", inList=...) at /home/kellogg/tools/kdesdk/umbrello/umbrello/model_utils.cpp:101 #3 0x08300d38 in UMLPackage::findObjectById (this=0xa509c28, id="47965BE30126") at /home/kellogg/tools/kdesdk/umbrello/umbrello/package.cpp:264 #4 0x082f362a in Model_Utils::findObjectInList (id="47965BE30126", inList=...) at /home/kellogg/tools/kdesdk/umbrello/umbrello/model_utils.cpp:93 #5 0x08300d38 in UMLPackage::findObjectById (this=0xaa76238, id="47965BE30126") at /home/kellogg/tools/kdesdk/umbrello/umbrello/package.cpp:264 #6 0x082f362a in Model_Utils::findObjectInList (id="47965BE30126", inList=...) at /home/kellogg/tools/kdesdk/umbrello/umbrello/model_utils.cpp:93 #7 0x08300d38 in UMLPackage::findObjectById (this=0xad25658, id="47965BE30126") at /home/kellogg/tools/kdesdk/umbrello/umbrello/package.cpp:264 #8 0x082f362a in Model_Utils::findObjectInList (id="47965BE30126", inList=...) at /home/kellogg/tools/kdesdk/umbrello/umbrello/model_utils.cpp:93 #9 0x08300d38 in UMLPackage::findObjectById (this=0xaa76238, id="47965BE30126") at /home/kellogg/tools/kdesdk/umbrello/umbrello/package.cpp:264 ... backtrace continues flipping back and forth between model_utils.cpp:93 and package.cpp:264 Analysis: AIXM-5-1-20100201.mdl has packages which contain a class of the same name as the package (AirportHeliport, Runway, Taxiway, Apron, Surface, Airspace, Meteorology, Service, Point, Procedure, Minima, RulesProcedures). Object_Factory::createUMLObject() behaves incorrectly in this case: Instead of creating the nested class of the same name, it returns the existing package object. Git commit 79bb78d801097b7515e3cc7f43174fcb7528266e by Oliver Kellogg. Committed on 26/08/2014 at 08:30. Pushed by okellogg into branch 'master'. Fix crash loading AIXM-5-1-20100201.mdl according to analysis at comment #3: umbrello/object_factory.cpp - In function createUMLObject() case !n.isEmpty(), if doc->findUMLObject() returns non NULL and solicitNewName is false then: - If `type' is ot_UMLObject (wildcard) or `type' is equal to o->baseType() then return the existing object. - Else log a message about type mismatch and call createNewUMLObject() for the given `type'. M +11 -1 umbrello/object_factory.cpp http://commits.kde.org/umbrello/79bb78d801097b7515e3cc7f43174fcb7528266e To my surprise, on retrying I get another crash: [...] umbrello(19239) UMLDoc::createDiagram: folder= "Airport/Heliport" / type= "Class" / name= "2 - AirportHeliport Associations" umbrello(19239) UMLDoc::addView: "2 - AirportHeliport Associations" to folder UMLFolder: localName="", folderFile="", diagrams=0 umbrello(19239) UMLDoc::changeCurrentView: id= "44D7564800C7" umbrello(19239) UMLDoc::changeCurrentView: New current view was not found with id= "44D7564800C7" ! Program received signal SIGSEGV, Segmentation fault. 0x080d515f in QList<UMLObject*>::QList (this=0xbf800068, l=...) at /usr/include/QtCore/qlist.h:114 114 inline QList(const QList<T> &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } (gdb) (gdb) bt #0 0x080d515f in QList<UMLObject*>::QList (this=0xbf800068, l=...) at /usr/include/QtCore/qlist.h:114 #1 0x080de9ac in QListIterator<UMLObject*>::QListIterator (this=0xbf800068, container=...) at /usr/include/QtCore/qlist.h:777 #2 0x0832284e in UMLCanvasObject::findChildObjectById (this=0xa922fa8, id="43B1741A0D3B", considerAncestors=false) at /kdesdk/umbrello/umbrello/umlcanvasobject.cpp:270 #3 0x082c12ac in UMLClassifier::findChildObjectById (this=0xa922fa8, id="43B1741A0D3B", considerAncestors=false) at /kdesdk/umbrello/umbrello/classifier.cpp:558 #4 0x082f3602 in Model_Utils::findObjectInList (id="43B1741A0D3B", inList=...) at /kdesdk/umbrello/umbrello/model_utils.cpp:101 #5 0x08300dd2 in UMLPackage::findObjectById (this=0xa9f4628, id="43B1741A0D3B") at /kdesdk/umbrello/umbrello/package.cpp:268 #6 0x082f35aa in Model_Utils::findObjectInList (id="43B1741A0D3B", inList=...) at /kdesdk/umbrello/umbrello/model_utils.cpp:93 #7 0x08300dd2 in UMLPackage::findObjectById (this=0xa4ff280, id="43B1741A0D3B") at /kdesdk/umbrello/umbrello/package.cpp:268 #8 0x082f35aa in Model_Utils::findObjectInList (id="43B1741A0D3B", inList=...) at /kdesdk/umbrello/umbrello/model_utils.cpp:93 #9 0x08300dd2 in UMLPackage::findObjectById (this=0xacaa3e8, id="43B1741A0D3B") at /kdesdk/umbrello/umbrello/package.cpp:268 Git commit 22c37e1c3f5628663d3b08fdc53cb6486dfafb84 by Oliver Kellogg. Committed on 26/08/2014 at 18:48. Pushed by okellogg into branch 'master'. Address http://bugs.kde.org/show_bug.cgi?id=338536#c5 umbrello/model_utils.cpp function findUMLObject() - In the for-loop over `pkg' initial part, do not enter into tests of `name' against pkg->name() if `type' does not match pkg->baseType(). My current testing shows that this appears to fix the problem. However, I will wait with setting the bug to RESOLVED until more testing is done. If somebody can confirm that it works, that would be helpful. M +4 -1 umbrello/model_utils.cpp http://commits.kde.org/umbrello/22c37e1c3f5628663d3b08fdc53cb6486dfafb84 Git commit b8e138c8d708afc50a2a627ee9b80076c347b70d by Oliver Kellogg. Committed on 28/08/2014 at 05:51. Pushed by okellogg into branch 'KDE/4.14'. Merge remote branch 'origin/master' into KDE/4.14 Mathew Hounsell confirmed that commit 22c37e1 fixes the bug 338536. FIXED-IN: 4.14.1 http://commits.kde.org/umbrello/b8e138c8d708afc50a2a627ee9b80076c347b70d |