[osg-users] Alter tree in safe mode.
Robert Osfield
robert.osfield at gmail.com
Fri Dec 18 02:17:09 PST 2015
On 18 December 2015 at 09:49, Dario Minieri <paradox at cheapnet.it> wrote:
> Hi,
>
> Thanks Robert for your reply. I'm using OSG3.2.1. I can see Mutex
> lock/unlock in Node. I've to look the DatabasePager implementation...but I
> can't understand the crash, because locks there are...
When doing multi-threading the smallest little mistake can cause problems,
you just have to work through eliminating the possibilities, it can be
quite tough.
As a general note, OSG-3.4.0 contains quite a few week improvements
including on the thread safety side so would recommend using it. The
OSG-3.5.0 dev release also uses osgDB::readRefNodeFile() etc. internally to
avoid potential issues with mixing the osgDB::Registry Object cache. This
improvements might not affect your problem but it might be worth trying to
upgrade to at least 3.4.0.
With your own code I'd recommend changing from using C* pointers to
ref_ptr<> an time you are transferring ownership of the OSG objects, in
your code example you pop a pointer to a node off a container, both the
container and the local pointer should use ref_ptr<> for memory safety.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151218/7a1624d5/attachment-0003.htm>
More information about the osg-users
mailing list