<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Richard,<div>sorry to drop into the discussion so late, I think the problem is that you should call</div><div>getRefFromObjectCache</div><div>instead of </div><div>getFromObjectCache</div><div><br></div><div>available in osg versions above 3.3.4, this should close the gap where the refCount can touch zero.</div><div>From your stack trace the call seems to come from the flightgear code:</div><div><ol type="1" style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(239,239,239)"><li>ot21-OpenThreads.dll!OpenThreads::Mutex::lock() Line 115 C++ <br></li><li>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++ <br></li><li>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++ </li></ol><div><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><span style="font-size:12px">Regards, Laurens.</span></font></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 14, 2019 at 8:28 AM Richard Harrison <<a href="mailto:rjh@zaretto.com">rjh@zaretto.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/01/2019 07:38, Robert Osfield wrote:<br>
> If you are able to characterise what is going on then let me know and<br>
> I may be able to help spot a solution. Having a small example that<br>
><br>
For some reason my last message doesn't seem to have made it to this <br>
list; it's on the forum[1]<br>
<br>
I've diagnosed what I think is the problem, I've got a solution and I've <br>
tested it; what I'm really after is confirmation that I haven't missed <br>
something.<br>
<br>
This relates to pull request <br>
<a href="https://github.com/openscenegraph/OpenSceneGraph/pull/690" rel="noreferrer" target="_blank">https://github.com/openscenegraph/OpenSceneGraph/pull/690</a><br>
<br>
-------------------<br>
<br>
[1] <br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=75443&sid=f9ec59f5127e4760f6694c56b925f54a#75443" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=75443&sid=f9ec59f5127e4760f6694c56b925f54a#75443</a><br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>