[vtkusers] Bug in vtk java wrapper

Ali - saveez at hotmail.com
Tue Oct 3 20:11:26 EDT 2006


David,

Obviously you can make a java class abstract the way that you do it in c++. 
However, this does not solve the problem, as some other concrete classes 
derived from this class have the same poblem. Eg, this produces the same 
error:

vtkPolyData obj = new vtkPolyData();
obj.GetMTime();

>
>Do you have a recommendation about how to fix this?
>Is there a way to label a java class as abstract so that it cannot be 
>instantiated? (i.e. - "new vtkAbstractClass();" would be a java compile 
>failure...)
>
>Thanks,
>David
>
>Ali - wrote:
>
>>Hi,
>>
>>Running the following java code causes an error detected by hotspot 
>>virtual machine:
>>
>>vtkPointSet obj = new vtkPointSet();
>>obj.GetMTime();
>>
>>The reason is that vtkJavaGetPointerFromObject() in vtkJavaUtil returns 
>>NULL and the generated JNI wrapper does not validate the pointer. This 
>>error happens when the class and/or at least one of the cuper classes are 
>>abstract. I understand that the user does not need to create an abstract 
>>class, but, this bug is annoying.
>>
>>_________________________________________________________________
>>Windows Live™ Messenger has arrived. Click here to download it for free! 
>>http://imagine-msn.com/messenger/launch80/?locale=en-gb
>>
>>_______________________________________________
>>This is the private VTK discussion list. Please keep messages on-topic. 
>>Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters




More information about the vtkusers mailing list