[osg-users] Deleting still referenced object

Voerman, L. l.voerman at rug.nl
Mon Jan 14 02:54:59 PST 2019


Hi Richard,
sorry to drop into the discussion so late, I think the problem is that you
should call
getRefFromObjectCache
instead of
getFromObjectCache

available in osg versions above 3.3.4, this should close the gap where the
refCount can touch zero.
>From your stack trace the call seems to come from the flightgear code:

   1. ot21-OpenThreads.dll!OpenThreads::Mutex::lock() Line 115 C++
   2. osg160-osgDB.dll!osgDB::ObjectCache::getFromObjectCache(const
   std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
   fileName, const osgDB::Options * options) Line 99 C++
   3. fgfs.exe!simgear::DefaultCachePolicy::find(const
   std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
   fileName, const osgDB::Options * opt) Line 724 C++

Regards, Laurens.

On Mon, Jan 14, 2019 at 8:28 AM Richard Harrison <rjh at zaretto.com> wrote:

> On 11/01/2019 07:38, Robert Osfield wrote:
> > If you are able to characterise what is going on then let me know and
> > I may be able to help spot a solution.  Having a small example that
> >
> For some reason my last message doesn't seem to have made it to this
> list; it's on the forum[1]
>
> I've diagnosed what I think is the problem, I've got a solution and I've
> tested it; what I'm really after is confirmation that I haven't missed
> something.
>
> This relates to pull request
> https://github.com/openscenegraph/OpenSceneGraph/pull/690
>
> -------------------
>
> [1]
>
> http://forum.openscenegraph.org/viewtopic.php?p=75443&sid=f9ec59f5127e4760f6694c56b925f54a#75443
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190114/6d09bd6c/attachment.html>


More information about the osg-users mailing list