[osg-users] using osgShadow messes ref_ptrs on exit

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Wed Feb 24 12:33:32 PST 2016


Anders, the thing is not only for Programs/Shaders .. I take these out and
i starts just about anything else: StateSets, Uniforms, UserDataContainers
.....

On Wed, Feb 24, 2016 at 9:21 PM, Trajce Nikolov NICK <
trajce.nikolov.nick at gmail.com> wrote:

> Thanks Anders, I am on 3.5.1 .. Let me try the trunk then .. Thanks again!
>
>
>
> On Wed, Feb 24, 2016 at 9:19 PM, Anders Backman <andersb at cs.umu.se> wrote:
>
>> I believe this has been fixed in the trunk. But there is no official
>> release containing this fix just yet.
>> It happens with just about any osg::Program/Shader.
>>
>> /A
>>
>> On Wed, Feb 24, 2016 at 7:42 PM, Trajce Nikolov NICK <
>> trajce.nikolov.nick at gmail.com> wrote:
>>
>>> Hi Community,
>>>
>>> I've been fighting with cleaning of ref_ptrs when using osgShadow. It
>>> crashes in deleting the pointer. This is odd but attached is very simple
>>> example, osgviewer just with adding it to a shadowed scene with some
>>> technique.
>>>
>>> Any clue? Sample attached
>>>
>>>
>>> Thanks a bunch as always !
>>>
>>> Cheers,
>>> Nick
>>>
>>> void Referenced::signalObserversAndDelete(bool signalDelete, bool
>>> doDelete) const
>>> {
>>> #if defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
>>>     ObserverSet* observerSet =
>>> static_cast<ObserverSet*>(_observerSet.get());
>>> #else
>>>     ObserverSet* observerSet = static_cast<ObserverSet*>(_observerSet);
>>> #endif
>>>
>>>     if (observerSet && signalDelete)
>>>     {
>>>         observerSet->signalObjectDeleted(const_cast<Referenced*>(this));
>>>     }
>>>
>>>     if (doDelete)
>>>     {
>>>         if (_refCount!=0)
>>>             OSG_NOTICE<<"Warning
>>> Referenced::signalObserversAndDelete(,,) doing delete with
>>> _refCount="<<_refCount<<std::endl;
>>>
>>>         if (getDeleteHandler()) deleteUsingDeleteHandler();
>>>         CRASHES HERE -----> else delete this;
>>>     }
>>> }
>>>
>>> --
>>> trajce nikolov nick
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>> --
>> __________________________________________
>> Anders Backman, HPC2N
>> 90187 Umeå University, Sweden
>> anders at cs.umu.se http://www.hpc2n.umu.se
>> Cell: +46-70-392 64 67
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> trajce nikolov nick
>



-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160224/8e20ce38/attachment-0003.htm>


More information about the osg-users mailing list