[vtk-developers] Problem with vtkTextMapper::New()
Philippe Pébay
philippe.pebay at kitware.com
Tue Dec 18 03:45:32 EST 2012
Hello all,
I just noticed that adding vtkRenderingFreeTypeOpenGL to the TEST_DEPENDS
entries appears to fix this problem.
I view this as a problem because short of stepping through the code,
nothing indicates that this module must be included when using a library
that uses vtkTextMapper. Couldn't this be either done automatically, or
result in a configuration error when not done manually?
Thanks
P
On Tue, Dec 18, 2012 at 9:39 AM, Philippe Pébay
<philippe.pebay at kitware.com>wrote:
> Hello all,
>
> I have uncovered the following problem with vtkTextMapper::New() : when
> attempting to create (via vtkNew) a scalar bar actor from a test program in
> Filters/HyperTree/Testing/Cxx, I run into a runtime error caused by the
> fact that line 78 of vtkScalarBarActor.cxx,
> this->TitleMapper = vtkTextMapper::New();
> consistently results in a 0x0 pointer for the TitleMapper instance.
>
> After digging down with gdb, it appears that the culprit is to be found
> in vtkObjectFactory::CreateInstance(const char* vtkclassname), which for a
> value of vtkclassname equal to "vtkTextMapper" cannot create a
> corresponding object in line 62:
> vtkObject* newobject = factory->CreateObject(vtkclassname);
>
>
> (gdb) n
> 58 for(vtkObjectFactory::RegisteredFactories->InitTraversal(osit);
> (gdb)
> 62 vtkObject* newobject = factory->CreateObject(vtkclassname);
> (gdb) p vtkclassname
> $4 = 0x7ffff4a97a41 "vtkTextMapper"
> (gdb) p newobject
> $5 = (vtkObject *) 0x31
> (gdb) n
> 63 if(newobject)
> (gdb) p newobject
> $6 = (vtkObject *) 0x0
>
> As a result, vtkScalarBarActor always fails when attempting to access the
> TitleMapper, specifically here:
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff42ddb19 in vtkScalarBarActor::RenderOpaqueGeometry
> (this=0x6c0110, viewport=0x6d3870)
> at
> /home/philippe/git/VTK/Rendering/Annotation/vtkScalarBarActor.cxx:562
> 562 this->TitleMapper->SetInput(this->Title);
>
> My module.cmake file in Filters/HyperTree has the following entries for
> TEST_DEPENDS:
> vtkFiltersModeling
> vtkIOXML
> vtkIOLegacy
> vtkRenderingAnnotation
> vtkRenderingOpenGL
> vtkTestingRendering
> vtkInteractionStyle
> vtkRenderingFreeType
>
> Has anyone any precise idea of what might be going on here?
>
> Thanks
> P
>
> --
> Philippe Pébay, PhD
> Director of Visualization and High Performance Computing /
> Directeur de la Visualisation et du Calcul Haute Performance
> Kitware SAS
> 26 rue Louis Guérin, 69100 Villeurbanne, France
> +33 (0) 6.83.61.55.70 / 4.37.45.04.15
> http://www.kitware.fr <http://www.kitware.fr/>
>
--
Philippe Pébay, PhD
Director of Visualization and High Performance Computing /
Directeur de la Visualisation et du Calcul Haute Performance
Kitware SAS
26 rue Louis Guérin, 69100 Villeurbanne, France
+33 (0) 6.83.61.55.70 / 4.37.45.04.15
http://www.kitware.fr <http://www.kitware.fr/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20121218/71321656/attachment.htm>
More information about the vtk-developers
mailing list