[vtkusers] problem on dual CPU machine under java (Mac OS X)

Bernard Giroux giroux at geo.polymtl.ca
Wed Sep 13 17:07:12 EDT 2006


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







More information about the vtkusers mailing list