Hi Adrian! The tutorial should work. I just tested it by compiling it with Visual Studio 8 and osg 2.4. I can tell from the error you get that you are generating a debug build in Visual Studio. Are you sure that you also link against the debug version of osg (osgd.lib, osgDBd.lib and so on)? What version are you running?
/Jakob Ruhe 2008/6/1 Adrian Ferrier <[EMAIL PROTECTED]>: > Hi, > > I'm just starting out with OSG - so direct me to the correct place if need be. > > I'm trying the first tutorial example on the wiki and I dump on line 33 - at > the push_back call. > Unhandled exception at 0x6c57797f in T01.exe: 0xC0000005: Access violation > writing location 0xcdcdcdcd. > > There is an earlier use of push_back on a Vec3Array, however the problem > seems to be with the DrawElementsUInt > Looks like DrawElementsUInt isn't quite initializing the STL vector > correctly(?). > > I feel I'm missing something obvious and you can direct me to the fix. > > Tutorial example crashes on the push_back call below: > ... > // Create a primitive set and add it to the pyramid geometry. > osg::DrawElementsUInt* pyramidBase = new > osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0); > pyramidBase->push_back(3); > pyramidBase->push_back(2); > ... > > Full code listing can be found here: > http://www.openscenegraph.org/projects/osg/attachment/wiki/Support/Tutorials/BasicGeometry/BasicGeometry.2.cpp > > Thanks! > TDL > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

