<div dir="ltr"><div dir="ltr">I am out of suggestions, but here are a few questions that I can come up with:<div>- did the problematic node come out of the cache, or did it come fresh from disk?</div><div> (<span style="background-color:rgb(255,255,153);color:rgb(85,85,85);font-family:monospace,sans-serif;font-size:14px;white-space:pre">modelResult.</span><font color="#555555" face="monospace, sans-serif"><span style="font-size:14px;white-space:pre">_status has this info)</span></font></div><div>- Is the parent group (and it's _children vector) still sane?</div><div>- If the parent node is still sane, can you match it to the file on disk and possibly tell what sort of node the problem appears in?</div><div>- What is the file format of the file on disk? Do you have (use) multiple pager threads? Could the file loader have a multithreading problem?</div><div><br></div><div>Unless the node is a proxy or pagedlod this appears to be a different problem than the cache release problem. You say the node looks like deleted, all I can conclude is that the Node* doesn't point to a valid node.<font color="#555555" face="monospace, sans-serif"><span style="font-size:14px;white-space:pre"><br></span></font></div><div><br></div><div>Other annoying questions:</div><div>Are you sure your build is clean? You say you build osg master, but from your stack trace</div><div>osg130-osg.dll!osg::clone </div><div>osg130-osg.dll hints at osg 3.4.0 or 3.4.1 Release candidate 2</div><div><br></div><div><br></div><div>Regards, Laurens.</div><div> <br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 17, 2019 at 11:25 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">Hi Lawrence;<br>
<br>
Thanks for the help.<br>
<br>
Sorry for the confusion; it doesn't actually fail on that line; it fails <br>
deep inside CopyOp; this is the stack trace from the previous code;<br>
<br>
osg130-osg.dll!osg::CopyOp::operator()(const osg::Node * node) Line <br>
56 C++<br>
osg130-osg.dll!osg::Group::Group(const osg::Group & group, const <br>
osg::CopyOp & copyop) Line 40 C++<br>
osg130-osg.dll!osg::Group::clone(const osg::CopyOp & copyop) Line <br>
38 C++<br>
osg130-osg.dll!osg::clone<osg::Node>(const osg::Node * t, const <br>
osg::CopyOp & copyop) Line 250 C++<br>
osg130-osg.dll!osg::Group::Group(const osg::Group & group, const <br>
osg::CopyOp & copyop) Line 40 C++<br>
osg130-osg.dll!osg::Group::clone(const osg::CopyOp & copyop) Line <br>
38 C++<br>
osg130-osg.dll!osg::clone<osg::Node>(const osg::Node * t, const <br>
osg::CopyOp & copyop) Line 250 C++<br>
fgfs.exe!simgear::copyModel(osg::Node * model) Line 94 C++<br>
fgfs.exe!sgLoad3DModel_internal(const SGPath & path, const <br>
osgDB::Options * dbOptions, SGPropertyNode * overlay) Line 342 C++<br>
<br>
copy model (simgear model.cxx:84) uses the following flags.<br>
<br>
Node* copyModel(Node* model)<br>
{<br>
const CopyOp::CopyFlags flags = (CopyOp::DEEP_COPY_ALL<br>
& ~CopyOp::DEEP_COPY_TEXTURES<br>
& ~CopyOp::DEEP_COPY_IMAGES<br>
& ~CopyOp::DEEP_COPY_STATESETS<br>
& ~CopyOp::DEEP_COPY_STATEATTRIBUTES<br>
& ~CopyOp::DEEP_COPY_ARRAYS<br>
& ~CopyOp::DEEP_COPY_PRIMITIVES<br>
// This will preserve display <br>
lists ...<br>
& ~CopyOp::DEEP_COPY_DRAWABLES<br>
& ~CopyOp::DEEP_COPY_SHAPES);<br>
return (CopyOp(flags))(model);<br>
}<br>
<br>
At the top of the stack inside operator() the node in question is all <br>
garbage - which looks like something that has been deleted.<br>
<br>
osg::Object {_name={...} _dataVariance=??? <br>
_userDataContainer=??? } osg::Object<br>
_initialBound {_center={_v=0x8003d900ed55904f {???, ???, <br>
???} } _radius=??? } osg::BoundingSphereImpl<osg::Vec3f><br>
_computeBoundCallback {_ptr=??? } <br>
osg::ref_ptr<osg::Node::ComputeBoundingSphereCallback><br>
_boundingSphere {_center={_v=0x8003d900ed559067 {???, ???, <br>
???} } _radius=??? } osg::BoundingSphereImpl<osg::Vec3f><br>
_boundingSphereComputed <Unable to read memory><br>
_parents { size=??? } std::vector<osg::Group <br>
*,std::allocator<osg::Group *> ><br>
_updateCallback {_ptr=??? } osg::ref_ptr<osg::Callback><br>
_numChildrenRequiringUpdateTraversal <Unable to read memory><br>
_eventCallback {_ptr=??? } osg::ref_ptr<osg::Callback><br>
_numChildrenRequiringEventTraversal <Unable to read memory><br>
_cullCallback {_ptr=??? } osg::ref_ptr<osg::Callback><br>
_cullingActive <Unable to read memory><br>
_numChildrenWithCullingDisabled <Unable to read memory><br>
_numChildrenWithOccluderNodes <Unable to read memory><br>
_nodeMask <Unable to read memory><br>
_stateset {_ptr=??? } osg::ref_ptr<osg::StateSet><br>
<br>
On 17/01/2019 10:56, Voerman, L. wrote:<br>
<br>
> Hi Richard,<br>
> I can't see how you can get a segfault on the line you indicate, so I <br>
> guess the node is somehow corrupted and the segfault is somewhere in <br>
> the copyOp.<br>
> I can only guess at what might be going wrong there, but my first <br>
> guess would be the DEEP_COPY_USERDATA.<br>
> Laurens.<br>
><br>
> On Thu, Jan 17, 2019 at 8:13 AM Richard Harrison <<a href="mailto:rjh@zaretto.com" target="_blank">rjh@zaretto.com</a> <br>
> <mailto:<a href="mailto:rjh@zaretto.com" target="_blank">rjh@zaretto.com</a>>> wrote:<br>
><br>
> On 15/01/2019 09:03, Robert Osfield wrote:<br>
><br>
> >> illustrated it well) and I'm currently flying one of my long<br>
> test routes.<br>
> > Fingers and toes crossed.<br>
><br>
> ..and alas after 30h I've got a similar looking problem; the<br>
> pattern is<br>
> the same i.e. DatabasePager loading something whilst ObjectCache is<br>
> expiring.<br>
><br>
> This time it's a segfault in the DatabasePager during a copy of a<br>
> model<br>
> that has just been loaded (simgear, SGReaderWriterXML.cxx:342)<br>
><br>
> options->setDatabasePath(texturepath.local8BitStr());<br>
> osgDB::ReaderWriter::ReadResult modelResult;<br>
> modelResult =<br>
> osgDB::readRefNodeFile(modelpath.local8BitStr(),<br>
> options.get());<br>
> if (!modelResult.validNode())<br>
> throw sg_io_exception("Failed to load 3D model:" +<br>
> modelResult.message(),<br>
> modelpath);<br>
> > model = copyModel(modelResult.getNode());<br>
><br>
> The object currently being expired in the ObjectCache doesn't seem to<br>
> bear any relation to the model being loaded; one is a windsock and<br>
> the<br>
> other a radio tower.<br>
><br>
> This is after I changed all of the osg::getSomething into<br>
> osg::getRefSomething.<br>
><br>
> I'm now a little confused as I was sure that the fix would work; I've<br>
> kept the debug session open in case there is anything that I need to<br>
> inspect.<br>
><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>
> <mailto:<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>
><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>
<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>