Another thing to check is make sure you're not mixing debug version of OSG with a release version of your app and vice versa. They must be the same.
I've had readNodeFile() fail as below when I accidently linked my release built app with debug OSG... -Shayne -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Seth Hays Sent: Sunday, October 28, 2012 7:48 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] OpenSceneGraph for Beginners tutorial help requested Hi, I've been working with the OSG Beginners book. I am trying to get the first program to run but I continually get a bad alloc error: Code: Microsoft C++ exception: std::bad_alloc at memory location 0x00a1d4f0.. The break point is: Code: inline osg::Node* readNodeFile(const std::string& filename) { return readNodeFile(filename,Registry::instance()->getOptions()); } And the following is my code: Code: #include <osgDB/ReadFile> #include <osgViewer/Viewer> int main( int argc, char** argv ) { osg::ref_ptr<osg::Node> root = osgDB::readNodeFile("c:\\osg\\data\\cessna.osg"); osgViewer::Viewer viewer; viewer.setSceneData( root.get() ); return viewer.run(); } Any hints would be fantastic. Thank you! Cheers, Seth ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50843#50843 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org