[vtk-developers] Problem with vtkTextMapper::New()
Philippe Pébay
philippe.pebay at kitware.com
Tue Dec 18 03:39:46 EST 2012
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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20121218/0020f6d9/attachment.htm>
More information about the vtk-developers
mailing list