Could you provide a small case to reproduce the crash? Otherwise, could you provide more context like the type of dataset you are working on, the index/tuple size, or if you are writing data concurrently, etc.
The code I am running is a computer simulation of the cellular automaton model of cell growth in time and 2D space. I am using VTK to visualize the 2D cells at certain time point. I am pasting below the function that visualizes the cells:
initializeRendering();
addCells(begin, end);
//creating new color table
vtkSmartPointer<vtkLookupTable> colorLookupTable = vtkSmartPointer<vtkLookupTable>::New();
colorLookupTable->SetNumberOfColors(256);
colorLookupTable->SetHueRange( 0.667, 0.0);
colorLookupTable->Build();
// Combine into a polydata
vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();
polydata->SetPoints(points);
polydata->GetPointData()->SetScalars(scalar);
vtkSmartPointer<vtkSphereSource> SphereSource = vtkSmartPointer<vtkSphereSource>::New();//you can use sphere if you want
vtkSmartPointer<vtkGlyph3D> glyph3D = vtkSmartPointer<vtkGlyph3D>::New();
glyph3D->SetColorModeToColorByScalar();
glyph3D->SetSourceConnection(SphereSource->GetOutputPort());
glyph3D->ScalingOff();
glyph3D->SetInputData(polydata);
glyph3D->Update();
// Create a mapper and actor
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(glyph3D->GetOutputPort());
mapper->SetLookupTable(colorLookupTable);
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
// Add the actor to the scene
renderer->AddActor(actor);
// Render
renderWindow->Render();
vtkSmartPointer<vtkInteractorStyleTrackballCamera> style = vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New(); //like paraview
renderWindowInteractor->SetInteractorStyle( style );
renderWindowInteractor->Start();
}
The same code has no issues running when using 9.1 version of VTK. This happened after I upgraded my laptop to Ventura osx. I am running gcc version 13. Thanks for your input.
If I had to bet, I suspect that there is a memory issue elsewhere in the code that has been unmasked by upgrading the version. I suggest that you run a dynamic memory checker.