[vtkusers] VTK with JDK1.3.1_08

R K Shyamprakash ramakrishna.prakash at quest-global.com
Fri Jun 27 08:07:56 EDT 2003


Jeff,
	Say I am loading a .stl file into SourceViewer(which is a subclass of
vtkCanvas and it is a child of JTabbedPane). The crash occurs only during
the first load operation. Once the model is loaded everything works fine.
what I don't understand is, all operation gets executed in the event thread,
so there is no chance of another thread accessing the data at the same time.

	Further, when I move the mouse over the actor, I pick the cell and change
its scalar value(to paint the cell with a different color) . the whole thing
gets executed in the mouseDragged event thread. if I do this operation for
say, 8 to 10 minutes, the JAVA GUI freezes(toolbar and menubar goes blank)
though the vtk window(vtkCanvas) works fine. at this point if I close the
existing vtk window and open a new one everything returns to normal. I tried
forcing repaint and all other things. but nothing seems to be working. Can
you guess any reason for this?

Thanks
Shyam

-----Original Message-----
From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
Sent: Thursday, June 26, 2003 7:06 PM
To: R K Shyamprakash
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] VTK with JDK1.3.1_08




R K Shyamprakash wrote:

>Jeff,
>      I am running the application on Windows NT. I will test the same on
>Windows 2000 and check if it works.
>	One more thing. vtkPanel occasionally crashes(may be once in 150 times or
>so) in the Render() method. Below is the exact location where crash occurs
>  public synchronized void Render()
>  {
>    if (!rendering)
>      {
>        rendering = true;
>        if (ren.VisibleActorCount() == 0) {rendering = false; return;}
>        if (rw != null)
>          {
>            if (windowset == 0)
>              {
>                // set the window id and the active camera
>                cam = ren.GetActiveCamera();//here the application crashes
>
>	Is it because VTK is unable to find the active camera associated with
>vtkRenderer? Have you come across the same problem? below is the error
>message
>
>
no, it is likely due to the fact that some other thread is manipulating
the data while you are trying to access it from the renderer.  how does
this happen - are you adding/removing SourceViewer from its parent?  the
only time windowset= 0 is before the first render or when the panel gets
removed and added-back.
-Jeff

>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x24807FCD
>Function=vtkDataSetToPolyDataFilter::GetClassNameA+0x2577C
>Library=D:\apps\vtk42\bin\vtkFiltering.dll
>
>Current Java thread:
>	at vtk.vtkRenderer.GetActiveCamera_23(Native Method)
>	at vtk.vtkRenderer.GetActiveCamera(vtkRenderer.java:104)
>	at vtk.vtkPanel.Render(vtkPanel.java:125)
>	- locked <114A22A0> (a SourceViewer)
>	at SourceViewer.Render()(SourceViewer.java:171)
>	- locked <114A22A0> (a SourceViewer)
>Thanks
>Shyam
>
>
>




More information about the vtkusers mailing list