Hi all,
I've been working lately on a Swing application. I created a simple generic form-like JDialog (Label - Input Text; ...; Lable - Input Text; Submit).
I devolope mainly on Ubuntu with
Sun JDK 1.6 u24.
No issues have been identified but few days ago I compiled and run this app on Windows 7, with exactly the same
java version and a problem occured.
Additional functionality is that the form allows user to choose a file. User clicks a
JButton and a
JFileChooser shows up. When OK is chosen absolute file path is displayed in a
JTextField. Everything takes place in
Event Driven Thread.
I implemented a Window Closing listener to dispose a main
JFrame (and the form-like
JDialog) and call
System.exit(0). When the app is closed occasionaly the following exception is thrown by Java 2D Disposer thread (which seems to be some intenral mechanism):
This happens only when using
JFileChooser. If there are only JLables and
JTextFieldeverything works fine.
As a temp solution I advise System to run the GC and it works as well.
I tried to run jvisualvm to idetify all threads and objects but everytime I create a dump the problem does not occur.
I created a simple app which generates the Exception with similar frequency as my main app:
I googled a little but this issue does not seem to be popular.
I had upgraded Java version to the latest release u26 but it didn't change anything.
Can any of you please try to run this code and check if it happens ?
Thanks in advance
Rafal