Re: [osg-users] Loading an osgb file from a statically linked application

55 views
Skip to first unread message

Thilo Weigel

unread,
Jul 30, 2012, 7:14:47 PM7/30/12
to osg-...@lists.openscenegraph.org
Hi,

...Linking with "-rdynamic" did the trick ...

Cheers,
Thilo

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





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

Thilo Weigel

unread,
Aug 2, 2012, 7:15:28 PM8/2/12
to osg-...@lists.openscenegraph.org
Hi,

Unfortunately, the issue is still not solved completely. At first, all osgb files were loaded correctly. But after deinstalling the dynamic osg libraries I found that some osgb files could still not be loaded - also not by the osgstaticviewer.

Without the dynamic libraries/plugins, the osgstaticviewer is able to load an osgt file but not the corresponding osgb file. The logs show the following:

...
Warning: dynamic library 'libosg.so' does not exist (or isn't readable):
./libosg.so: cannot open shared object file: No such file or directory
DynamicLibrary::failed loading "libosg.so"
Warning: dynamic library 'osgPlugins-3.0.1/osgdb_serializers_osg.so' does not exist (or isn't readable):
osgPlugins-3.0.1/osgdb_serializers_osg.so: cannot open shared object file: No such file or directory
DynamicLibrary::failed loading "osgPlugins-3.0.1/osgdb_serializers_osg.so"
Warning: dynamic library 'osgPlugins-3.0.1/osgdb_osg.so' does not exist (or isn't readable):
osgPlugins-3.0.1/osgdb_osg.so: cannot open shared object file: No such file or directory
DynamicLibrary::failed loading "osgPlugins-3.0.1/osgdb_osg.so"
InputStream::readObject(): Unsupported wrapper class osg::DefaultUserDataContainer
InputStream: Failed to read from stream. At osg::Group osg::Group osg::MatrixTransform osg::Group osg::Geode osg::Geode osg::Geometry osg::Drawable osg::StateSet osg::StateSet
...

Why is the osgstaticviewer loading dynamic libraries?
Why is the osgstaticviewer able to load an osgt file but not a corresponding osgb file (without the dynamic libraries/plugins installed)?
Is there anything that can be done to fix this?

Thank you for any help,

Cheers,
Thilo

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

Sergey Polischuk

unread,
Aug 3, 2012, 3:55:28 AM8/3/12
to osg-...@lists.openscenegraph.org
Hi

Had same issue couple of days ago... i just stripped userdata containers from model with visitor, and it worked for me. Have no idea what causing problem though.

Cheers.

03.08.2012, 03:15, "Thilo Weigel" <thilo....@atrics.de>:

Thilo Weigel

unread,
Aug 3, 2012, 7:14:00 AM8/3/12
to osg-...@lists.openscenegraph.org
Hi hybr,

I have an osgt file on disk which I converted to an osgb file using osgconv. osgDB::readNodeFile() on the osgb file returns a null pointer. At which stage did you strip user data from the model?

Thanks,
Thilo

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

Sergey Polischuk

unread,
Aug 3, 2012, 9:16:08 AM8/3/12
to osg-...@lists.openscenegraph.org
Hi

In a dynamic build app where this model can be loaded without errors, then save it back without userdata containers.
If your statically linked app can load original osgt file you can do it there and save back as osgb.

Cheers.

03.08.2012, 15:14, "Thilo Weigel" <thilo....@atrics.de>:

Thilo Weigel

unread,
Aug 5, 2012, 3:55:12 PM8/5/12
to osg-...@lists.openscenegraph.org
Hi,

The simple "solution" for me was now to let my statically linked application do the conversion from osgt to osgb using simple readNodeFile and writeNodeFile calls. No need to remove useradata containers. The -rdynamic flag isn't necessary, either.

Obviously there is a binary incompatibility between two library versions related to the osgb format (The static osg library is build from the OpenSceneGraph-3.0.1.zip archive downloaded from the osg website. The dynamic library version is 3.0.1-4.6 from OpenSuse BuildService.).

Does this mean that most probably I'll have to convert all model files again when upgrading the osg library?

Cheers,
Thilo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49170#49170
Reply all
Reply to author
Forward
0 new messages