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 138836

Summary: Problems with the validation of Scenes
Product: platform Reporter: yoshtec <yoshtec>
Component: GraphAssignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Testcase with the error

Description yoshtec 2008-07-02 16:38:18 UTC
The validation of scenes behaves differently if the scene has already generated a view or not. 

The attached test cases (Junit/main method) reconstruct this behavior.
Comment 1 yoshtec 2008-07-02 16:39:20 UTC
Created attachment 63831 [details]
Testcase with the error
Comment 2 David Kaspar 2008-08-12 15:25:18 UTC
This issue can be easily worked around by changing order of layers.

The code has:
public ErrorScene(){
If it would be changed to:
public ErrorScene(){
then it would be working correctly. It is because of ConnectionWidget(Edges) validation depends on LabelWidget
(Nodes/Pins) validation. Since the validation is done from first layer to the last layer, then it is necessary to have
the Nodes and Pins first and the connection in the other layer.

Since the easy workaround exists, lowering the priority to P3. Still keeping the issue open since ideally the library
should stand this - it should just do the validation in two passes...

Note that the has an issue in it:
The main() method is starting two Threads to work with the Scene. It is not correct. The Swing framework and Visual
Library are single-thread libraries i.e. you can work with then from AWT-thread only. Therefore change the new
Thread(...) lines to SwingUtilities.invokeLater(...).