When running with my proposed changes, I see some interesting warning messages,
leading me to suspect why they were originally set to INFO level.
However that seems to be masking a problem. Once we have loaded the model, we
try to drop it back out to an osg file, which results in several failures to
load dynamic libraries. These are caused because the filename does not match
the dll name correctly.
The problem comes about because of
Code:
// first try the standard nodekit library.
std::string nodeKitLibraryName =
createLibraryNameForNodeKit(libraryName);
if (loadLibrary(nodeKitLibraryName)==LOADED) return writeObject(obj,fw);
// otherwise try the osgdb_ plugin library.
std::string pluginLibraryName =
createLibraryNameForExtension(libraryName);
if (loadLibrary(pluginLibraryName)==LOADED) return writeObject(obj,fw);
which gets called once for every node we want to output? The library isn't
loaded multiple times, but we try to load it multiple times which seems very
inefficient. I'm trying to think of some way we could short circuit the call
earlier and detect it is already loaded but so far I haven't got a solution.
The Log messages I get are:
> 81 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 82 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 83 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 84 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 85 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 86 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 87 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 88 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 89 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 90 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 91 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 92 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 93 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 94 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 95 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 96 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 97 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 98 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 99 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 100 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 101 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 102 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 103 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 104 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 105 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
> 106 : WARNING : OSG : DynamicLibrary::failed loading "osgd.dll"
>
This is for a rather small model too.
The stack trace when we are generating those messages is:
> osg55-osgDBd.dll!osgDB::DynamicLibrary::loadLibrary(const
> std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
> libraryName="osgd.dll") Line 86 C++
> osg55-osgDBd.dll!osgDB::Registry::loadLibrary(const
> std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
> fileName="osgd.dll") Line 713 + 0x9 bytes C++
> > osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> > obj={...}, osgDB::Output & fw={...}) Line 1261 + 0xf bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!Uniform_writeLocalData(const osg::Object & obj={...},
> osgDB::Output & fw={...}) Line 255 + 0x49 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> obj={...}, osgDB::Output & fw={...}) Line 1352 + 0x19 bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!StateSet_writeLocalData(const osg::Object & obj={...},
> osgDB::Output & fw={...}) Line 579 + 0x21 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> obj={...}, osgDB::Output & fw={...}) Line 1352 + 0x19 bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!Node_writeLocalData(const osg::Object & obj={...},
> osgDB::Output & fw={...}) Line 216 + 0x21 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> obj={...}, osgDB::Output & fw={...}) Line 1352 + 0x19 bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!Group_writeLocalData(const osg::Object & obj={...},
> osgDB::Output & fw={...}) Line 58 + 0x25 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> obj={...}, osgDB::Output & fw={...}) Line 1352 + 0x19 bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!Group_writeLocalData(const osg::Object & obj={...},
> osgDB::Output & fw={...}) Line 58 + 0x25 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> obj={...}, osgDB::Output & fw={...}) Line 1352 + 0x19 bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!Group_writeLocalData(const osg::Object & obj={...},
> osgDB::Output & fw={...}) Line 58 + 0x25 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeObject(const osg::Object &
> obj={...}, osgDB::Output & fw={...}) Line 1352 + 0x19 bytes C++
> osg55-osgDBd.dll!osgDB::Output::writeObject(const osg::Object &
> obj={...}) Line 140 C++
> osgdb_osgd.dll!OSGReaderWriter::writeNode(const osg::Node & node={...},
> const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
> fileName="TEST_OSG_NODE_FILE.osg", const osgDB::ReaderWriter::Options *
> options=0x00000000) Line 333 + 0x12 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeNodeImplementation(const
> osg::Node & node={...}, const
> std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
> fileName="TEST_OSG_NODE_FILE.osg", const osgDB::ReaderWriter::Options *
> options=0x00000000) Line 1865 + 0x39 bytes C++
> osg55-osgDBd.dll!osgDB::Registry::writeNode(const osg::Node &
> node={...}, const
> std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
> fileName="TEST_OSG_NODE_FILE.osg", const osgDB::ReaderWriter::Options *
> options=0x00000000) Line 321 + 0x18 bytes C++
> osg55-osgDBd.dll!osgDB::writeNodeFile(const osg::Node & node={...},
> const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
> filename="TEST_OSG_NODE_FILE.osg", const osgDB::ReaderWriter::Options *
> options=0x00000000) Line 52 + 0x21 bytes C++
For the moment, how about we don't make the change and I'll try to come up with
something better.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21194#21194
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org