[osg-users] Crash on first example - push_back call
Wojciech Lewandowski
lewandowski at ai.com.pl
Sun Jun 1 12:10:26 PDT 2008
Hi,
I also saw similar issues when OSG libs built with VS 7.x were linked with
example code built with VS 2005. Some STL containers changed its structure
and member memory layout between these two versions of IDE.
Chhers,
Wojtek
-----Original Message-----
From: Posch, Stephan [mailto:osg-users-bounces at lists.openscenegraph.org]On
Behalf Of Posch, Stephan
Sent: Sunday, June 01, 2008 7:32 PM
To: OpenSceneGraph Users
Subject: RE: [osg-users] Crash on first example - push_back call
Hey 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
Jakob makes a good point. Linking against the debug versions becomes
extremely important when using VC8 & VC9 due to the introduction of iterator
debugging. Iterator debugging is defaulted "on" in debug mode, and
defaulted "off" in release mode. If you run debug mode in your app and link
with the release mode of the osg libs, you basically end up with a violation
of the One Definition Rule. You'll have two definitions of a bunch of STL
functions: one with _HAS_ITERATOR_DEBUGGING defined and one with
_HAS_ITERATOR_DEBUGGING undefined. What you'll end up seeing is a random
crash on some STL function that makes no since...
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1232 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080601/ca31dd92/attachment.bin>
More information about the osg-users
mailing list