Hi Aron,

I don't know why the link order makes a difference, but it does sound like a
compile/linker bug to me.

> In the debugger, it appears that osgText's osgDrawable parent members were
not > initialized... they were garbage like 222313 parents after the osgText
was constructed.

osgText::Text relies upon osg::Drawable constructor for initialization of
the parent pointers.  By default it should be just an empty list of
std::vector<Node*>.

Again this would seem to be compiler/linker issue as the code is correct.

Robert.



On Thu, Apr 16, 2009 at 10:23 PM, Aron <[email protected]> wrote:

> Hello,
>
> Many thanks to the "community" for a great scenegraph! I'm a new user but
> hope to contribute someday...
>
> Anyway, I found this out the hard way on OSG 2.8.0...
>
> Take any program w/ osgText (examples/osgtext in the distro works fine).
>
> Change link options to link with these OSG libs, in this order:
>
>
> Code:
> osg.lib osgUtil.lib osgDB.lib osgText.lib osgVolume.lib
>
>
>
> The exe will link fine, but as soon as you create an osgText... CRASH!!!
>
> Now link with these osg libs, just like the Visual studio project does:
>
>
> Code:
> OpenThreads.lib osg.lib osgDB.lib osgUtil.lib osgGA.lib osgViewer.lib
> osgText.lib
>
>
>
> Works fine!
>
> I haven't gone in to figgure out why, I just wanted to throw this out there
> in case others have an exe where osgText does nothing but crash -- this may
> help.
>
> In the debugger, it appears that osgText's osgDrawable parent members were
> not initialized... they were garbage like 222313 parents after the osgText
> was constructed.
>
> Happy OSGing.
>
> -Aron B.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10323#10323
>
>
>
>
>
> _______________________________________________
> 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