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 96704

Summary: Run project during classpath scanning blocks AWT
Product: java Reporter: _ tboudreau <tboudreau>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 110136    
Bug Blocks:    
Attachments: thread dump

Description _ tboudreau 2007-02-27 16:23:35 UTC
I accidentally added c:\space (the root of all sources on my laptop, including
two NetBeans checkouts) as a library dir to a J2SE project.  This started
classpath scanning (which will probably go on for a very long time - ideally it
should be abortable somehow).

I removed the directory as a library and added the JAR file I was actually
looking for.

Then I right clicked the project and chose Run.  The menu does not close and AWT
is blocked - apparantly in the code that checks if there is a main class. 
Probably it will unblock eventually, but not until scanning is complete, which
could be a very long time.
Comment 1 _ tboudreau 2007-02-27 16:24:06 UTC
Created attachment 38952 [details]
thread dump
Comment 2 Tomas Zezula 2007-07-04 08:31:55 UTC
The J2SEActionProvider should use the runWhenScanFinished rather than runUserActionTask.
Comment 3 Tomas Zezula 2007-07-12 09:58:14 UTC
Caused by excludes. The ClassPath was changed to call ClassPathImplementation.getResources() in the SPIListener  (called
synchronously from the AWT). The getResources() may be expensive for GlobalSourcePath - it calls SFBQ which is slow. The
only thing which may help is to fire changes from GlobalSourcePath asynchronously - probably doesn't matter.
Comment 4 Tomas Zezula 2007-07-19 14:25:11 UTC
Checking in nbproject/project.xml;
/cvs/java/j2seproject/nbproject/project.xml,v  <--  project.xml
new revision: 1.53; previous revision: 1.52
done
Checking in src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java,v  <--  J2SEActionProvider.java
new revision: 1.59; previous revision: 1.58
done