[vtkusers] vtkPanel: IllegalMonitorStateException

Jeff Lee jeff at cdnorthamerica.com
Mon May 13 15:55:40 EDT 2002


All updates to the renderWindow should (must?) occur on the AWT event 
dispatching thread.  Use SwingUtilities.invokeLater() method from your 
createGui method (create a Runnable task and schedule it to happen on 
the Event Dispatch thread).  Are you spawning threads to do this?  Do 
you have a sample piece of code which demonstrates the problem?

-Jeff

ahmed Tokalak wrote:

>While starting my java-vtk-prog on linux following error occured:
>
>Error locking surface
>Exception occurred during event dispatching:
>java.lang.IllegalMonitorStateException: current thread not owner
>        at vtk.vtkPanel.UnLock(Native Method)
>        at vtk.vtkPanel.setSize(vtkPanel.java:59)
>        at SomWindow.createGui(SomWindow.java:481)
>        at SomBrowser.startRendering(SomBrowser.java:53)
>        at SomSelectionDialog.actionPerformed(SomSelectionDialog.java:59)
>        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
>        at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
>        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
>        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
>        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
>        at java.awt.Component.processMouseEvent(Component.java:3717)
>        at java.awt.Component.processEvent(Component.java:3546)
>        at java.awt.Container.processEvent(Container.java:1164)
>        at java.awt.Component.dispatchEventImpl(Component.java:2595)
>        at java.awt.Container.dispatchEventImpl(Container.java:1213)
>        at java.awt.Component.dispatchEvent(Component.java:2499)
>        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
>        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
>        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
>        at java.awt.Container.dispatchEventImpl(Container.java:1200)
>        at java.awt.Window.dispatchEventImpl(Window.java:912)
>        at java.awt.Component.dispatchEvent(Component.java:2499)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
>        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
>        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
>
>________________________________________________________________
>Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! 
>Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>

-- 
Jeff Lee 
Software Engineer jeff at cdnorthamerica.com
CD North America
21 Lafayette Street, Suite 230
Lebanon, NH 03766
Tel:    (603) 643-9993 ext. 109
Fax:    (603) 643-9994 






More information about the vtkusers mailing list