[osg-users] using osgShadow messes ref_ptrs on exit
Trajce Nikolov NICK
trajce.nikolov.nick at gmail.com
Wed Feb 24 10:42:55 PST 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160224/49dba639/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgviewer.cpp
Type: text/x-c++src
Size: 7745 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160224/49dba639/attachment-0002.cpp>
More information about the osg-users
mailing list