Bug 141385 - ERD not saved correctly, rendered unusable
Summary: ERD not saved correctly, rendered unusable
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-08 09:41 UTC by Piotr Keplicz
Modified: 2007-02-27 18:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test1.xmi: ERD after first save/exit (106.54 KB, application/octet-stream)
2007-02-08 09:42 UTC, Piotr Keplicz
Details
test2.xmi: ERD after second save/exit (105.39 KB, application/octet-stream)
2007-02-08 09:44 UTC, Piotr Keplicz
Details
test3.xmi: ERD after third save/exit (104.85 KB, application/octet-stream)
2007-02-08 09:45 UTC, Piotr Keplicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Keplicz 2007-02-08 09:41:46 UTC
Version:           1.5.6 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

Entity-relationship diagrams are not saved correctly. After having saved and reopened the a couple of times, entities' attributes and entities themselves vanish gradually.

Steps to reproduce:
1. Create a simple ERD with one entity, add three attributes (in the attached test case: test1 and test2 as 'int', test3 as 'text', no additional properties).
2. Save and exit (resulting file: test1.xmi)
3. Reopen.
-- Some attributes disappear, some change their type.
4. Click 'Save' and exit (resulting file: test2.xmi).
5. Reopen (the entity disappears), click 'Save' and exit (resulting file: test3.xmi).
Comment 1 Piotr Keplicz 2007-02-08 09:42:42 UTC
Created attachment 19586 [details]
test1.xmi: ERD after first save/exit
Comment 2 Piotr Keplicz 2007-02-08 09:44:30 UTC
Created attachment 19587 [details]
test2.xmi: ERD after second save/exit
Comment 3 Piotr Keplicz 2007-02-08 09:45:55 UTC
Created attachment 19588 [details]
test3.xmi: ERD after third save/exit
Comment 4 Piotr Keplicz 2007-02-08 09:57:58 UTC
Possibly related with #141064.
Comment 5 Oliver Kellogg 2007-02-08 23:28:35 UTC
SVN commit 631744 by okellogg:

getDatatypes(): Interestingly, in the line
  UMLObjectListIt oit(m_datatypeRoot->containedObjects());
the iterator is always constructed on an empty list. If we instead write
  UMLObjectList objects = m_datatypeRoot->containedObjects();
  UMLObjectListIt oit(objects);
then all is fine.
CCBUG:141385


 M  +2 -2      umldoc.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umldoc.cpp #631743:631744
@@ -1870,10 +1870,10 @@
 }
 
 UMLClassifierList UMLDoc::getDatatypes() {
+    UMLObjectList objects = m_datatypeRoot->containedObjects();
     UMLClassifierList datatypeList;
     UMLObject *obj;
-    for (UMLObjectListIt oit(m_datatypeRoot->containedObjects());
-            (obj = oit.current()) != NULL; ++oit) {
+    for (UMLObjectListIt oit(objects); (obj = oit.current()) != NULL; ++oit) {
         if (obj->getBaseType() == ot_Datatype) {
             datatypeList.append(static_cast<UMLClassifier*>(obj));
         }
Comment 6 Oliver Kellogg 2007-02-08 23:31:21 UTC
I'm not quite sure whether the above fix closes this PR out entirely.
Could someone please verify, thanks.
Comment 7 Oliver Kellogg 2007-02-16 19:38:51 UTC
I will close this unless I hear back within a few days...
Comment 8 Piotr Keplicz 2007-02-27 09:22:31 UTC
I've just installed 1.5.61, which contains this patch. Looks fine, diagrams seem to be saved correctly. Thanks!
Comment 9 Oliver Kellogg 2007-02-27 18:49:04 UTC
Thanks.