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 160279 - NetBeans IDE Permanently Locks Up While Scanning Projects
Summary: NetBeans IDE Permanently Locks Up While Scanning Projects
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: rmichalsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-03-13 20:34 UTC by tomwheeler
Modified: 2009-03-23 17:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump from the same session as the exception I posted (19.15 KB, text/plain)
2009-03-13 20:41 UTC, tomwheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomwheeler 2009-03-13 20:34:06 UTC
I want to evaluate the new API support enhancements that Richard Michalsky has been working on for NB 6.7.  On three
different days this week I have downloaded nightly builds so I could do this.   In all three attempts, the IDE locks up
and consumes nearly 100% of CPU until I ultimately kill the process.

My steps to reproduce are as follows:

1. Download nightly Java SE build (most recently tried using netbeans-trunk-nightly-200903121546-javase.zip)

2. Start IDE and open an existing module suite with only one module.  

NOTE: Around this time I notice that the "scanning projects" progress shows up in the status bar.  It never seems to
finish, no matter how much time I give it.  I've given it up to 15 minutes to finish scanning the two projects (one
suite and one module) that are open, but it never completes.

3. Use the New Window Component wizard to add a new TopComponent to the module.  

4. After clicking "Finish" at the end of the wizard, the entire UI (including the "Scanning Projects (collecting project
dependencies)" progress bar) hangs.  It consumes 90% or more of available CPU until I finally kill the process.  


Here are the pertinent details about my configuration:

Product Version: NetBeans IDE Dev (Build 200903121546)
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\<MY USERNAME>\.netbeans\dev
Comment 1 tomwheeler 2009-03-13 20:35:53 UTC
I've reproduced this again, this time by starting NetBeans from a DOS prompt so I could see the log.  There are some
exceptions and warnings logged just before it locks up:

WARNING: Cannot reformat the file: C:/Documents and Settings/<MY USERNAME>/My
Documents/NetBeansProjects/suite1/module1/src/ooo/DDDDDTopComponent.form
WARNING: Cannot reformat the file: C:/Documents and Settings/<MY USERNAME>/My
Documents/NetBeansProjects/suite1/module1/src/ooo/DDDDDTopComponent.java
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.netbeans.modules.project.ui.Hacks.reloadPanelsInWizard(Hacks.java:161)
        at org.netbeans.modules.project.ui.NewFileWizard$1.propertyChange(NewFileWizard.java:106)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
        at org.openide.NotifyDescriptor.firePropertyChange(NotifyDescriptor.java:759)
        at org.openide.WizardDescriptor.putProperty(WizardDescriptor.java:711)
        at org.netbeans.modules.project.ui.TemplateChooserPanel.storeSettings(TemplateChooserPanel.java:139)
        at org.netbeans.modules.project.ui.TemplateChooserPanel.storeSettings(TemplateChooserPanel.java:66)
        at org.openide.WizardDescriptor.setValueOpen(WizardDescriptor.java:1326)
        at org.openide.WizardDescriptor.setValue(WizardDescriptor.java:1304)
        at org.openide.WizardDescriptor$Listener$2$1$1.run(WizardDescriptor.java:2078)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
        at java.awt.Dialog$1.run(Dialog.java:1051)
        at java.awt.Dialog$3.run(Dialog.java:1103)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1101)
        at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:985)
        at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1019)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1007)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:115)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
        at org.openide.util.Mutex.readAccess(Mutex.java:268)
        at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:992)
        at java.awt.Component.show(Component.java:1516)
        at java.awt.Component.setVisible(Component.java:1468)
        at java.awt.Window.setVisible(Window.java:841)
        at java.awt.Dialog.setVisible(Dialog.java:991)
        at org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.java:495)
        at org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:374)
        at org.netbeans.modules.project.ui.actions.NewFile.doPerform(NewFile.java:154)
        at org.netbeans.modules.project.ui.actions.NewFile.access$200(NewFile.java:80)
        at org.netbeans.modules.project.ui.actions.NewFile$PopupListener.actionPerformed(NewFile.java:349)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
        at java.awt.Component.processMouseEvent(Component.java:6216)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5981)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4583)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4413)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2475)
        at java.awt.Component.dispatchEvent(Component.java:4413)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IllegalArgumentException
        at
org.netbeans.modules.apisupport.project.ui.wizard.BasicWizardIterator$BasicDataModel.<init>(BasicWizardIterator.java:136)
        at org.netbeans.modules.apisupport.project.ui.wizard.winsys.NewTCIterator$DataModel.<init>(NewTCIterator.java:114)
        at org.netbeans.modules.apisupport.project.ui.wizard.winsys.NewTCIterator.createPanels(NewTCIterator.java:86)
        at org.netbeans.modules.apisupport.project.ui.wizard.BasicWizardIterator.initialize(BasicWizardIterator.java:243)
        at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.initialize(TemplateWizard.java:1008)
        at org.openide.loaders.TemplateWizardIterImpl.setIterator(TemplateWizardIterImpl.java:100)
        at org.openide.loaders.TemplateWizardIteratorWrapper.setIterator(TemplateWizardIteratorWrapper.java:76)
        at org.openide.loaders.TemplateWizard.reload(TemplateWizard.java:262)
        ... 69 more
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: Source.runUserTask called in AWT event thread by:
org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:169)
Comment 2 tomwheeler 2009-03-13 20:41:39 UTC
Created attachment 78165 [details]
Thread dump from the same session as the exception I posted
Comment 3 mdeggersbeans 2009-03-15 03:18:55 UTC
This also occurs on Linux (Fedora 10, 2.6.27.19-170.2.35.fc10.i686, jdk 1.6.0_10. 1.5 GB memory).

As soon as a module project is within an existing (or newly created) NetBeans Suite project (Project->New->NetBeans
Module), the IDE begins scanning and uses 100% of the CPU.

This scanning will not stop until the process is killed.  The IDE remains moderately usable in this configuration (no
class completion, no import warnings, etc.), until about the third module is added to the suite.  At that point, the IDE
becomes unresponsive.

I cannot verify that item 158767 has been addressed using the current nightly builds.
Comment 4 Geertjan Wielenga 2009-03-16 13:53:58 UTC
I'm encountering the same problem as described here on Ubuntu, with various JDK's from JDK 6 10 to JDK 7.
Comment 5 rmichalsky 2009-03-16 14:39:58 UTC
Maybe duplicate of issue #159587, although thread dump doesn't look too much alike. The exception is probably unrelated,
it is thrown from the wizard, while IDE locks up even on empty NBM project. Or it shows up only after the wizard is run
in your case?
Comment 6 mdeggersbeans 2009-03-18 00:26:51 UTC
In my case, the scanning starts once the wizard has completed.  Here's the sequence of events.

1) File->New Project->NetBeans Modules->Module Suite
   a) Name SelectionSuite
   b) Accept all other defaults
   c) Click the Finish button
2) File->New Project->NetBeans Modules->Module
   a) Name MyAPI
   b) Accept defaults (add to SelectionSuite)
   c) Code base org.aname.myapi
   d) Add space (My API) for module display name
   e) Click the Finish button

Result

1) IDE scans Java installation (successfully)
2) IDE scans NetBeans installation (successfully)
3) IDE hangs (never finishes) Collecting project dependencies
Comment 7 tomwheeler 2009-03-18 16:43:07 UTC
At least in my case, the problem only happens after I hit "Finish" on the wizard.  I have tried a few other wizards (new
file type, action, Java class) and they did not lock up the IDE.  The TopComponent wizard *does* lock it up 100% of the
time and I have also been able to lock it up using the JUnit "test for existing class" wizard also.

I was able to reproduce this behavior again with a nightly build I downloaded yesterday
(netbeans-trunk-nightly-200903170201-javase.zip)
Comment 8 rmichalsky 2009-03-19 11:25:20 UTC
Could you please try once again with build 200903181604? Seems that's the one the fix of issue #159587 got into. The
delays between pushing and getting the fix into production builds has been terrible recently :-(.
Comment 9 tomwheeler 2009-03-23 17:10:49 UTC
Sorry for the delay on my end -- I was on vacation for a few days.  Anyway, I've just tried to reproduce with the most
recent nightly build (JavaSE version 200903230201) on the same machine as before.  I can no longer reproduce the
problem, so I am marking it as fixed.

mdeggersbeans: if you can still reproduce your problem on a recent nightly build, feel free to reopen, or otherwise mark
as verified.