[vtk-developers] VTK Modular: vtkTextMapper::New returns null

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Apr 27 15:47:31 EDT 2012


On Fri, Apr 27, 2012 at 2:45 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> I'm trying to track down some VTK Wiki examples failures.  This line:
>  vtkSmartPointer<vtkSliderRepresentation2D> sliderRep =
>    vtkSmartPointer<vtkSliderRepresentation2D>::New();
> crashes.
> gdb shows that in vtkSliderRepresentation2D.cxx
> this->LabelMapper = vtkTextMapper::New();
> returns 0.
>
> Seems that the factory can't find a proper text mapper. However, the
> VTK build itself passes tests that use vtkSliderRepresentation2D.
>
This is a bug we discovered in the more deeply nested modules, I will
try to get a fix in. The issue is when your application does not
include a header from the interface module that is overridden by a
module. So in this case FreeType contains the interface, and
FreeTypeOpenGL the implementation but you are using Widgets and only
their implementation files include.

I had meant to chat to Brad about it, but including one of the headers
from the FreeType module fixed it in ChemData.

Marcus



More information about the vtk-developers mailing list