Hi James,

I don't know the cause of the problem but it's very likely an issue
with build/linking.

Do the OSG examples like osggeometry work fine? If so use it as an
example for how to set up osg::Geometry.

Robert.

On Tue, Aug 31, 2010 at 10:18 PM, James Klink <[email protected]> wrote:
> Hi,
>
> I'm new here so please forgive any faux pas.
>
> I'm trying to run the BasicGeometry example that's on the OSG website. I got 
> it to work in debug mode, referencing libraries like osgd.lib and osgDBd.lib 
> etc, but I can't get it to work in release mode. In release mode there's a 
> reference error:
>
> Unhandled exception at 0x000000018001b1b3 in BasicGeometry.exe: 0xC0000005: 
> Access violation reading location 0xffffffffffffffff.
>
> This access violation always occurs at the same spot:
>
>   osg::DrawElementsUInt* pyramidBase =
>        new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
>    pyramidBase->push_back(3);
>    pyramidBase->push_back(2); //<--- right here
>    pyramidBase->push_back(1);
>    pyramidBase->push_back(0);
>    pyramidGeometry->addPrimitiveSet(pyramidBase);
>
> It seems that it always crashes at the second push_back call to a 
> DrawElementsUInt.
>
> I searched around and found out that someone else had the same problem which 
> was solved by using the debug libs in debug mode. I double checked that I was 
> using the release libs while in release mode, but I still have these problems.
>
> In release mode I reference libraries osg.lib and osgDB.lib. I'm using Visual 
> Studio 2008 and OSG version 2.8.3. I'm compiling in 64 bit so I did have to 
> build OSG myself.
>
> Thanks in advance,
> James.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31229#31229
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to