[vtkusers] [Java] ClassCastException caused by outdated entries in vtkGlobalJavaHash
Denis Barbier
bouzim at gmail.com
Wed Apr 29 05:13:43 EDT 2009
Hi,
After investigating some random crashes in our Java code, it appears
that the new vtkGlobalJavaHash.PointerToReference map may contain
references to deleted entries. When a Java object is explicitly
deleted by vtkObjectBase.Delete(), native object is deleted but
this reference is not removed from vtkGlobalJavaHash.PointerToReference.
Thus if a new VTK object is created with the same vtkId before object
is garbage collected, vtkGlobalJavaHash.PointerToReference.get(vtkId)
will return a non-null object.
I just filed http://www.vtk.org/Bug/view.php?id=8942 with a test case
and a fix.
Denis
More information about the vtkusers
mailing list