On Mon, Mar 23, 2009 at 2:38 PM, Carsten Neumann
<[email protected]> wrote:
>        Hello Allen,
>
> Allen Bierbaum wrote:
>> I am trying to run down a memory bug in my application.  I think
>> OpenSG is somehow getting ahold of a deleted object, but I am not
>> sure.
>>
>> I had added some code to help with this type of issue a year or more
>> ago using the OSG_ENABLE_MEMORY_DEBUGGING setting.  As I remember,
>> this would check that objects are valid as part of commitChanges()
>> calls.
>
> that code is still there as well as the cmake option to enable it.

Yep.  I have it enabled, just looking for more ways to trap this type
of error sooner.

>> What I was wondering is does anyone know how we could extend this
>> further?  Perhaps making dereferencing in all the XxxPtr types check
>> that the fc is still valid?
>
> off hand I don't quite see how to do this. To tell if a container is
> still valid you need it's id which you can use to query the factory. But
> to get the id from a container it has to be alive in the first place
> otherwise you are already operating on a dead object...

That was kind of what I was getting at.  I am assuming that a XxxPtr
type could check the field container it is pointing to and see if it
has it's internals cleared to say that it is actually not valid
anymore.  So basically putting up a big red flag whenever someone
tries to access a dead object.  Maybe this doesn't work well with the
current architecture.  I really don't know because I can't see to
understand the low-level details of the current system. :(

>
>> If we had that, then I think it would
>> stop the application in it's tracks the first time it tries to use an
>> fc that is not valid anymore.
>>
>> Would this work?  How could it be implemented?  (I currently have a
>> _check_is_deleted() method on OSGReflexiveContainer, but I am not sure
>> if that is the best place)
>
> what does it do? ;)

It was supposed to check to see if the FC has been destroyed but was
still being accessed somehwer.

-Allen

>
>        Cheers,
>                Carsten
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to