Dear list,

I have a very simple program such as this:

int main(int argc, char** argv) {
        osg::ArgumentParser arguments(&argc,argv);
        cout << "start!" << endl;

        osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
        
        if (!loadedModel)
    {
        cout << argv[0] <<": No data loaded" << endl;
        return 1;
    }
        
        cout << "loaded" << endl;
}

I'm using the current trunk of OSG (updated 30 mins ago) on Ubuntu
8.04. The program hangs on the line with osgDB::readNodeFiles. I have
no idea why.

This is what GDB says:

#0  0xb7fc8410 in __kernel_vsyscall ()
#1  0xb75c4589 in __lll_lock_wait () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb75bfba6 in _L_lock_95 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xb75bf58a in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb76b3ea6 in pthread_mutex_lock () from /lib/tls/i686/cmov/libc.so.6
#5  0xb785ce43 in OpenThreads::Mutex::lock () from
/usr/local/OpenSceneGraph/lib/libOpenThreads.so.11
#6  0xb7ea30c1 in OpenThreads::ReentrantMutex::lock () from
/usr/local/OpenSceneGraph/lib/libosg.so.50
#7  0xb7d4bcbc in osgDB::Registry::addReaderWriter () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#8  0xb7350e0e in __static_initialization_and_destruction_0 () from
/usr/local/OpenSceneGraph/lib/osgPlugins-2.7.5/osgdb_openflight.so
#9  0xb7364325 in __do_global_ctors_aux () from
/usr/local/OpenSceneGraph/lib/osgPlugins-2.7.5/osgdb_openflight.so
#10 0xb730bb50 in _init () from
/usr/local/OpenSceneGraph/lib/osgPlugins-2.7.5/osgdb_openflight.so
#11 0xb7fd6990 in ?? () from /lib/ld-linux.so.2
#12 0xb7fd6ac3 in ?? () from /lib/ld-linux.so.2
#13 0xb7fda774 in ?? () from /lib/ld-linux.so.2
#14 0xb7fd65c6 in ?? () from /lib/ld-linux.so.2
#15 0xb7fd9f4e in ?? () from /lib/ld-linux.so.2
#16 0xb73ac98d in ?? () from /lib/tls/i686/cmov/libdl.so.2
#17 0xb7fd65c6 in ?? () from /lib/ld-linux.so.2
#18 0xb73ac2bc in ?? () from /lib/tls/i686/cmov/libdl.so.2
#19 0xb73aca0f in dlopen () from /lib/tls/i686/cmov/libdl.so.2
#20 0xb7d26005 in osgDB::DynamicLibrary::getLibraryHandle () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#21 0xb7d262a9 in osgDB::DynamicLibrary::loadLibrary () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#22 0xb7d4875c in osgDB::Registry::loadLibrary () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#23 0xb7d57b25 in osgDB::Registry::read () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#24 0xb7d58d35 in osgDB::Registry::readImplementation () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#25 0xb7d594b4 in osgDB::Registry::readNodeImplementation () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#26 0xb7d44fed in osgDB::readNodeFile () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#27 0xb7d46651 in osgDB::readNodeFiles () from
/usr/local/OpenSceneGraph/lib/libosgDB.so.50
#28 0x080511ab in osgDB::readNodeFiles ([EMAIL PROTECTED]) at
/usr/local/OpenSceneGraph/include/osgDB/ReadFile:132
#29 0x08050df8 in main (argc=2, argv=0xbfc260e4) at src/main.cc:30

This looks like there is a deadlock somewhere, otherwise
pthread_mutex_lock() wouldn't block. The same happens with cessna.osg
file from the sample files, however frames 8-10 are in osgdb_osg.so,
of course. Any ideas? I've already rebuilt OSG once, no luck.

Thank you!
max
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to