Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple Event Dispatch Threads causing deadlock in Java Web Start app
    primarykey
    data
    text
    <p>I am writing a Java Web Start application and I have observed it freezing. When I do a thread dump, I can see the two threads involved in the deadlock are both Event Dispatch Threads.</p> <p>When I run the app locally, there is only one EDT, but when I download and run through Java Web Start, there is a second one.</p> <p>Can someone tell me why there is a second EDT, and how can I prevent them deadlocking with each other?</p> <p>edit: After monitoring the app using JVisualVM, I believe that the second EDT is responsible for redrawing the java console window.</p> <pre><code>Found one Java-level deadlock: ============================= "AWT-EventQueue-1": waiting to lock monitor 0x07e4d8fc (object 0x29c2d950, a java.awt.Component$AWTTreeLock), which is held by "AWT-EventQueue-0" "AWT-EventQueue-0": waiting to lock monitor 0x07e4cbfc (object 0x29c294e8, a java.lang.StringBuilder), which is held by "AWT-EventQueue-1" Java stack information for the threads listed above: =================================================== "AWT-EventQueue-1": at java.awt.Window.getOpacity(Unknown Source) - waiting to lock &lt;0x29c2d950&gt; (a java.awt.Component$AWTTreeLock) at sun.awt.SunToolkit.isContainingTopLevelTranslucent(Unknown Source) at sun.awt.windows.WComponentPeer.isAccelCapable(Unknown Source) at sun.java2d.d3d.D3DSurfaceData$D3DWindowSurfaceData.restoreSurface(Unknown Source) at sun.java2d.d3d.D3DScreenUpdateManager.validate(Unknown Source) at sun.java2d.d3d.D3DScreenUpdateManager.createGraphics(Unknown Source) at sun.awt.windows.WComponentPeer.getGraphics(Unknown Source) at java.awt.Component.getGraphics(Unknown Source) at javax.swing.JFrame.getGraphics(Unknown Source) at javax.swing.JComponent.safelyGetGraphics(Unknown Source) - locked &lt;0x29c294e8&gt; (a java.lang.StringBuilder) at javax.swing.RepaintManager$3.run(Unknown Source) ... at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "AWT-EventQueue-0": at javax.swing.JComponent.isComponentObtainingGraphicsFrom(Unknown Source) - waiting to lock &lt;0x29c294e8&gt; (a java.lang.StringBuilder) at javax.swing.JComponent.getGraphicsInvoked(Unknown Source) at javax.swing.JFrame.getGraphics(Unknown Source) ... at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload