[vtkusers] Java binding and null pointers

Matthias Baitsch matthias.baitsch at ruhr-uni-bochum.de
Thu Feb 28 10:30:15 EST 2008


Hi!

I have a problem using VTK with Java when accessing uninitialized  
members of VTK objects. For instance, the code
   vtkPolyData pd = new vtkPolyData();
   pd.GetPoints();
lets the application exit (on a mac) with
   Invalid memory access of location 00000000 eip=0e109e76
whereas I would expect the GetPoints method to return a null-pointer.

Perhaps, adding one line to the generated Java code would help:
   public vtkPoints GetPoints() {
     long temp = GetPoints_13();
     if(temp == 0) return null;
     ...


Furthermore, I wonder whether it should be possible to do something like
   vtkPolyData pd = ...;
   pd.setLines(null);
Currently, this also results in a memory access violation.


My VTK version is
   vtk version 5.1.0, vtk source $Revision: 1.3027 $, $Date:  
2008/02/14 18:37:09 $ (GMT)
The behaviour is the same on Mac OS X and Linux.


Matthias


--
Dr.-Ing. Matthias Baitsch

Ruhr-Universität Bochum
Lehrstuhl für Ingenieurinformatik im Bauwesen
Gebäude IA 6/144
D-44780 Bochum

Tel.   : +49-(0)234-32-26175
Fax    : +49-(0)234-32-06175
Email  : matthias.baitsch at ruhr-uni-bochum.de






More information about the vtkusers mailing list