Hi all,

I'm new to to this list and OpenSceneGraph in general. Already
I'm encountering problems on my first steps of learning.

I tried the example in OSG tutorial (Tuto2.pdf, code below). Everything
was built fine in debug mode. But no geometry appears when I execute
it. Plus, the debug session ended with a crash with the following message:

"HEAP CORRUPTION DETECTED: after normal block (#68) at
0x009D14A0. CRT detected that the application wrote to memory..."

The same thing did not happen if I execute it in release mode.
The geometry was drawn perfectly fine and ended gracefully.

The following is the detail
- osg version 2.6.0 build from source. No errors when
 building and installing, Including all plugins (even osg freetype).
 Osg was built using RelWithDebugInfo configuration.
- Dev env : VS2008 Express Edition

Here's the code, its quite simple really:
[code]

#include <windows.h>
#include <iostream>
using namespace std;
#include <osgViewer/Viewer>
#include <osg/ShapeDrawable>
using namespace osg;
using namespace osgViewer;

int main(int argc, char** argv)
{
       osgViewer::Viewer viewer ;
       osg::ref_ptr<osg::Group> root (new osg::Group);
       osg::ref_ptr<osg::Geode> myshapegeode (new osg::Geode);
       osg::ref_ptr<osg::Capsule> myCapsule (new
osg::Capsule(osg::Vec3f(),1,2));
       osg::ref_ptr<osg::ShapeDrawable> capsuledrawable (new
osg::ShapeDrawable(myCapsule.get()));
       myshapegeode->addDrawable(capsuledrawable.get());
       root->addChild(myshapegeode.get());
       viewer.setSceneData( root.get() );
       viewer.realize();
       return (viewer.run());
}
[/code]
---
Barkah

"Mind the rain forest. Don't print this email"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to