[Uml-devel] Segfault on XMI close when a class uses a template

Achim Spangler Achim.Spangler at mnet-online.de
Fri Nov 3 11:15:43 UTC 2006


Hi,
you can very easily cause umbrello (fresh from SVN) to segfault.

Just load the attached XMI - or create on your own with:
+ add class
+ add a class template to the new class
+ save -> close -> reload
+ try now to close the reloaded XMI - it will segfault
  in the function: UMLPackage::removeAllObjects()
  at UMLPackage *pkg = dynamic_cast<UMLPackage*>(o);
  while "o" is pointing to the template tag
  --> something is causing to segfault the dynamic_cast<>
      execution when it tries to cast UMLTemplate
      to UMLPackage
      ( when executed in kdbg:
        even after SEGFAULT the local variables report a
        _nearly_ valid data set for the "o" object
       - the "name" attribute is disturbed, but the 
         rest seems OK )
  ==> this looks like the UMLTemplate would be destroyed twice
      as it might have been stored at two places during load of
      the XMI

I discovered for my project, that I had several identical 
<UML:TemplateParameter> tags - looks like we need some unique check during 
load - like with stereotype.


Bye,
Achim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testTemplate.xmi
Type: application/x-uml
Size: 7355 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20061103/e17f00a7/attachment.bin>


More information about the umbrello-devel mailing list