[IGSTK-Users] Segmentation Fault when Adding and Removing objects

Matt Turek matt.turek at kitware.com
Fri Jan 25 12:22:18 EST 2008



I'm sorry for the confusion; my comment was meant as a way to understand 
the problem.

Changes have been made to the Sandbox code, though, since my original 
comment. I would expect that these changes, specifically to the reset 
camera code in the view, would have fixed this issue.

Please let me know if you are still having the problem with the current 
version of the Sandbox and without the change to ObjectRepresentation 
visibility.

Thanks,
Matt


Vincent Gratsac wrote:
> Hi Torleif,
>
> Thank you for your reply and sorry for the delay.
>
> Actually, these changes correct the adding/removing problem, but is it 
> correct to set all ObjectRepresentation visible by default ? Is this a 
> way to determine and to understand to problem, or is this a solution ?
>
> Have a nice day,
>
> Vincent
>
> Sandnes Torleif a écrit :
>> Hi Vincent. I got this reply from Matt Turek. After making the 
>> changes he proposed, the adding/removing problem went away.
>>
>> Torleif
>>
>> -----Original Message-----
>> From: Matt Turek [mailto:matt.turek at kitware.com]
>> Sent: Thu 11/29/2007 9:44 PM
>> To: Sandnes Torleif
>> Cc: Andinet Enquobahrie
>> Subject: Re: [IGSTK-Developers] Problem adding and removing 
>> MeshObjectRepresentation to ViewNew3D
>>  
>>
>> Torleif,
>>
>> Would you try changing the following lines in igstkObjectRepresentation
>>
>> from:
>>
>> /** Add an actor to the actors list */
>> void ObjectRepresentation::AddActor( vtkProp * actor )
>> {
>>   // Initialize objects as invisible until we learn from their 
>> Transform time stamp.
>>   actor->VisibilityOff();
>>   m_Actors.push_back( actor );
>> }
>>
>> to:
>>
>> /** Add an actor to the actors list */
>> void ObjectRepresentation::AddActor( vtkProp * actor )
>> {
>>   // Initialize objects as invisible until we learn from their 
>> Transform time stamp.
>>   actor->VisibilityOn(); // <-- HERE
>>   m_Actors.push_back( actor );
>> }
>>
>> This change will help us understand if there's an issue related to 
>> the visibility state machine in the object representation.
>>
>> Thanks,
>> Matt
>>
>>
>> Torleif Sandnes wrote:
>>  
>>> Hi.
>>>
>>> I have tried to use igstk::MeshObjectRepresentation in my 
>>> application, but I have encountered some problems using it:
>>>
>>> 1. I first load the meshobject and set up the representation. In a 
>>> separate operation initiated by the user, I add the representation 
>>> to the view. It seems I have to do the add operation twice to show 
>>> the loaded mesh.
>>>
>>> 2. When I remove the meshobject from the view, I cannot add it back 
>>> to the view no matter how many times I perform RequestAddObject on 
>>> the View.
>>>
>>> Can anybody explain why this happens?
>>> Am I doing something wrong, or does the problem lie in the mesh 
>>> representation object?
>>>
>>> I have attached a minimal example that shows the behaviour I describe.
>>> Note that this example is built against a slightly old version of 
>>> the sandbox.
>>>
>>> Regards
>>>
>>> Torleif Sandnes
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>> _______________________________________________
>>> IGSTK-Developers mailing list
>>> IGSTK-Developers at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>>     
>>
>>   
>


-- 
Matt Turek, Ph.D.
R&D Engineer
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x142
email: Matt.Turek at kitware.com




More information about the IGSTK-Users mailing list