[ JDK VERSION : 1.6.* ]
When I add a folder as a library in the Java Application by right
clicking the Libraries node in projects panel, the scanning projects
task starts. Now even if I right click on that folder name and
remove it from the Libraries the project scanning task never stops as
the folder is a real big folder
Steps to produce
1. Create a new Java Application
2. Right click on the Libraries node and say Add JAR/Folder
3. Type D:\ and click Open
4. Watch the project scanning starts
5. Try typing Date[CTRL+Space] to see the scanning projects popup
6. Right click on the D:\ entry in the Libraries node and remove it
7. Watch the scanning projects still continues
8. Try opening a CTRL+F12 Go to type window and IDE freezes
Product Version: NetBeans IDE 6.7 Beta (Build 200904242137)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\tusharj\.netbeans\6.7beta
Created attachment 81509 [details]
Thread dump of the IDE in freezed state
Changed the subcomponent to Parsing and Indexing
I think that the freeze is related to the following warning that I can see every time I run the IDE
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by:
There are several things:
1. org.netbeans.modules.java.navigation.JavaMembers.show(JavaMembers.java:82) calls ParserManager.parse() from AWT and
is blocked. That's related to David's (dstrupl) comment. In general UserTasks should not be run from AWT, because they
can be blocked for unspecified amount of time.
2. RepositoryUpdater (scanning) should be interruptible by concurrent UserTasks that run through ParserManager.parse().
And as soon as the UserTask is finished. RepositoryUpdater should resume scanning at the point where it was interrupted.
3. What is the point in adding D:\ as a library? Remember that by adding/removing libraries you change the classpath for
the project and that means that the whole project has to be rescanned. So, the scanning that you see is not only about
scanning the library itself, but also about scanning all the other source roots that were affected by changing the
What is the point of adding D:\ ?
I was actually trying to add a JAR library and for that I started navigating the Open Dialog box. Usually in windows
we type the drive letter and click open to open that folder and see the contents. As this dialog box was also
expecting a folder it took D:\ as a valid folder and added it as a folder in Libraries as class path and the scanning
Ok. I got my mistake and I removed the D:\ folder from my Libraries node and now I was expecting NetBeans to stop
scanning the earlier class path and start new scan for the simpler class path without D:\
This is a case where user can my mistake arrive at a IDE freeze state. There is one more point to this even if D:\
seems a illogical folder to add as library but a valid folder with lots of sub folders may be added and then removed
from the class path, which will still provide the same situation.
Ok, I understand what happened and what you are requesting. Unfortunately due to the way how javac works the scanning
granularity is one root. In other words the scanning can be interrupted only when it finishes scanning one root and
before it starts scanning another one. There is now way how to fix this easily and in my opinion what your usecase is a
corner case. I am sorry if this sounds hard, but I'm going to close this as WONTFIX.