This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 122924 - sometimes collaboration diagram disappears after closing
Summary: sometimes collaboration diagram disappears after closing
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Diagram Collaboration (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Thuy.d Nguyen
URL:
Keywords:
: 123909 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-28 01:10 UTC by Peter Lam
Modified: 2008-02-22 08:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample model project (257.05 KB, application/x-compressed)
2008-01-23 22:53 UTC, Peter Lam
Details
ide log file (111.59 KB, text/plain)
2008-01-23 23:00 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2007-11-28 01:10:32 UTC
This is an intermittant problem that can not be reproduce consistently. It only happens sometimes. So, there must be a
problem somewhere that should be looked into.

Repro steps:
- create a java-platform uml project
- create a collaboration diagram using the default diagram name
- add and name a few elements on the diagram
- click on the "x" from the diagram tab to close the diagram 
- select Save from the dialog to save the diagram before closing
- expand the collaboration diagram interaction node
Result: the collaboration diagram node is missing
- expanding the Diagrams node now will pop up a dialog indicating "" is not a valid diagram name.
Comment 1 Peter Lam 2007-12-11 07:02:26 UTC
netcat user also experienced the issue with component diagram. 
Comment 2 George Vasick 2007-12-12 21:07:57 UTC
See issue 123909.
Comment 3 George Vasick 2008-01-11 21:38:37 UTC
*** Issue 123909 has been marked as a duplicate of this issue. ***
Comment 4 Thuy.d Nguyen 2008-01-17 23:42:55 UTC
Fine-tuned the code to make sure the name, displayname and itemText fileds of a diagram node are properly set when the
diagram node is created and renamed.
Comment 5 Peter Lam 2008-01-18 00:08:26 UTC
verified in trunk build 20080117
Comment 6 Peter Lam 2008-01-23 22:52:20 UTC
while testing 6.1 m1 build 200801222102, I created a number of different diagrams with the use case diagram created last
from the list. After adding some elements and saved the use case diagram, I closed the use diagram but could not open it
even though the diagram node/name is still under the Model node. Then expanding the Diagrams node popped up the
following informational dialog.

"" is not a valid diagram name.

Attached is the project that will should this dialog if it's opened and the Diagrams node get expanded. It does take a
while to expand too.
Comment 7 Peter Lam 2008-01-23 22:53:13 UTC
Created attachment 55460 [details]
sample model project
Comment 8 Peter Lam 2008-01-23 23:00:57 UTC
Created attachment 55461 [details]
ide log file
Comment 9 Thuy.d Nguyen 2008-01-25 19:21:42 UTC
The attached sample uml project shows that the usecase diagram was not being saved properly when it was closed.  The
etlp file of the usecase diagram has no content in it which causes the reported behavior when the diagram is opened. 
I'm looking into the root cause of this issue.
Comment 10 Thuy.d Nguyen 2008-02-21 00:50:53 UTC
Modified the save logic to write diagram data to *.etlp and *.etld files directly eliminating the temp files.  I also
used FileObject and FileObject.getInputStream() in the file-saving process.
Comment 11 Peter Lam 2008-02-22 08:28:32 UTC
Verified in nb6.1 build 200802191203. Tried many times with the same scenario but no longer reproducible. Will reopen if
problem exists again in the future.