java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via freecol by calebrw
, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
via Oracle Community by 771514, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
via Stack Overflow by Aly
, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
via Jogamp Bugzilla by vsector, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
via GitHub by bflorat
, 2 years ago
Cannot call invokeAndWait from the event dispatcher thread
via Oracle Community by 843804, 1 year ago
Cannot call invokeAndWait from the event dispatcher thread
java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at net.sf.freecol.client.control.InGameInputHandler.setCurrentPlayer(InGameInputHandler.java:464)
at net.sf.freecol.client.control.InGameInputHandler.handle(InGameInputHandler.java:129)
at net.sf.freecol.common.networking.ServerAPI.askHandling(ServerAPI.java:311)
at net.sf.freecol.common.networking.ServerAPI.endTurn(ServerAPI.java:693)
at net.sf.freecol.client.control.InGameController.doEndTurn(InGameController.java:3717)
at net.sf.freecol.client.control.InGameController.endTurn(InGameController.java:3693)
at net.sf.freecol.client.gui.action.EndTurnAction.actionPerformed(EndTurnAction.java:55)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.