[vtkusers] Release only bug using widget

Jose Ignacio Prieto joseignacio.prieto at gmail.com
Wed Jan 29 09:01:50 EST 2014


Thanks. I finally solved my problem by changing all pointers to smart
pointers. I think the problem was that inside an object referenced with a
normal pointer there were other objects with smart pointer, so when I
deleted the main object, then the other objects still remained. Thanks
anyway.

Ignacio


On Tue, Jan 28, 2014 at 11:06 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> Remove the Delete
> On Jan 28, 2014 10:00 AM, "Jose Ignacio Prieto" <
> joseignacio.prieto at gmail.com> wrote:
>
>> Hi all,
>> I am having a release only bug I haven't been able to trace. It happens
>> when I create an object in a smartpointer, delete it and then create again.
>> I am using a class derived from vtkDistanceWidget. It is stored in a
>> vtkSmartPointer inside a interactor observer  derived class.
>> The deletion method inside interactorobserver is like this:
>>
>>             this->m_ellipsoidWidget->ReleaseFocus();
>>
>>             this->m_ellipsoidWidget->Delete();
>>
>>
>> And the creation method inside interactorobserver is:
>>
>>            this->m_ellipsoidWidget = vtkSmartPointer< epxVtkEllipsoidWidget>::New();
>>
>>             this->m_ellipsoidWidget->SetDebug(1);
>>
>>             this->m_ellipsoidWidget->SetInteractor(this ->GetInteractor());
>>
>>             this->m_ellipsoidWidget->SetCurrentRenderer(this->win->ren);
>>
>>             this->m_ellipsoidWidget->SetEnabled(1);
>>
>>
>> The problem is that I can't find the error on debug mode, it only appears on release. I tried to set both methods under a try-catch block with std::exception but they are not caught. Setting console output I figured out it breaks after the SetDebug line. What can it be??
>>
>>
>> Thank you very much, I have no clue on this.
>>
>>
>> Ignacio Prieto
>>
>>
>>
>>     --
>> Ignacio Prieto
>> Software Developer
>> Biomedical Imaging Center
>> Pontificia Universidad Católica de Chile
>>
>> _______________________________________________
>> 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
>>
>>


-- 
José Ignacio Prieto
celular(nuevo): 94348182
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140129/eaf00324/attachment.html>


More information about the vtkusers mailing list