Hi Michael,
With such little info to go on I can't really say what might be up.
What I can say is its not normal to get a bad_alloc in normal usage
like this. The code you have all looks fine and shouldn't produce
problems, so I'd suspect some build/link error. Is there any chance
you have several versions of the OSG installed such that compile and
runtime linking are conflicting.
Robert.
On 4/11/07, Michael Bosse' <[EMAIL PROTECTED]> wrote:
#include <Producer/RenderSurface>
#include <osg/Timer>
#include <osgUtil/SceneView>
#include <osgDB/ReadFile>
int main( int argc, char **argv )
{
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("test.dae");
if (!loadedModel)
{
std::cout << argv[0] <<": No data loaded." << std::endl;
return 1;
}
This code throws a bad_alloc exception on the readNodeFile call. I believe
it has something to do with the fact that I am attempting to load in a dae
file, but it gives me this same error, regardless of if the file exists or
not. I'm sure that I am just doing something stupid here... could you please
point me in the right direction. (also when I change the extension I get a
memory access error as though I was referencing a null pointer.
--
"It is only necessary to make war with five things: with the maladies of the
body, with the ignorances of the mind, with the passions of the body, with
the seditions of the city, with the discords of families." - Tacitus
"The desire for safety stands against every great and noble enterprise." -
Tacitus
"Those who would give up essential liberty to purchase a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/