I have the following method,
private void addToContainer(DefaultFormBuilder build) {
/* Build the UI*/
//The UI is built by reading from an XML.
/* Add items to Array list */
arrayList.add(views); //views is JComponent
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
From jstack:
"AWT-EventQueue-0" prio=10 tid=0x00007f63a8742800 nid=0x7f9b waiting on condition [0x00007f63a465c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007dddec5f8> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236)
at com.test.addToContainer(test.java:450)
Am not sure what is going wrong in this method. Adding views to arrayList can cause this problem?
Expected : After this method executes an UI will be launched. However it is not launched in this scenario. Am not getting this error always but very rarely seen.(so far i have faced it only once)
Am new to this please help.