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 178760 - Don't call getHostInfo() from the UI thread... exception
Summary: Don't call getHostInfo() from the UI thread... exception
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-16 21:47 UTC by Thomas Preisler
Modified: 2009-12-17 23:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2009-12-16 21:47:30 UTC
Today I'm getting the exception below when I execute a project using the Run button. It happens only the very first time you click the button. Second time is fine.

button.java.lang.Exception: Don't call getHostInfo() from the UI thread while info is not known. Use quick isHostInfoAvailable() to detect whether info is available or not and go out of EDT if not
    at org.netbeans.modules.nativeexecution.support.Logger.assertNonUiThread(Logger.java:94)
    at org.netbeans.modules.nativeexecution.api.util.HostInfoUtils.getHostInfo(HostInfoUtils.java:190)
    at org.netbeans.modules.cnd.api.utils.PlatformInfo.<init>(PlatformInfo.java:80)
    at org.netbeans.modules.cnd.api.utils.PlatformInfo.getDefault(PlatformInfo.java:391)
    at org.netbeans.modules.cnd.makeproject.api.configurations.MakeConfiguration.getPlatformInfo(MakeConfiguration.java:230)
    at org.netbeans.modules.cnd.makeproject.MakeActionProvider.addTarget(MakeActionProvider.java:465)
    at org.netbeans.modules.cnd.makeproject.MakeActionProvider.addAction(MakeActionProvider.java:425)
    at org.netbeans.modules.cnd.makeproject.MakeActionProvider$1.runImpl(MakeActionProvider.java:303)
    at org.netbeans.modules.cnd.makeproject.MakeActionProvider$CancellableTask.run(MakeActionProvider.java:1431)
    at org.netbeans.modules.cnd.makeproject.MakeActionProvider.runActionWorker(MakeActionProvider.java:316)
    at org.netbeans.modules.cnd.makeproject.MakeActionProvider.invokeAction(MakeActionProvider.java:311)
    at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(MainProjectAction.java:160)
    at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:166)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6216)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5981)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4583)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4413)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4413)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 Alexander Simon 2009-12-17 01:33:55 UTC
Exception because action performs work in EDT.
Action should not call performer in EDT (especially make/run actions)
Comment 2 Alexander Simon 2009-12-17 05:56:53 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/736568e55e84
Comment 3 Quality Engineering 2009-12-17 23:51:31 UTC
Integrated into 'main-golden', will be available in build *200912180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3835564fa8ec
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed BZ#178760 Don't call getHostInfo() from the UI thread... exception