[vtkusers] FW: VTK and JAVA

Jeff Lee jeff at cdnorthamerica.com
Wed Jun 25 06:20:46 EDT 2003


Chandran Ramu wrote:

>Hi All,
>          I am using VTK 4.2 with Java 1.4.1_02 on Windows NT 4.0. I am
>using vtkCanvas along with Swing components. My application often crashes
>saying that the vtkCanvas is locked. This happens in the Render() method
>call of vtkCanvas(most of the times when I remove actors from vtkRenderer
>and add new actors). I went through the user's archive and as suggested in
>that, I never make direct call to vtkRenderWindow.Render(). 
>
locking during a render is only half the battle.  you also need to make 
sure not to be modifying your actors, or the contents of the 
renderWindow(i.e. "the model") during a render.  because java is 
multithreaded, it is easy to cause such problems.  why is 
vtkOutputWindow being used?  what happens in vtkWindow.displayChanged()?
-Jeff

>But still the
>problem persists. Can somebody please help me. below is the error message
>
>Thanks
>Ramu
>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x246B0F14
>Function=vtkFileOutputWindow::NewInstance+0x884E9
>Library=C:\WINNT\system32\vtkCommon.dll
>
>Current Java thread:
>	at vtk.vtkRenderWindow.Render_6(Native Method)
>	at vtk.vtkRenderWindow.Render(vtkRenderWindow.java:36)
>	at vtk.vtkPanel.Render(vtkPanel.java:141)     //Here vtkPanel.java calls
>rw.Render() with proper locking
>	- locked <1149E818> (a VTKWindow)
>	at VTKWindow.displayChanged(VTKWindow.java:272)
>	at VTKWindow.fireDisplayChanged(VTKModel.java:761)
>	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
>	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
>	at
>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
>va:197)
>	at
>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
>:150)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
>	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
>
>  
>





More information about the vtkusers mailing list