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 205035 - project.ui.actions.NewFile$2.run(NewFile.java:167) calls into wizard API outside of AWT thread
Summary: project.ui.actions.NewFile$2.run(NewFile.java:167) calls into wizard API outs...
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Features On Demand (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 215744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-12 19:52 UTC by aajn88
Modified: 2012-07-21 06:26 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181573


Attachments
stacktrace (4.52 KB, text/plain)
2011-11-12 19:52 UTC, aajn88
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aajn88 2011-11-12 19:52:12 UTC
Build: NetBeans IDE 7.1 Beta (Build 201109252201)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows 7

User Comments:
GUEST: creating a package

GUEST: I was trying to add a new FXML template source to my JavaFX 2.0 project.

aajn88: I can't create a new JavaFX Class!!! AND I NEED IT!!!

GUEST: creating a javafx .jar

GUEST: trying new web services client

GUEST: Clicked on New Webservice Client from popup menu in JavaFX application.




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.ide.ergonomics.fod.ConfigurationPanel.<init>(ConfigurationPanel.java:92)
   at org.netbeans.modules.ide.ergonomics.newproject.DescriptionStep.getComponent(DescriptionStep.java:109)
   at org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemandWizardIterator.createPanels(FeatureOnDemandWizardIterator.java:129)
   at org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemandWizardIterator.initialize(FeatureOnDemandWizardIterator.java:211)
   at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.initialize(TemplateWizard.java:1035)
   at org.openide.loaders.TemplateWizardIterImpl.setIterator(TemplateWizardIterImpl.java:103)
Comment 1 aajn88 2011-11-12 19:52:14 UTC
Created attachment 113154 [details]
stacktrace
Comment 2 Jaroslav Tulach 2011-12-05 07:34:22 UTC
Looking at
http://statistics.netbeans.org/exceptions/messageslog?id=546752
and it seems that NewFile actions tries to obtain components outside of AWT thread:

 org.netbeans.modules.ide.ergonomics.fod.ConfigurationPanel.(:92)
 org.netbeans.modules.ide.ergonomics.newproject.DescriptionStep.getComponent(:109)
 org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemandWizardIterator.createPanels(:129)
 org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemandWizardIterator.initialize(:211)
 org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.initialize(:1038)
 org.openide.loaders.TemplateWizardIterImpl.setIterator(:103)
 org.openide.loaders.TemplateWizardIteratorWrapper.setIterator(:79)
 org.openide.loaders.TemplateWizard.setTemplateImpl(:206)
 org.openide.loaders.TemplateWizard.setTemplate(:225)
 org.openide.loaders.TemplateWizard.instantiateImpl(:475)
 org.openide.loaders.TemplateWizard.instantiate(:391)
 org.netbeans.modules.project.ui.actions.NewFile$2.run(:167)
Comment 3 Jesse Glick 2011-12-05 15:24:50 UTC
No; it calls FeatureOnDemandWizardIterator.initialize, which incorrectly tries to create GUI panels even though these have not yet been shown. Wizard iterators should delay component creation unless and until the panel is displayed.
Comment 4 Exceptions Reporter 2012-04-10 12:35:27 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=181573
Comment 5 Jaroslav Tulach 2012-04-12 12:03:44 UTC
ergonomics#541e274fe5ac
Comment 6 Quality Engineering 2012-04-19 10:01:30 UTC
Integrated into 'main-golden', will be available in build *201204190400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/541e274fe5ac
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #205035: Initialize the panels lazily
Comment 7 Jaroslav Tulach 2012-07-21 06:26:07 UTC
*** Bug 215744 has been marked as a duplicate of this bug. ***