[vtkusers] Deleting unknown object: vtkObject - vector of pointers?

Bill Lorensen bill.lorensen at gmail.com
Tue Nov 10 19:33:13 EST 2009


David,

Here are your files with my changes. The deleting unknown message was
because vtkDebugLeaks uses the vtk factory mechanism to keep track of
references. You need to add to your .cxx
vtkCxxRevisionMacro(vtkLidarPoint, "$Revision: 1.1 $");
and
vtkCxxRevisionMacro(vtkRay, "$Revision: 1.1 $");

and your .h

  vtkTypeRevisionMacro(vtkLidarPoint,vtkObject);
and
  vtkTypeRevisionMacro(vtkLidarRay,vtkObject);
to your classes.

I made some other small changes also.

Bill


On Tue, Nov 10, 2009 at 5:11 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> David,
>
> There is still an issue with your classes.
>
> Stay tuned...
>
> Bill
>
> On Tue, Nov 10, 2009 at 4:59 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> David,
>>
>> I do get the deleting unknown object message. It only appeared after
>> turning debug leaks on. I didn't notice it the first time. I think you
>> are OK.
>>
>> Yes, I get the debug leaks, but I think they are bogus. Not sure why.
>> I ran valgrind with no leaks. Perhaps the std::vector is being deleted
>> after vtk does its debug leaks detection. but, from the debug output
>> you can see that the LidarPoint and Ray are being deleted.
>>
>> I'll look into this problem with debug leaks.
>>
>> You should proceed with the assumption that everything you are doing is correct.
>>
>> Bill
>>
>> On Tue, Nov 10, 2009 at 4:44 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
>>> On Tue, Nov 10, 2009 at 3:46 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>>>> David,
>>>>
>>>> Try the attached. I instrumented it with more output and ->DebugOn()
>>>> to show register/delete's. Everything looks fine to me.
>>>>
>>>> Bill
>>>
>>> Here are my outputs with and without LidarPoint->DebugOn();
>>>
>>> http://www.rpi.edu/~doriad/VTK_List/DeletingUnknownObject/nodebug.txt
>>> http://www.rpi.edu/~doriad/VTK_List/DeletingUnknownObject/debug.txt
>>>
>>> In both cases, I still get a bunch of "Generic Warning: Deleting
>>> unknown object: vtkObject "
>>>
>>> and also:
>>>
>>> vtkDebugLeaks has detected LEAKS!
>>> Class "vtkRay" has 4 instances still around.
>>> Class "vtkLidarPoint" has 4 instances still around.
>>>
>>> Do you not get those??
>>>
>>> Thanks,
>>>
>>> David
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkLidarPoint.cxx
Type: text/x-c++src
Size: 441 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091110/8cd110e2/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkLidarPoint.h
Type: text/x-c++src
Size: 734 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091110/8cd110e2/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkRay.cxx
Type: text/x-c++src
Size: 310 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091110/8cd110e2/attachment-0001.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkRay.h
Type: text/x-c++src
Size: 451 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091110/8cd110e2/attachment-0001.cc>


More information about the vtkusers mailing list