[umbrello-devel] [umbrello] [Bug 175096] crash on import classes(c++)

Ralf Habacker ralf.habacker at freenet.de
Tue Jan 14 12:37:25 UTC 2014


--- Comment #8 from Ralf Habacker <ralf.habacker at freenet.de> ---
Created attachment 84644
  --> https://bugs.kde.org/attachment.cgi?id=84644&action=edit
New crash information added by DrKonqi

umbrello (2.12.99-11cb9f4) on KDE Platform 4.11.3 using Qt 4.8.5

- What I was doing when the application crashed:
I imported c++ classes from openscenegraph source (subdirectory

This happens when the undo support and the code import option "create artificat
on each imported file" are enabled. 

The reason: In void CmdCreateUMLObject::redo(), the UMLObject is added to the
parent in UMLPackage::addObject(). In the crash case the parent is an
UMLArtificat instance, which do not derive from UMLPackage. addObject()
accesses m_objects to see if the object has already been added and crashes
because of invalid class type. 

A fix would be either
- derive UMLArtifact from UMLPackage (and load/save child relations from/to xmi
- do not use UMLArtifact objects as parent (second best solution, because
relations will be lost)

-- Backtrace (Reduced):
#5  0x000000000044c483 in QListData::size (this=this at entry=0x3168838) at
#6  0x0000000000642b12 in QList<UMLObject*>::indexOf
(this=this at entry=0x3168838, t=@0x7fffc6df2978: 0x31668e0, from=from at entry=0) at
#7  0x00000000006750ab in UMLPackage::addObject (this=0x31687c0,
pObject=0x31668e0) at /home/ralf.habacker/src/umbrello/umbrello/package.cpp:141
#8  0x00000000005dfdb6 in Uml::CmdCreateUMLObject::redo (this=0x30132e0) at
#9  0x0000000000681ab9 in UMLApp::executeCommand (this=0x24b6190,
cmd=0x30132e0) at /home/ralf.habacker/src/umbrello/umbrello/uml.cpp:3083

You are receiving this mail because:
You are the assignee for the bug.

More information about the umbrello-devel mailing list