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 224746 - IllegalThreadStateException: Should never be called from AWT thread
Summary: IllegalThreadStateException: Should never be called from AWT thread
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-11 09:36 UTC by Exceptions Reporter
Modified: 2016-07-06 14:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 197310


Attachments
stacktrace (7.99 KB, text/plain)
2013-01-11 09:36 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-01-11 09:36:01 UTC
This issue was reported manually by vv159170.
It already has 1 duplicates 


Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Windows 7

User Comments:
GUEST: Trying to attach to gdbserver with gdbserver plugin




Stacktrace: 
java.lang.IllegalThreadStateException: Should never be called from AWT thread
   at org.netbeans.modules.nativeexecution.api.util.ConnectionManager.connectTo(ConnectionManager.java:321)
   at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:205)
   at org.netbeans.modules.cnd.api.utils.PlatformInfo.<init>(PlatformInfo.java:83)
   at org.netbeans.modules.cnd.api.utils.PlatformInfo.getDefault(PlatformInfo.java:392)
   at org.netbeans.modules.cnd.debugger.common2.debugger.remote.ExecHost.<init>(ExecHost.java:67)
   at org.netbeans.modules.cnd.debugger.common2.debugger.remote.Host.byName(Host.java:120)
Comment 1 Exceptions Reporter 2013-01-11 09:36:03 UTC
Created attachment 130104 [details]
stacktrace
Comment 2 Maria Tishkova 2013-01-11 10:35:33 UTC
should be fixed in debugger
Comment 3 alibabashack 2013-05-30 11:56:25 UTC
The same exception is reported in Bug 227834.
Comment 4 Maria Tishkova 2013-06-20 11:51:31 UTC
The root cause of the problem is debugger is started in the AWT thread. This scheme should be re-visited in next release
Comment 5 Maria Tishkova 2014-02-12 12:11:08 UTC
Not in 8.0
Comment 6 jgomez 2014-03-13 10:15:45 UTC
(In reply to Maria Tishkova from comment #5)
> Not in 8.0

I just reproduced it on 8.0 RC1, as well as 7.4.
Comment 7 jgomez 2014-03-13 10:23:36 UTC
To throw some light on this "annoying" bug, these are my findings.
If you create a project from scratch, it works for a while but suddenly (and I don't really know why, cause I didn't change anything special) it stops working and this exception is launched. I noticed that if I remove netbeans project files and recreate it from scratch, it works again but sooner or later it stops working.
Comment 8 Maria Tishkova 2014-10-09 11:53:43 UTC
The problem here is PlatformInfo.getDefault invokes code that can initiate  ConnectionManager.connect which cannot be invoked from EDT thread.
And PlatformInfo.getDefault can be invoked from any thread.

While evaluating this bug I have found that we have similar abstractions
HostInfo from nativeexecution
PlatfromInfo from cnd.core
Host from debugger
ServersList and ServerRecord from cnd.api.remote

Consider to join abstractions at the beginning ofthe release