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 91395 - Sometimes diagrams are marked as dirty just after opening
Summary: Sometimes diagrams are marked as dirty just after opening
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: General Diagram (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ jyothivasa
URL:
Keywords:
Depends on:
Blocks: 101695
  Show dependency tree
 
Reported: 2006-12-21 10:07 UTC by Sergey Petrov
Modified: 2007-05-25 09:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
project (513.33 KB, application/octet-stream)
2006-12-21 10:08 UTC, Sergey Petrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2006-12-21 10:07:25 UTC
reproduicible with 061213

steps:
1. extract and open project from atachment
2. open 'p_deployment|d_deployment' diagram by double click
diagram is marked as dirty
Comment 1 Sergey Petrov 2006-12-21 10:08:42 UTC
Created attachment 36874 [details]
project
Comment 2 Yang Su 2007-02-07 00:26:53 UTC
Thanks for the testcase, it helped.

There's logic in ADDrawingAreaControl to verify diagram right after loading to
get rid of invalid nodes, edges etc. In this particular case, the diagram
contains three linked comments, two of them are linked to comment while Comment
edge verification logic expects comment to be linked to a non-comment element,
which is flawed by itself. So the edges deemed invalid were deleted after
loading the diagram without user's knowledge, that's why the diagram was marked
as modified. In any case, I tend to think we should not alter diagram under the
cover while loading, just display it in whatever the state user saved.

Removed postLoadVerification()
Comment 3 Andrew Korostelev 2007-02-15 09:40:46 UTC
verified in all-nbms-griffin-070212
Comment 4 Trey Spiva 2007-02-21 18:36:41 UTC
Fixing this bugs causes issue 91395.  The logic that was commented out is very important.  I am 
uncommenting the code.
Comment 5 Trey Spiva 2007-02-21 18:41:25 UTC
After testing this, I am not able to see the described behavior.  I believe that the new save logic fixed this 
issue.
Comment 6 Peter Lam 2007-02-23 00:53:25 UTC
verified again in build 070222_1 that this issue is no longer reproducible.
Comment 7 Yang Su 2007-04-19 20:07:15 UTC
The attempted fix was reverted back on 2/21, so the issue comes back. Apparently
there's a mistake in the comment "Fixing this bugs causes issue 91395", this is
91395. 

This is the direct cause of issue 101695, raise it to p1 for possible data loss.
Even though we detect inconsistency in persisted model data given that
verification logic is correct (which is not the case in this particular issue),
we should notify user instead of modifying diagrams behind the scene.

Comment 8 Sergey Petrov 2007-04-20 09:45:50 UTC
It's quite complex issue, from one point  diagram should be cleared from deleted
elements, updated with renamed etc elements but  sometimes it looks strange if
nothing was changed by user but verification change something
Comment 9 _ jyothivasa 2007-04-26 07:17:26 UTC
Two parts:
1. Fixed the comment validation logic to fix the issue of link comment elements
in the attached project.
2. Whenever there is a change in the model and the diagram is out of sync, we
validate the diagram to remove deleted elements/relationships. It was decided by
QE and Dev teams that we inform the user when there is such a change in the
diagram (to make the model and diagram to be in sync).
Comment 10 Andrew Korostelev 2007-05-25 09:29:28 UTC
verified in netbeans-6.0-nightly-200705250000-full