[osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

Hartwig Wiesmann hartwig.wiesmann at skywind.eu
Sat Mar 24 14:31:09 PDT 2018


Hi Robert,

I think that it has nothing to do with Clang or GCC. I did some further investigations and probably found the bug. In DatabasePager::requestNodeFile you find the following code:

Code:
    if (!_startThreadCalled)
    {
        OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_run_mutex);

        if (!_startThreadCalled)
        {
            _startThreadCalled = true;
            _done = false;
            OSG_INFO<<"DatabasePager::startThread()"<<std::endl;

            if (_databaseThreads.empty())
            {
                setUpThreads(
                    osg::DisplaySettings::instance()->getNumOfDatabaseThreadsHint(),
                    osg::DisplaySettings::instance()->getNumOfHttpDatabaseThreadsHint());
            }

#if 0
					for(DatabaseThreadList::const_iterator dt_itr = _databaseThreads.begin();
                dt_itr != _databaseThreads.end();
                ++dt_itr)
            {
                (*dt_itr)->startThread();
            }
#endif




Thank you!

Cheers,
Hartwig

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73162#73162







More information about the osg-users mailing list