Hello Garret,

>> I am having text/font issues under the 64-bit SUSE.  If ever a
>> setText is called on an osgText object there is a core dump that
>> occurs.  Note the code works fine on MAC's ad Windows.  I think it
>> might be related to 64-bit build on SUSE.  I don't have much more
>> details than this.  Commenting out any of the setText code allows my
>> application to run fine.

You might want to try and get a stack trace with gdb. If it turns out  
that you have vector iterators or OpenThreads in the stack trace, then  
it's probably a question of calling setText() while another thread is  
running the draw traversal.

To be safe with all threading models that OSG supports, setText on an  
osgText object must be called in the update traversal. I've run into  
this lately myself, and the tricky part is that it won't necessarily  
crash each time you call setText(), it depends on timing issues.

Using an update callback fixed it for me. I just have a setText()  
method in my callback class which saves the new text but does not set  
it just yet. I then attach an instance of the callback class to the  
osgText object, and in the callback's operator() method I call setText  
on the osgText object (gotten from casting the drawable given to  
operator()). This guarantees that the actual osgText::setText() call  
will be done in the update traversal, and seems to work great for me  
on Windows and Linux. If you need a more concrete code example just  
ask, but it's pretty simple.

Then again I may be completely off track here. In any case, getting a  
stack trace is the first thing to do in order to diagnose the problem  
correctly.

Good luck,

J-S
-- 
______________________________________________________
Jean-Sebastien Guay     [EMAIL PROTECTED]
                         http://whitestar02.webhop.org/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to