Opened 5 years ago
Closed 5 years ago
#1566 closed defect (fixed)
Java Error when splash screen is clicked.
| Reported by: | anonymous | Owned by: | framm |
|---|---|---|---|
| Priority: | major | Component: | Core |
| Version: | latest | Keywords: | |
| Cc: |
Description
If the new splash screen (in the most recent SVN release) is clicked when it is shown during application start-up the following error is raised:
Development version. Unknown revision.
java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at org.openstreetmap.josm.gui.SplashScreen$2.mousePressed(SplashScreen.java:109)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(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.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)
at java.awt.EventDispatchThread.run(Unknown Source)
Attachments (1)
Change History (2)
comment:1 Changed 5 years ago by anonymous
- Resolution set to fixed
- Status changed from new to closed



The problem is to call invokeAndWait in an Function which already runs in the Event Dispatch thread. That will cause a block of the Event Dispatch Thread.
The solution just run the runnable. It is already in the Event Dispatch Thread.
I added a Patch. I hope it fix it. I tested it. Just one line.