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 122184 - IllegalThreadStateException: must be called in EQ
Summary: IllegalThreadStateException: must be called in EQ
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL: http://statistics.netbeans.org/except...
Keywords: API
: 139153 162254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-16 22:15 UTC by lhochet
Modified: 2009-10-21 14:30 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 11809


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lhochet 2007-11-16 22:15:00 UTC
Build: NetBeans IDE 6.0 RC1 (Build 200711131200)
VM: Java HotSpot(TM) Client VM, 1.6.0_05-ea-b06
OS: Windows XP, 5.1, x86
User comments: This seem to occur when creating a project from sources which already has a manifest.mf in its project
directory [IMO Netbeans should be capable of using that file rather than creating a new one]
STACKTRACE: (first 10 lines)
java.lang.IllegalThreadStateException: must be called in EQ
        at
org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer.getVisualizerPanel(IncludeExcludeVisualizer.java:197)
        at
org.netbeans.modules.java.j2seproject.ui.wizards.PanelIncludesExcludes.getComponent(PanelIncludesExcludes.java:68)
        at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:774)
        at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:720)
        at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:738)
        at org.netbeans.modules.project.ui.NewProjectWizard.updateState(NewProjectWizard.java:67)
        at org.openide.WizardDescriptor.updateStateWithFeedback(WizardDescriptor.java:897)
        at org.openide.WizardDescriptor.access$1400(WizardDescriptor.java:119)
        at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1916)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
Comment 1 Tomas Zezula 2007-11-26 12:20:29 UTC
The Wizard API calls WizardDescriptor.Panel.getComponent() in not Event Thread, which is very strange. The caller is
supposed to create swing component => has to be in event thread, calling SwingUtilities.invokeAndWait is very dangerous.
Comment 2 Jiri Rechtacek 2008-01-14 17:01:24 UTC
Tomas, the Javadoc of WD.P.getComponent() says:
* Note; method can be called from any thread, but not concurrently
* with other methods of this interface. Please see complete guide at
thus I don't think I should change WD behavior now. This class is very in wide usage and all possible changes are risky.
Anyway, this problem has no known duplicate and I'm not able to reproduce by description => decrease the priority.
Comment 3 Tomas Zezula 2008-01-14 20:05:58 UTC
Nice try.
getComponent method should return the Component which has to be somehow constructed, but you are not allowed to
construct the Component outside the AWT thread, you will need to create the component before, probably in the
WizardIterator (if you hava luck and you are in AWT thread), but this will make Wizard incredibly slow.
Comment 4 Jan Lahoda 2008-01-14 21:26:59 UTC
I am a bit confused: the Javadoc for getComponent refers to:
http://performance.netbeans.org/howto/dialogs/wizard-panels.html
which clearly recommends to construct the component the first time "getComponent" method is called. It is obviously not
possible to construct the component outside the AWT Event Dispatch Thread. What is the recommended implementation of the
getComponent method, if it is supposed to create the component lazily, but if it may be called outside AWT Thread?
Comment 5 lhochet 2008-04-12 19:29:45 UTC
This no longer seem to occur in NB 6.1 RC
Comment 6 Jiri Rechtacek 2008-08-14 13:20:24 UTC
*** Issue 139153 has been marked as a duplicate of this issue. ***
Comment 7 Jiri Rechtacek 2008-10-22 16:11:05 UTC
fixed in rev/0da9e77846b8
Comment 8 Quality Engineering 2008-10-24 04:12:49 UTC
Integrated into 'main-golden', will be available in build *200810240201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0da9e77846b8
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #122184: IllegalThreadStateException: must be called in EQ
Comment 9 Jan Jancura 2009-10-21 14:30:38 UTC
*** Issue 162254 has been marked as a duplicate of this issue. ***