[vtk-developers] VTK Modular: Classes that seg fault for xxx::New();

Marcus D. Hanwell marcus.hanwell at kitware.com
Sun Apr 29 14:14:51 EDT 2012


On Sat, Apr 28, 2012 at 10:09 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Marcus,
>
> I generated a short main program for every vtk class that defined a
> static New method.
> The program just does a
> vtkXXX *foo = vtkXXX::New();
>
> A number of classes seg faulted. I looked at a few in the debugger.
> Most are failing to create a vtkTextMapper, vtkRenderer and/or
> vtkRenderWindow.
>
> The following 23 classes seg faulted:
>
> vtkAffineRepresentation2D
> vtkBalloonRepresentation
> vtkBiDimensionalRepresentation2D
> vtkGeoCamera
> vtkGeoView
> vtkGeoView2D
> vtkGraphLayoutView
> vtkHierarchicalGraphView
> vtkIcicleView
> vtkImageViewer2
> vtkLabeledTreeMapDataMapper
> vtkLegendScaleActor
> vtkParallelCoordinatesView
> vtkRenderedSurfaceRepresentation
> vtkResliceCursorLineRepresentation
> vtkResliceCursorThickLineRepresentation
> vtkResliceImageViewer
> vtkSliderRepresentation2D
> vtkSphereRepresentation
> vtkTexturedButtonRepresentation2D
> vtkTreeAreaView
> vtkTreeMapView
> vtkTreeRingView
>
> Hope this helps resolve the factory issue.
>
See the topic http://review.source.kitware.com/#/t/485/ that should
reduce the length of this list some. We certainly need to address the
underlying issue of small application includes X from module A, module
A uses interface from module B that is implemented by module C.

We do not have a mechanism for propagating C's auto initialize call up
through B without asking you to include a header from B. I suspect
several of the view classes hit this as they initialize the window,
interactor etc and the client code never has to. We have a few ideas
we would like to discuss on Monday to ensure full initialization.

Thanks,

Marcus



More information about the vtk-developers mailing list