Hello,
for my application I have written an osg plugin which is loaded
dynamically via dl_open. This plugin is linked against the osg
libraries and adds visualisation capabilities to my application.
At application shutdown I remove all loaded plugins by dl_close.
As the osg plugin is the only one linked against the osg libraries
they are removed from address space ass well after removing the
plugin.
So my application runs into trouble at __cxa_finalize(). There
are still some osg::ref_ptr objects in adress space but the
code for the destructors is removed already. I suppose the
osg::ref_ptr objects which are alive at __cxa_finalize are
static objects (for instance) from singletons.
I tried to clean up then osgDB::Registry manually by invoking
osgDB::Registry::instance(true) but there are still some cases
where the application runs into core dumps.
Is there a chance to remove static objects to prevent my application
from producing segmentation faults?
Timo
The gdb output:
#0 0x00000000 in ?? ()
(gdb) up
#1 0x003ba6d3 in osg::Referenced::unref (this=0x8bb3c28)
at /usr/include/osg/Referenced:142
142 OpenThreads::ScopedLock<OpenThreads::Mutex>
lock(*_refMutex);
(gdb) up
#2 0x039bf129 in osg::OcclusionQueryNode::~OcclusionQueryNode$delete ()
from /usr/lib/libosg.so.35
(gdb) up
#3 0x00a6ade9 in osgDB::DotOsgWrapper::~DotOsgWrapper$delete ()
from /usr/lib/libosgDB.so.35
(gdb) up
#4 0x0502e6fc in ?? () from /usr/lib/osgPlugins-2.4.0/osgdb_osg.so
(gdb) up
#5 0x006fe907 in __cxa_finalize () from /lib/libc.so.6
(gdb) up
#6 0x04ff8dd4 in ?? () from /usr/lib/osgPlugins-2.4.0/osgdb_osg.so
(gdb) up
#7 0x0506ff20 in ?? () from /usr/lib/osgPlugins-2.4.0/osgdb_osg.so
(gdb) up
#8 0x00000050 in ?? ()
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org