Richard Huddleston
2003-10-22 01:05:08 UTC
i have one thread process actionevents, then start another thread execute
code like "get user input" in a JOptionPane.showInputDialog. when i click
ok/cancel whatever the dialog closes, but the method from JOptionPane never
returns.
I thought this could just be a JOptionPane bug, but I re-implemented the
with a custom Dialog, the same bug. Doing thread analysis i get this for
the thread which is waiting for the Dialog to be closed.
"ThreadX" prio=10 tid=0x184c4688 nid=0x658 in Object.wait()
[209ff000..209ffd90]
at java.lang.Object.wait(Native Method)
- waiting on <0x1004e1e0> (a java.awt.EventQueue$1AWTInvocationLock)
at java.lang.Object.wait(Unknown Source)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
- locked <0x1004e1e0> (a java.awt.EventQueue$1AWTInvocationLock)
at java.awt.Window.dispose(Unknown Source)
at java.awt.Dialog.disposeImpl(Unknown Source)
at java.awt.Dialog.dispose(Unknown Source)
at javax.swing.JOptionPane.showInputDialog(Unknown Source)
at javax.swing.JOptionPane.showInputDialog(Unknown Source)
at javax.swing.JOptionPane.showInputDialog(Unknown Source)
at castles.gui.CastleGameApp.newGame(CastleGameApp.java:181)
- locked <0x105397b8> (a castles.gui.CastleGameApp)
at castles.gui.CastleGameApp.actionPerformed(CastleGameApp.java:136)
at castles.gui.ActionEventThread.run(ActionEventThread.java:34)
Also, my entire GUI stops re-drawing.
Any help would be apprecated.
Richard
code like "get user input" in a JOptionPane.showInputDialog. when i click
ok/cancel whatever the dialog closes, but the method from JOptionPane never
returns.
I thought this could just be a JOptionPane bug, but I re-implemented the
with a custom Dialog, the same bug. Doing thread analysis i get this for
the thread which is waiting for the Dialog to be closed.
"ThreadX" prio=10 tid=0x184c4688 nid=0x658 in Object.wait()
[209ff000..209ffd90]
at java.lang.Object.wait(Native Method)
- waiting on <0x1004e1e0> (a java.awt.EventQueue$1AWTInvocationLock)
at java.lang.Object.wait(Unknown Source)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
- locked <0x1004e1e0> (a java.awt.EventQueue$1AWTInvocationLock)
at java.awt.Window.dispose(Unknown Source)
at java.awt.Dialog.disposeImpl(Unknown Source)
at java.awt.Dialog.dispose(Unknown Source)
at javax.swing.JOptionPane.showInputDialog(Unknown Source)
at javax.swing.JOptionPane.showInputDialog(Unknown Source)
at javax.swing.JOptionPane.showInputDialog(Unknown Source)
at castles.gui.CastleGameApp.newGame(CastleGameApp.java:181)
- locked <0x105397b8> (a castles.gui.CastleGameApp)
at castles.gui.CastleGameApp.actionPerformed(CastleGameApp.java:136)
at castles.gui.ActionEventThread.run(ActionEventThread.java:34)
Also, my entire GUI stops re-drawing.
Any help would be apprecated.
Richard