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 203011 - project.ui.actions.NewFile$ calls to wizards from non-EDT thread
Summary: project.ui.actions.NewFile$ calls to wizards from non-EDT thread
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
Keywords: THREAD
Depends on:
Blocks: 191951
  Show dependency tree
Reported: 2011-10-04 01:54 UTC by Karol Harezlak
Modified: 2011-11-16 15:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181575

stacktrace (5.29 KB, text/plain)
2011-10-04 01:54 UTC, Karol Harezlak

Note You need to log in before you can comment on or make changes to this bug.
Description Karol Harezlak 2011-10-04 01:54:05 UTC
This bug was originally marked as duplicate of bug 164821, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201109290601)
VM: Java HotSpot(TM) Client VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Linux

User Comments:
kharezlak: While trying to use Layout Window wizard

java.lang.AssertionError: Do resetting of permutation only in AWT queue!
   at org.netbeans.swing.etable.ETable.resetPermutation(
   at org.netbeans.swing.etable.ETable.tableChanged(
   at org.netbeans.swing.outline.Outline.tableChanged(
   at javax.swing.JTable.setModel(
   at org.netbeans.swing.etable.ETable.setModel(
   at org.netbeans.swing.outline.Outline.setModel(
Comment 1 Karol Harezlak 2011-10-04 01:54:09 UTC
Created attachment 111441 [details]
Comment 2 Jaroslav Tulach 2011-11-04 12:46:10 UTC
Visual Layout Editor wizard causes: Do resetting of permutation only in AWT queue!
Comment 3 Jaroslav Tulach 2011-11-04 12:48:16 UTC
I know the threading policy of various part of our APIs is a gray area, but in case of Wizards API (and its visual nature) I'd expect it should be accessed from EDT or at least make callbacks to providers from EDT.

Can project's NewFile actions be modified to do the call in EDT?
Comment 4 Jesse Glick 2011-11-14 19:40:09 UTC
(In reply to comment #3)
> Can project's NewFile actions be modified to do the call in EDT?

No, this is intentionally run off EQ. This particular wizard will just need to be fixed.
Comment 5 Jesse Glick 2011-11-14 19:52:14 UTC
Only reproducible when invoked from context menu (New...), not from File > New. This is a less common mechanism, which is why it was not reported earlier.

Root problem here is a misdesign in BasicWizardIterator: it eagerly calls createPanels (and these BasicWizardIterator.Panel's are actual Component's) from initialize, whereas wizards are normally supposed to create just WizardDescriptor.Panel's and construct the actual Component if and when getComponent is called. Probably do not have time to refactor this properly but can look for a quick fix.
Comment 6 Jesse Glick 2011-11-14 20:01:47 UTC
core-main #1b68cab75355
Comment 7 Quality Engineering 2011-11-16 15:44:24 UTC
Integrated into 'main-golden'
User: Jesse Glick <>
Log: #203011: project.ui.actions.NewFile$ calls to wizards from non-EDT thread
Hot fix; proper fix would delay construction of physical panels until displayed.