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

Vincent Gratsac vincent.gratsac at irisa.fr
Wed Jan 16 09:43:54 EST 2008


Hi all,

Thank you for taking care of my bug report, and for submitting a quick 
reply.

I updated the IGSTK Sandbox source and rebuild it. So now, I have no 
problem when adding and removing ObjectRepresentation.
Thank you very much for your fix.

Unfortunately, I think that a small bug is still remaining. I tried to 
use the example that I submitted in my last mail, and I found that if I 
close the application when an ObjectRepresentation is displayed, it will 
generated a segmentation fault.
Can you reproduce this bug ? And do you have any idea on the origin of it ?

Have a nice day,

Vincent

Matt Turek wrote:
>
>
> Vincent,
>
> Luis, Andinet, and I looked into the bug you submitted and we think we 
> have a fix.
>
> There was an issue when an igstk::ObjectRepresentation was deleted. An 
> event transduction macro in igstk::ObjectRepresentation had created an 
> observer that was still attached to the igstk::SpatialObject, even 
> after the igstk::ObjectRepresentation was deleted. This caused a crash 
> when the igstk::SpatialObject tried to invoke the callback in the 
> deleted igstk::ObjectRepresentation.
>
> Luis has checked in changes in igstkMacros.h, igstkObject.h, and 
> igstkObject.cxx that should fix the problem. Now, an igstk::Object 
> maintains a list of observed objects and observer tags and cleans up 
> its observer callbacks when igstk::Object is destroyed. 
> RemoveFromObservedObjects() in igstk::Object::~Object() carries out 
> the cleanup.
>
> We have also checked in a test, igstkObjectRepresentationRemovalTest, 
> in Sandbox/Testing that reproduced the problem.
>
> Would you update your source, rebuild, and verify that we've fixed the 
> crash?
>
> Thanks again for another great bug report. The example you provided 
> was a huge help.
>
> Thanks,
> Matt
>
>
>
>
>
>
> Andinet Enquobahrie wrote:
>> Hi Vincent,
>>
>> This is to acknowledge that I was able to build your small example and
>> reproduce your problem.  I will look into and get back to you.
>>
>> Thanks for providing the small example.
>>
>> -Andinet
>>
>>> Hi igstk-users,
>>>
>>> I am faced with a serious bug in my code, and I am not able to find 
>>> where it comes from.
>>>
>>> When I add one (or some) representation(s) to a view, and next 
>>> remove one (or some),  the program results in a segmentation fault.
>>> An important point is that adding/removing must be made by the user, 
>>> through the user interface.
>>>
>>> I tried to reproduce this bug in a simple example, in order to debug 
>>> and understand it.
>>> I attached the corresponding code inspired from the 
>>> OneViewAndTrackingUsingQtWidget example.
>>>
>>> Please let me know if I made any mistake, or if you don't understand 
>>> something in my code.
>>>
>>> Thank you and have a nice day,
>>>
>>> Vincent
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>> _______________________________________________
>>> IGSTK-Users mailing list
>>> IGSTK-Users at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>>>
>>
>>
>
>

-- 
Vincent Gratsac
----------------------------------------------------
Unité/Projet VisAGeS U746
INSERM/INRIA/CNRS/U. de Rennes I
IRISA
Campus de Beaulieu, 35042 Rennes Cedex, France

Ph:  +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 71
email: Vincent.Gratsac at irisa.fr
http://www.irisa.fr/visages/
----------------------------------------------------- 



More information about the IGSTK-Users mailing list