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

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


Bill,

I have uploaded a topic with some changes that will alleviate the
issue (but not fix the underlying bug).

http://review.source.kitware.com/#/t/485/

I think independently of what we do to fix the bug, that change (or
something similar) should go in. These classes were badly placed,
having no dependence on FreeType and so it seems much more appropriate
to move them to Rendering/Core. This will fix a lot of the immediate
issues we are seeing, and open the door to future implementations of
text rendering using alternative backends. It joins vtkStringToImage
in core as abstract interface.

Thanks,

Marcus

On Fri, Apr 27, 2012 at 8:35 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Marcus,
>
> include vtkTextMapper in the example solves the crash. But, of course,
> this is not a good solution.
>
> I wonder how many other classes might have these issues.
>
> On Fri, Apr 27, 2012 at 3:56 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Great. Looking forward to a patch.
>>
>> The more apps trying VTK Modular, the better.
>>
>> It's encouraging how much progress is being made on VTK6 so quickly.
>>
>> Bill
>>
>> On Fri, Apr 27, 2012 at 3:47 PM, Marcus D. Hanwell
>> <marcus.hanwell at kitware.com> wrote:
>>> 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
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



More information about the vtk-developers mailing list