[vtkusers] problem on dual CPU machine under java (Mac OS X)
Bernard Giroux
giroux at geo.polymtl.ca
Thu Sep 14 17:37:50 EDT 2006
I taught of a solution this morning when I awoke...
For the record: just copy the vkkPoints underlying the vtkPolyData (I
taught it was done in the first DeepCopy):
public void setFacets(final vtkPolyData f) {
if (facets == null)
facets = new vtkPolyData();
facets.DeepCopy(f);
facets.GetPoints().DeepCopy(f.GetPoints()); <--- added
facets.Update();
...
}
Le 06-09-13 à 17:07, Bernard Giroux a écrit :
> I am sort of newbie at this and would like any advice... I am
> developing on a dual G5 running Tiger.
>
> I have a class with a private vtkPolyData member (facets), which I
> initialize in a method the following way:
>
> public void setFacets(vtkPolyData f) {
> if (facets == null)
> facets = new vtkPolyData();
> facets.DeepCopy(f);
> facets.Update();
>
> ...
> }
>
> I use it later on in another method:
>
> public double gz(double[] po) {
> if (facets == null) {
> throw new NullPointerException();
> }
> double gz = 0.0;
> vtkPoints vtkPts = new vtkPoints();
> System.out.printf("Number of cells: %d\n", facets.GetNumberOfCells
> ());
> for (int i = 0; i < facets.GetNumberOfCells(); ++i) {
> System.out.print(i + " " + facets.GetNumberOfCells());
> int nEdges = facets.GetCell(i).GetNumberOfEdges();
> System.out.print(" . 1a");
> vtkPts.DeepCopy(facets.GetCell(i).GetPoints());
> ...
> }
>
> At some point in the above loop, the program crashes at the
> GetNumberOfEdges() call, with the following message.
>
> EXC_BAD_ACCESS (0x0001)
> KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
> Thread 12 Crashed:
> 0 Java_vtk_vtkTriangle_GetNumberOfEdges_15 + 68
>
>
>
> *** This does not happen if I run the program on just one CPU ***
> Any idea???
>
>
> ---
> Bernard Giroux, ing., Ph.D.
> Associé de recherche
>
> http://geo.polymtl.ca/~giroux
>
>
>
>
> _______________________________________________
> 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
_____________________________________
Bernard Giroux, ing., Ph.D.
Associé de recherche - géophysique appliquée
http://geo.polymtl.ca/~giroux
More information about the vtkusers
mailing list