Bug 136940 - Crashes on closing/opening files created with previous umbrello versions
Summary: Crashes on closing/opening files created with previous umbrello versions
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-06 13:16 UTC by gmud
Modified: 2006-11-19 10:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gmud 2006-11-06 13:16:41 UTC
Version:           1.5.52 (using KDE 3.5.5, Gentoo)
Compiler:          gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
OS:                Linux (i686) release 2.6.17-suspend2-r6

Deleting associations (or generalizations etc.) leaves references of these in the xmi file. The associations aren't shown in the class diagrams but codegeneration does show traces of them:
/** Aggregations: */

  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;

  /** Compositions: */
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_;
  var $m_; 

In the xmi file it looks like this:
       <UML:GeneralizableElement.generalization>
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
        <UML:Generalization xmi.idref="17942" />
       </UML:GeneralizableElement.generalization>
Comment 1 gmud 2006-11-06 13:25:42 UTC
It looks like existing associations have duplicate entries, in console there are a lot of errors like this when loading a xmi-file:
umbrello: UMLPackage::addAssocToConcepts: Settings already has association id=18176

Also this could be the reason for a crash when closing umbrello:

[KCrash handler]
#6  0xb6970f9d in __dynamic_cast ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6
#7  0x081aff3b in UMLCanvasObject::removeAllAssociationEnds ()
#8  0x081b0d15 in UMLCanvasObject::removeAllChildObjects ()
#9  0x0818dde7 in UMLPackage::removeAllObjects ()
#10 0x0818de21 in UMLPackage::removeAllObjects ()
#11 0x081bf400 in UMLDoc::closeDocument ()
#12 0x081a5670 in UMLApp::queryExit ()
#13 0xb781d147 in KMainWindow::closeEvent ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#14 0xb6f0cf2c in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3
#15 0xb6fd1d92 in QMainWindow::event () from /usr/qt/3/lib/libqt-mt.so.3
#16 0xb6e6d8ef in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#17 0xb6e6da9c in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#18 0xb74bc1e5 in KApplication::notify ()
   from /usr/kde/3.5/lib/libkdecore.so.4
#19 0xb6f0c40b in QWidget::close () from /usr/qt/3/lib/libqt-mt.so.3
#20 0xb6df7b0a in QETWidget::translateCloseEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#21 0xb6dfd805 in QApplication::x11ClientMessage ()
   from /usr/qt/3/lib/libqt-mt.so.3
#22 0xb6e04926 in QApplication::x11ProcessEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#23 0xb6e18915 in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#24 0xb6e842b1 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#25 0xb6e841f6 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#26 0xb6e6ca4f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#27 0x08171d63 in main ()

Comment 2 Oliver Kellogg 2006-11-07 20:41:26 UTC
> Also this could be the reason for a crash when closing umbrello: 
> [...]

Ouch, I thought I fixed this.
Could you attach a sample file for which this happens? Thanks.
Comment 3 gmud 2006-11-14 11:25:20 UTC
I have sent an e-mail to your t-online address (I hope it's still valid) with an attachment, because I can't make a testcase at the moment. Now opening the file crashes umbrello and I can't work with it anymore :(
Comment 4 Oliver Kellogg 2006-11-16 06:53:34 UTC
> Now opening the file crashes umbrello and I can't work with it anymore

With r604997 at least it doesn't crash anymore.

I haven't been able to reproduce the duplications.
It would help very much if you could describe the exact steps
that you did to get this problem.
Comment 5 gmud 2006-11-16 10:50:18 UTC
Okay, I checked out the latest version in branch. Now, when I load my project all associations are gone. Umbrello gives me:

umbrello: ERROR: couldn't loadFromXMI association widget:0x8d77a10, bad XMI file? Deleting from umlview.
umbrello: ERROR: AssociationWidget::loadFromXMI: cannot find UMLObject 3187

Repeated about 100 times.

Also I get:

umbrello: UMLListView::slotObjectCreated([...], id= 16442): item already exists.
where [...] is a method-name, this is also repeated about 100 times.

I will try to make some test cases within this week and upload them here. Perhaps this is more than one bug. If I feel there are different problems I'll open new bugs. Thanks for paying attention to this issue!

Comment 6 Oliver Kellogg 2006-11-17 01:11:13 UTC
> Okay, I checked out the latest version in branch.
> Now, when I load my project all associations are gone.

Fixed by r605507.
The crash on close resurfaced and is hotfixed by r605508.
It's not quite clear to me yet why deleteLater() doesn't crash
while calling the destructor directly does - I'll try to
further investigate.
Thanks for your valuable input Gero.
Comment 7 Oliver Kellogg 2006-11-19 10:13:09 UTC
I am renaming this because the original PR is a duplicate of
#129859, and the new title better reflects the actual work done.