Hi,
since switching to Vaadin 7.7.5 we getting some times and radomly IllegalMonitorStateException in
Exception: java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:151)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1261)
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
at com.coco_on.docFlow.vaadin.MainWorkView.refreshAll(MainWorkView.java:427)
...
We working much with “Please wait” dialogs, so we have often background (worker) Threads. While updating the UI we use the UI.access(…) method to make sure that we are changing the UI in (hopefully) every case from a “valid” thread. But may be we calling also the UI.access(…) method if we are already in the “vaadin UI” thread (may be this is also a part of the problem?). The call of MainWorkView.refreshAll(…) is already inside of a UI.access-Runnable (see above StackTrace).
At the moment we getting the exception while a (very) complex view will be shown. For us it’s very difficult to find out what’s the problem is …
Whats the recommendet way to find the problem of the IllegalMonitorStateException? Why is this thrown while releasing the Lock (after looking at the Vaadin code I asume that the MonitorState must be already illegal while set the lock). Can be a forgetten “UI.access(…)” call the reason of this Exception? Any tipps for searching the error are welcome.
Many thanks,
Steffen
EDIT
:
Here another StackTrace:
Exception: java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:151)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1261)
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
at com.vaadin.server.VaadinSession.unlock(VaadinSession.java:1008)
at com.vaadin.server.VaadinService.ensureAccessQueuePurged(VaadinService.java:1809)
at com.vaadin.server.VaadinService.accessSession(VaadinService.java:1775)
at com.vaadin.server.VaadinSession.access(VaadinSession.java:1384)
at com.vaadin.ui.UI.access(UI.java:1460)
at com.coco_on.docFlow.vaadin.util.DocFlowViewComponent.doOk(DocFlowViewComponent.java:444)