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 201549 - IllegalStateException: Problem in some module which uses Window System: Window System API is required to be called from AWT thread only, see http://core.netbeans.org/proposals/threading/
Summary: IllegalStateException: Problem in some module which uses Window System: Windo...
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-02 09:37 UTC by Petr Cyhelsky
Modified: 2011-10-07 14:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 180869


Attachments
stacktrace (3.41 KB, text/plain)
2011-09-02 09:37 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2011-09-02 09:37:33 UTC
This issue was reported manually by cyhelsky.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build 201109010601)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b18, Java(TM) SE Runtime Environment, 1.7.0-b148
OS: Linux

Stacktrace: 
java.lang.IllegalStateException: Problem in some module which uses Window System: Window System API is required to be called from AWT thread only, see http://core.netbeans.org/proposals/threading/
   at org.netbeans.core.windows.WindowManagerImpl.warnIfNotInEDT(WindowManagerImpl.java:1686)
   at org.netbeans.core.windows.WindowManagerImpl.topComponentID(WindowManagerImpl.java:1367)
   at org.openide.windows.WindowManager.findTopComponentID(WindowManager.java:529)
   at org.netbeans.core.windows.model.TopComponentSubModel.getID(TopComponentSubModel.java:370)
   at org.netbeans.core.windows.model.TopComponentSubModel.setSelectedTopComponent(TopComponentSubModel.java:312)
   at org.netbeans.core.windows.model.DefaultModeModel.setSelectedTopComponent(DefaultModeModel.java:241)
Comment 1 Petr Cyhelsky 2011-09-02 09:37:38 UTC
Created attachment 110344 [details]
stacktrace
Comment 2 Tomas Hurka 2011-09-12 07:50:04 UTC
It would great if you can provide steps how to reproduce it. Thanks.
Comment 3 J Bachorik 2011-09-12 08:06:58 UTC
IMHO, org.openide.text.EditorSupportLineSet$SupportLine.show() method should be the one making sure the subsequent calls of Window API are carried out on EDT.
Comment 4 javydreamercsw 2011-09-15 16:31:36 UTC
I got the same issue but when running my application. The code was unchanged from yesterday and it worked on the previous daily build just fine. It points to the TopComponent's constructor code generated by the IDE:

setToolTipText(NbBundle.getMessage(UserListTopComponent.class, "HINT_UserListTopComponent"));

java.lang.IllegalStateException: Problem in some module which uses Window System: Window System API is required to be called from AWT thread only, see http://core.netbeans.org/proposals/threading/
	at org.netbeans.core.windows.WindowManagerImpl.warnIfNotInEDT(WindowManagerImpl.java:1531)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentDisplayNameChanged(WindowManagerImpl.java:1176)
	at org.openide.windows.TopComponent.setName(TopComponent.java:954)

I was not sure if this should be a different bug, but from the stack trace it looks to be the same.
Comment 5 J Bachorik 2011-10-05 18:06:33 UTC
@javydreamercsw: Well, it is not the same. The message is, but it is reached by completely different code paths.

@Petr Cyhelsky: How did you manage to get this exception? :) The code for opening a document at the given line is there but it is not effectively called as the only value the line arguments can have as of now is -1 and in that case the code causing this exception is not executed at all :)
Comment 6 J Bachorik 2011-10-05 18:43:51 UTC
Fixing the call to org.openide.text.Line.show() outside of EDT

http://hg.netbeans.org/profiler-main/rev/5b422221607b
Comment 7 Quality Engineering 2011-10-07 14:43:01 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/5b422221607b
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #201549: Calls to org.openide.text.Line.show() must be performed on EDT