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.
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)
Created attachment 130104 [details] stacktrace
should be fixed in debugger
The same exception is reported in Bug 227834.
The root cause of the problem is debugger is started in the AWT thread. This scheme should be re-visited in next release
Not in 8.0
(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.
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.
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