[vtkusers] Java / VTK problems

Jeff Lee jeff at cdnorthamerica.com
Wed May 9 13:40:14 EDT 2001

Perhaps some code would be in order?  I can say from experience that if you are manually
deleting vtk objects in java, bad things will happen because of the recent implementation of
weak-references in the vtk JNI.  I have not had any experiences like yours, however, but I
could look at your code.  What version of vtk?

Michael Bell wrote:

> vtkgurus,
>         I, and others have posted a few messages about problems that occur when
> using java under vtk. An example of the issue is:
> 1. Set up a scene
> 2. On every mouse click, change the color of an actor with
> actor.GetProperty().SetColor(...)
> 3. Intermittently, actor.GetProperty() returns null (not limited to
> GetProperty(). In general, members of a class become null randomly).
> With the help of others, I can say that
>         1. This problem does not occur in unix
>         2. This problem does not occur in C++ with nearly identical code
> Does anyone, especially a vtk developer, have any information about
> solutions or workarounds? Have you even run into this problem before? It
> sounds like a garbage collection issue to me. Could it be a JNI issue
> unrelated to VTK? Please help; this is a showstopping problem.
> Thanks,
> michael
> _______________________________________________
> 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

J.A. Lee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010509/84f9c08b/attachment.htm>

More information about the vtkusers mailing list