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 43910 - Creation of children under Databases node is not properly synchronized
Summary: Creation of children under Databases node is not properly synchronized
Status: CLOSED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Radko Najman
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2004-05-27 06:45 UTC by Jiri Skrivanek
Modified: 2006-03-24 09:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Entire stack trace. (2.32 KB, text/plain)
2004-05-27 06:45 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2004-05-27 06:45:09 UTC
In spite of our test is executed in AWT event
thread, we sometimes get an exception related to
nodes. I think it is something wrong in DB module
because I haven't seen it in any other module. The
following exception is thrown when we expand
Databases node and searching for Drivers node:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.LinkedList.entry(LinkedList.java:360)
	at java.util.LinkedList.get(LinkedList.java:303)
	at
org.openide.explorer.view.VisualizerNode.getChildAt(VisualizerNode.java:213)
	at
javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:156)

I must admit it happens only in automated tests
and only sometimes. But it prevent us to write
really stable tests.

Tested in build 20040526-1710, JDK1.4.2_04, Solaris9.
Comment 1 Jiri Skrivanek 2004-05-27 06:45:39 UTC
Created attachment 15313 [details]
Entire stack trace.
Comment 2 Radko Najman 2004-09-29 15:43:07 UTC
Children are created in a separate thred. Wait node is displayed till
they are created. I think you should somehow check if wait node is
displayed or not and continue your test when wait node is replaced by
expected nodes.
For more info see
org.netbeans.modules.db.explorer.DatabaseNodeChildere.initCollection()
method.
Comment 3 Jiri Skrivanek 2004-09-30 13:19:22 UTC
OK, I tried to make the test more robust. It waits until the wait node
dismiss and then it looks for drivers node. It should help.
But the cause of problem is that the wait node is not replaced in AWT
thread. It should be solved in new implementation of DB module.
Comment 4 Radko Najman 2004-09-30 16:14:14 UTC
Test was updated so hopefully it should work now without problems.
Comment 5 Jiri Skrivanek 2004-10-01 08:34:56 UTC
Verified.