I had just read the osg archive and set the text DataVariance to DYNAMIC,
with high hopes..unfortunately still crashes :(

_text->setDataVariance(osg::Object::DYNAMIC);

I create my Text in response to a keystroke, and add it to the scene. The
next keystroke removes and deletes it. Each time I create it, the initial
rendered text string does not change.

( Also set my loaded osgText::Font to DYNAMIC DataVariance, doesn't help. )

BTW I noticed there were some nvidia problems in the archives; I do have an
NVidia driver (my machine is a Toshiba Tecra M4, Geforge Go 6200 (three
years old), driver date 3/14/2005, version 7.1.4.1 )

as per your StateSet DataVariance comment, should i do that as well ? I'm
not familiar with osg's thread models, but I just call render within my
app's main thread, and I dont' explicitly create other threads myself.

On Wed, Oct 8, 2008 at 1:21 PM, Paul Melis <[EMAIL PROTECTED]> wrote:

> Robert Osfield wrote:
>
>> Are you dynamically updating the text each frame?  If so set the
>> DataVariance to DYNAMIC.
>>
>>
> Hmmm, if setting it to STATIC causes a crash like this, might that be a
> design flaw?
>
> Paul
>
>  Robert.
>>
>>
>> On Wed, Oct 8, 2008 at 6:09 PM, Chris <[EMAIL PROTECTED]> wrote:
>>
>>
>>> Hi,
>>>
>>> I'm having semi-random crash bugs when I add an osgText drawable to my
>>> scene. The actual error is a mem access violation, and it occurs after
>>> I've
>>> added & removed the node containing the drawable from the scene a random
>>> number of times' (usually from 1 to 10 times)
>>>
>>> The exception occurs in the same place in the call stack, apparently
>>> somewhere in my open gl .dll (nvoglnt.dll). One thing that puzzles me is
>>> that I'm using SWIG, and from the call stack the function
>>> PySwigObject_Check(PyObject *op) ) seems to call into the osgUtil .dll,
>>> which in about 10 stack layers ends up calling nvoglnt.dll. I don't know
>>> why
>>> 'PySwigObject_Check' would be caling the osg .dll, (see func copied
>>> below),
>>> but maybe some sort of wierd thread confusion ?
>>>
>>> SWIGRUNTIMEINLINE int
>>> PySwigObject_Check(PyObject *op) {
>>>  return ((op)->ob_type == PySwigObject_type())
>>>    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
>>> }
>>>
>>> The crash does NOT occur if I repeatedly create/delete the osgText
>>> drawable
>>> but don't add it to my scene. It does not crash during the render but
>>> seems
>>> to corrupt something that fails elsewhere (apparently in
>>> 'PySwigObject_Check' )
>>>
>>> While I can't be certain it's not my code, I have been running the same
>>> render code (which uses osg) now for a few years without problems.  Note
>>> that I dont explictly create extra threads in my code, beyond what osg
>>> might
>>> be doing.
>>>
>>> I thought this looked like some thread/mutex problem, or pehaps a VC++
>>> STL
>>> problem   (anyone had these issues with osg Text before?) I created a new
>>> version of osgText that hacks out the STL-based 'String' class used to
>>> 'setText', but no dice.
>>>
>>> I was running on WinXP, using compiler: Visual Studio .net 2002.  I just
>>> installed Osg 2.7.1, and Visual Studio Express 9.0; but the crash still
>>> occurs.
>>>
>>> TIA,
>>> Chris
>>>
>>> --
>>> www.sketch3.com
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
www.sketch3.com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to