Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-15 Thread beelzebob999-osg

What kind of performance penalty is there for adding
the dynamic flag to text, if, say, you're dealing with
10's of thousands of text objects?

--- Robert Osfield [EMAIL PROTECTED] wrote:

 Hi Gert,
 
 Glad to hear that you have your app back up and
 running.
 
 I do wonder if it would be worth use adding a
 setDataVariance(DYNAMIC)
 any time a user applies an update callback to a
 Drawable of StateSet,
 its perhaps a little overprotective but as this
 problem seems to
 biting a number of developers perhaps its
 reasonable.
 
 Robert.
 
 On 9/14/07, Gert van Maren [EMAIL PROTECTED] wrote:
  Hi Robert,
 
   Is this in your own application or one of the
 OSG examples?
 
  It is our own app.
 
   Are you creating text and then updating per
 frame?
 
  We're creating text and using UpdateCallback to
 add.
 
   Are you running osgViewer multi-threaded?  If so
 which threading model?
 
  Well when I run dual core the OSG automatically
 picks the
  DrawThreadPerContext model - crash. If I turn
 dual core off -
  SingleThread no crash.
 
   One possibility is that the new
 DrawThreadPerContext threaded model is
   overlapping the drawing of the text with any
 updating of the text.
   The way to prevent problems like this is to
 explictly set the data
   variance on the text to DYNAMIC so that the draw
 traversal knows to
   hold back the next frame till all the dynamic
 objects have been
   dispatched.  You can ensure this via:
  
 myText-setDataVariance(osg::Object::DYNAMIC);
 
  Great, that did the trick
 
  Thanks Robert.
 
 
 
 
  --
  Gert van Maren
 
  Head of Research  Development
  K2Vi Virtual Reality Software
  Data Interface Technologies Ltd
 
  Phone: +64 21 2855581
  Email: [EMAIL PROTECTED]
  Web: http://www.k2vi.com
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 

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

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

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


Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-15 Thread Robert Osfield
On 9/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 What kind of performance penalty is there for adding
 the dynamic flag to text, if, say, you're dealing with
 10's of thousands of text objects?

If you aren't updating the text you should set the data variance to
STATIC, and set it to DYNAMIC when its being updated.

The only time that setting the data variance to DYNAMIC will make a
difference to performance is when you are using DrawThreadPerContext
or CullThreadPerCameraDrawThreadPerContext threading models, in
SingleThreaded and CullDrawThreadPerContext it won't make any
difference.

The reason for the difference is that DrawThreadPerContext and
CullThreadPerCameraDrawThreadPerContext threading models allow the
next frames update  cull to begin whilst the draw traversal is
underway, but... and this is the critical part, the draw traversals
holds back the next frame until varying Drawables and StateSets have
been dispatched.  The only way the draw traversal knows whether
anything varies is that its DataVariance is set to DYNAMIC, so its
important to set this other wise you'll be modifying data that is also
been read at the same time - which is what causes crashes.
Performance wise the less DYNAMIC data that needs to be dispatched the
earlier the next frame came commense.  If the last objects to be drawn
is DYNAMIC then effectively you hold the next frame back for till the
entire previous frame is dispatched, and you end up with
SingleThreaded/CullDrawTheradPerContext performance levels.  So its no
really the number of dynamic objects, rather how late they are
dispatched in the frame.

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


Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-14 Thread Paul Melis
Hi Gert,
(ever been Dutch? ;-))

The top of the stack trace you attached looks an awful lot like the one 
I get in the osgdepthpeeling example (both point to 
osgText::Text::computePositions() as the point where things go hayward):

(gdb) bt
#0  0x0032c4e2 in std::vectorosg::Vec3f, std::allocatorosg::Vec3f 
 ::_M_fill_insert (this=0xb673ace0, __position=
  {_M_current = 0xb672bbb0}, __n=396, [EMAIL PROTECTED])
at 
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_construct.h:81
#1  0x0071d81e in osgText::Text::computePositions (this=0xb6705bf0, 
contextID=0)
at 
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_vector.h:658
#2  0x00722515 in osgText::Text::drawImplementation (this=0xb6705bf0, 
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgText/Text.cpp:1545
#3  0x00722f29 in osgText::Text::drawImplementation (this=0xb6705bf0, 
[EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgText/Text.cpp:1470
#4  0x0057a4a7 in osgUtil::RenderLeaf::render (this=0xb6727e88, 
[EMAIL PROTECTED], previous=0x0)
at /home/paul/c/osg-svn/include/osg/Drawable:868
#5  0x00571157 in osgUtil::RenderBin::drawImplementation 
(this=0xb6761760, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:408
#6  0x00570d95 in osgUtil::RenderBin::draw (this=0xb6761760, 
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:373
#7  0x005711e7 in osgUtil::RenderBin::drawImplementation 
(this=0xb6761520, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:458
#8  0x00583bdd in osgUtil::RenderStage::drawImplementation 
(this=0xb6761520, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:1051
#9  0x00570d95 in osgUtil::RenderBin::draw (this=0xb6761520, 
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:373
#10 0x005841c1 in osgUtil::RenderStage::drawInner (this=0xb6761520, 
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:719
#11 0x005835c4 in osgUtil::RenderStage::draw (this=0xb6761520, 
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:913
#12 0x0057b57e in osgUtil::RenderStage::drawPostRenderStages 
(this=0x87e2a08, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:1069
#13 0x0058343d in osgUtil::RenderStage::draw (this=0x87e2a08, 
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:979
#14 0x00597db3 in osgUtil::SceneView::draw (this=0x87e1c78) at 
/home/paul/c/osg-svn/src/osgUtil/SceneView.cpp:1456
#15 0x00c28551 in osgViewer::Renderer::draw (this=0x87e1ab8) at 
/home/paul/c/osg-svn/src/osgViewer/Renderer.cpp:382
#16 0x00c299e9 in osgViewer::Renderer::operator() (this=0x87e1ab8, 
context=0x8800da8)
at /home/paul/c/osg-svn/src/osgViewer/Renderer.cpp:571
#17 0x0035035f in osg::GraphicsContext::runOperations (this=0x8800da8) 
at /home/paul/c/osg-svn/src/osg/GraphicsContext.cpp:670
#18 0x0035356b in osg::RunOperations::operator() (this=0x88a6140, 
context=0x8800da8) at /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:133
#19 0x0035340a in osg::GraphicsOperation::operator() (this=0x88a6140, 
object=0x8800da8)
at /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:50
#20 0x00379a82 in osg::OperationThread::run (this=0x88a5ec8) at 
/home/paul/c/osg-svn/src/osg/OperationThread.cpp:413
#21 0x0035363a in osg::GraphicsThread::run (this=0x88a5ec8) at 
/home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:38
#22 0x00dbf846 in OpenThreads::ThreadPrivateActions::StartThread 
(data=0x88a5ed8)
at /home/paul/c/osg-svn/src/OpenThreads/pthreads/PThread.c++:160
#23 0x009b3bd4 in start_thread () from /lib/libpthread.so.0
#24 0x00b134fe in clone () from /lib/libc.so.6

Paul

Gert van Maren wrote:

 Hi guys,

 Still getting crashes on dual core machines in osg21-osgTextd.dll /  
 osg21-osgd.dll (with 2.1.10 (also 2.1.9)). It seems to do with the  
 osgdb_freetyped.dll because when we disable all osgText in our app - 
 the  osgdb_freetyped.dll does not get loaded hence no crashes. If I 
 disable  dual core in the bios, I can have text - no crashes.

 So when running dual core - still osgText crashes.

 below: the 'windows' output for 2 crashes and I have attached a call 
 stack  as well.

 'v3_viewerd.exe': Loaded  
 'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',
   
 Symbols loaded.
 First-chance exception at 0x00cd1161 (osg21-osgTextd.dll) in  
 v3_viewerd.exe: 0xC005: Access violation reading location 0x.
 First-chance exception at 0x7c812a5b in v3_viewerd.exe: Microsoft  C++ 
 exception: [rethrow] @ 0x.

 'v3_viewerd.exe': Loaded  
 'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',
   
 

Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-14 Thread Robert Osfield
Hi Gert,

Is this in your own application or one of the OSG examples?

Are you creating text and then updating per frame?

Are you running osgViewer multi-threaded?  If so which threading model?

One possibility is that the new DrawThreadPerContext threaded model is
overlapping the drawing of the text with any updating of the text.
The way to prevent problems like this is to explictly set the data
variance on the text to DYNAMIC so that the draw traversal knows to
hold back the next frame till all the dynamic objects have been
dispatched.  You can ensure this via:

 myText-setDataVariance(osg::Object::DYNAMIC);

Robert.

On 9/14/07, Gert van Maren [EMAIL PROTECTED] wrote:
 Hi guys,

 Still getting crashes on dual core machines in osg21-osgTextd.dll /
 osg21-osgd.dll (with 2.1.10 (also 2.1.9)). It seems to do with the
 osgdb_freetyped.dll because when we disable all osgText in our app - the
 osgdb_freetyped.dll does not get loaded hence no crashes. If I disable
 dual core in the bios, I can have text - no crashes.

 So when running dual core - still osgText crashes.

 below: the 'windows' output for 2 crashes and I have attached a call stack
 as well.

 'v3_viewerd.exe': Loaded
 'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',
 Symbols loaded.
 First-chance exception at 0x00cd1161 (osg21-osgTextd.dll) in
 v3_viewerd.exe: 0xC005: Access violation reading location 0x.
 First-chance exception at 0x7c812a5b in v3_viewerd.exe: Microsoft
 C++ exception: [rethrow] @ 0x.

 'v3_viewerd.exe': Loaded
 'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',
 Symbols loaded.
 First-chance exception at 0x008b4232 (osg21-osgd.dll) in v3_viewerd.exe:
 0xC005: Access violation reading location 0x0006.

 Hopefully this points to the bug.

 Gert


 --
 Gert van Maren

 Head of Research  Development
 K2Vi Virtual Reality Software
 Data Interface Technologies Ltd

 Phone: +64 21 2855581
 Email: [EMAIL PROTECTED]
 Web: http://www.k2vi.com
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



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


Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-14 Thread Robert Osfield
Hi Paul,

This might well be the same issue.  I have added the line

  _hudText-setDataVariance(osg::Object::DYNAMIC);

In the contruction of the text in the osgdepthpeeling example and
checked this in.  Could you do a svn update and let me know if it
fixes it.

Robert.

On 9/14/07, Paul Melis [EMAIL PROTECTED] wrote:
 Hi Gert,
 (ever been Dutch? ;-))

 The top of the stack trace you attached looks an awful lot like the one
 I get in the osgdepthpeeling example (both point to
 osgText::Text::computePositions() as the point where things go hayward):

 (gdb) bt
 #0  0x0032c4e2 in std::vectorosg::Vec3f, std::allocatorosg::Vec3f
  ::_M_fill_insert (this=0xb673ace0, __position=
   {_M_current = 0xb672bbb0}, __n=396, [EMAIL PROTECTED])
 at
 /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_construct.h:81
 #1  0x0071d81e in osgText::Text::computePositions (this=0xb6705bf0,
 contextID=0)
 at
 /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_vector.h:658
 #2  0x00722515 in osgText::Text::drawImplementation (this=0xb6705bf0,
 [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgText/Text.cpp:1545
 #3  0x00722f29 in osgText::Text::drawImplementation (this=0xb6705bf0,
 [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgText/Text.cpp:1470
 #4  0x0057a4a7 in osgUtil::RenderLeaf::render (this=0xb6727e88,
 [EMAIL PROTECTED], previous=0x0)
 at /home/paul/c/osg-svn/include/osg/Drawable:868
 #5  0x00571157 in osgUtil::RenderBin::drawImplementation
 (this=0xb6761760, [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:408
 #6  0x00570d95 in osgUtil::RenderBin::draw (this=0xb6761760,
 [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:373
 #7  0x005711e7 in osgUtil::RenderBin::drawImplementation
 (this=0xb6761520, [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:458
 #8  0x00583bdd in osgUtil::RenderStage::drawImplementation
 (this=0xb6761520, [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:1051
 #9  0x00570d95 in osgUtil::RenderBin::draw (this=0xb6761520,
 [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:373
 #10 0x005841c1 in osgUtil::RenderStage::drawInner (this=0xb6761520,
 [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:719
 #11 0x005835c4 in osgUtil::RenderStage::draw (this=0xb6761520,
 [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:913
 #12 0x0057b57e in osgUtil::RenderStage::drawPostRenderStages
 (this=0x87e2a08, [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:1069
 #13 0x0058343d in osgUtil::RenderStage::draw (this=0x87e2a08,
 [EMAIL PROTECTED], [EMAIL PROTECTED])
 at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:979
 #14 0x00597db3 in osgUtil::SceneView::draw (this=0x87e1c78) at
 /home/paul/c/osg-svn/src/osgUtil/SceneView.cpp:1456
 #15 0x00c28551 in osgViewer::Renderer::draw (this=0x87e1ab8) at
 /home/paul/c/osg-svn/src/osgViewer/Renderer.cpp:382
 #16 0x00c299e9 in osgViewer::Renderer::operator() (this=0x87e1ab8,
 context=0x8800da8)
 at /home/paul/c/osg-svn/src/osgViewer/Renderer.cpp:571
 #17 0x0035035f in osg::GraphicsContext::runOperations (this=0x8800da8)
 at /home/paul/c/osg-svn/src/osg/GraphicsContext.cpp:670
 #18 0x0035356b in osg::RunOperations::operator() (this=0x88a6140,
 context=0x8800da8) at /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:133
 #19 0x0035340a in osg::GraphicsOperation::operator() (this=0x88a6140,
 object=0x8800da8)
 at /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:50
 #20 0x00379a82 in osg::OperationThread::run (this=0x88a5ec8) at
 /home/paul/c/osg-svn/src/osg/OperationThread.cpp:413
 #21 0x0035363a in osg::GraphicsThread::run (this=0x88a5ec8) at
 /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:38
 #22 0x00dbf846 in OpenThreads::ThreadPrivateActions::StartThread
 (data=0x88a5ed8)
 at /home/paul/c/osg-svn/src/OpenThreads/pthreads/PThread.c++:160
 #23 0x009b3bd4 in start_thread () from /lib/libpthread.so.0
 #24 0x00b134fe in clone () from /lib/libc.so.6

 Paul

 Gert van Maren wrote:

  Hi guys,
 
  Still getting crashes on dual core machines in osg21-osgTextd.dll /
  osg21-osgd.dll (with 2.1.10 (also 2.1.9)). It seems to do with the
  osgdb_freetyped.dll because when we disable all osgText in our app -
  the  osgdb_freetyped.dll does not get loaded hence no crashes. If I
  disable  dual core in the bios, I can have text - no crashes.
 
  So when running dual core - still osgText crashes.
 
  below: the 'windows' output for 2 crashes and I have attached a call
  stack  as well.
 
  'v3_viewerd.exe': Loaded
  'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',
  Symbols 

Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-14 Thread Paul Melis
Robert Osfield wrote:

This might well be the same issue.  I have added the line

  _hudText-setDataVariance(osg::Object::DYNAMIC);

In the contruction of the text in the osgdepthpeeling example and
checked this in.  Could you do a svn update and let me know if it
fixes it.
  

Yup, that seems to do the trick, no segfaults anymore. The example seems 
to use one or more OpenGL extensions that I don't have, but that's 
another story...
Paul

Robert.

On 9/14/07, Paul Melis [EMAIL PROTECTED] wrote:
  

Hi Gert,
(ever been Dutch? ;-))

The top of the stack trace you attached looks an awful lot like the one
I get in the osgdepthpeeling example (both point to
osgText::Text::computePositions() as the point where things go hayward):

(gdb) bt
#0  0x0032c4e2 in std::vectorosg::Vec3f, std::allocatorosg::Vec3f
 ::_M_fill_insert (this=0xb673ace0, __position=
  {_M_current = 0xb672bbb0}, __n=396, [EMAIL PROTECTED])
at
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_construct.h:81
#1  0x0071d81e in osgText::Text::computePositions (this=0xb6705bf0,
contextID=0)
at
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_vector.h:658
#2  0x00722515 in osgText::Text::drawImplementation (this=0xb6705bf0,
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgText/Text.cpp:1545
#3  0x00722f29 in osgText::Text::drawImplementation (this=0xb6705bf0,
[EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgText/Text.cpp:1470
#4  0x0057a4a7 in osgUtil::RenderLeaf::render (this=0xb6727e88,
[EMAIL PROTECTED], previous=0x0)
at /home/paul/c/osg-svn/include/osg/Drawable:868
#5  0x00571157 in osgUtil::RenderBin::drawImplementation
(this=0xb6761760, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:408
#6  0x00570d95 in osgUtil::RenderBin::draw (this=0xb6761760,
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:373
#7  0x005711e7 in osgUtil::RenderBin::drawImplementation
(this=0xb6761520, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:458
#8  0x00583bdd in osgUtil::RenderStage::drawImplementation
(this=0xb6761520, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:1051
#9  0x00570d95 in osgUtil::RenderBin::draw (this=0xb6761520,
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderBin.cpp:373
#10 0x005841c1 in osgUtil::RenderStage::drawInner (this=0xb6761520,
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:719
#11 0x005835c4 in osgUtil::RenderStage::draw (this=0xb6761520,
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:913
#12 0x0057b57e in osgUtil::RenderStage::drawPostRenderStages
(this=0x87e2a08, [EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:1069
#13 0x0058343d in osgUtil::RenderStage::draw (this=0x87e2a08,
[EMAIL PROTECTED], [EMAIL PROTECTED])
at /home/paul/c/osg-svn/src/osgUtil/RenderStage.cpp:979
#14 0x00597db3 in osgUtil::SceneView::draw (this=0x87e1c78) at
/home/paul/c/osg-svn/src/osgUtil/SceneView.cpp:1456
#15 0x00c28551 in osgViewer::Renderer::draw (this=0x87e1ab8) at
/home/paul/c/osg-svn/src/osgViewer/Renderer.cpp:382
#16 0x00c299e9 in osgViewer::Renderer::operator() (this=0x87e1ab8,
context=0x8800da8)
at /home/paul/c/osg-svn/src/osgViewer/Renderer.cpp:571
#17 0x0035035f in osg::GraphicsContext::runOperations (this=0x8800da8)
at /home/paul/c/osg-svn/src/osg/GraphicsContext.cpp:670
#18 0x0035356b in osg::RunOperations::operator() (this=0x88a6140,
context=0x8800da8) at /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:133
#19 0x0035340a in osg::GraphicsOperation::operator() (this=0x88a6140,
object=0x8800da8)
at /home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:50
#20 0x00379a82 in osg::OperationThread::run (this=0x88a5ec8) at
/home/paul/c/osg-svn/src/osg/OperationThread.cpp:413
#21 0x0035363a in osg::GraphicsThread::run (this=0x88a5ec8) at
/home/paul/c/osg-svn/src/osg/GraphicsThread.cpp:38
#22 0x00dbf846 in OpenThreads::ThreadPrivateActions::StartThread
(data=0x88a5ed8)
at /home/paul/c/osg-svn/src/OpenThreads/pthreads/PThread.c++:160
#23 0x009b3bd4 in start_thread () from /lib/libpthread.so.0
#24 0x00b134fe in clone () from /lib/libc.so.6

Paul

Gert van Maren wrote:



Hi guys,

Still getting crashes on dual core machines in osg21-osgTextd.dll /
osg21-osgd.dll (with 2.1.10 (also 2.1.9)). It seems to do with the
osgdb_freetyped.dll because when we disable all osgText in our app -
the  osgdb_freetyped.dll does not get loaded hence no crashes. If I
disable  dual core in the bios, I can have text - no crashes.

So when running dual core - still osgText crashes.

below: the 'windows' output for 2 crashes and I have attached a call
stack  as well.

'v3_viewerd.exe': Loaded

Re: [osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-14 Thread Gert van Maren
Hi Robert,

 Is this in your own application or one of the OSG examples?

It is our own app.

 Are you creating text and then updating per frame?

We're creating text and using UpdateCallback to add.

 Are you running osgViewer multi-threaded?  If so which threading model?

Well when I run dual core the OSG automatically picks the  
DrawThreadPerContext model - crash. If I turn dual core off -  
SingleThread no crash.

 One possibility is that the new DrawThreadPerContext threaded model is
 overlapping the drawing of the text with any updating of the text.
 The way to prevent problems like this is to explictly set the data
 variance on the text to DYNAMIC so that the draw traversal knows to
 hold back the next frame till all the dynamic objects have been
 dispatched.  You can ensure this via:
 myText-setDataVariance(osg::Object::DYNAMIC);

Great, that did the trick

Thanks Robert.




-- 
Gert van Maren

Head of Research  Development
K2Vi Virtual Reality Software
Data Interface Technologies Ltd

Phone: +64 21 2855581
Email: [EMAIL PROTECTED]
Web: http://www.k2vi.com

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


[osg-users] OSG 2.1.10 crash in osgText / osgdb_freetyped

2007-09-13 Thread Gert van Maren

Hi guys,

Still getting crashes on dual core machines in osg21-osgTextd.dll /  
osg21-osgd.dll (with 2.1.10 (also 2.1.9)). It seems to do with the  
osgdb_freetyped.dll because when we disable all osgText in our app - the  
osgdb_freetyped.dll does not get loaded hence no crashes. If I disable  
dual core in the bios, I can have text - no crashes.


So when running dual core - still osgText crashes.

below: the 'windows' output for 2 crashes and I have attached a call stack  
as well.


'v3_viewerd.exe': Loaded  
'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',  
Symbols loaded.
First-chance exception at 0x00cd1161 (osg21-osgTextd.dll) in  
v3_viewerd.exe: 0xC005: Access violation reading location 0x.
First-chance exception at 0x7c812a5b in v3_viewerd.exe: Microsoft  
C++ exception: [rethrow] @ 0x.


'v3_viewerd.exe': Loaded  
'D:\OpenSceneGraph-2.1.10\OpenSceneGraph\bin\osgplugins-2.1.10\osgdb_freetyped.dll',  
Symbols loaded.
First-chance exception at 0x008b4232 (osg21-osgd.dll) in v3_viewerd.exe:  
0xC005: Access violation reading location 0x0006.


Hopefully this points to the bug.

Gert


--
Gert van Maren

Head of Research  Development
K2Vi Virtual Reality Software
Data Interface Technologies Ltd

Phone: +64 21 2855581
Email: [EMAIL PROTECTED]
Web: http://www.k2vi.com   msvcr71d.dll!_nh_malloc_dbg(unsigned int nSize=1, int nhFlag=3, int 
 nBlockUse=1240720, const char * szFileName=0x0012ef30, int nLine=0)  Line 267 
 + 0x7 C
msvcr71d.dll!_CxxThrowException(void * pExceptionObject=0x0012eeac, 
const _s__ThrowInfo * pThrowInfo=0x104f6150)  + 0x39C++
msvcp71d.dll!std::_Nomemory()  Line 10  C++
osg21-osgTextd.dll!operator new(unsigned int size=528)  Line 15 C++
osg21-osgTextd.dll!std::_Allocateosg::Vec3f(unsigned int _Count=44, 
osg::Vec3f * __formal=0x)  Line 34 + 0xc  C++
osg21-osgTextd.dll!std::allocatorosg::Vec3f::allocate(unsigned int 
_Count=44)  Line 137 + 0xb C++
osg21-osgTextd.dll!std::vectorosg::Vec3f,std::allocatorosg::Vec3f 
::_Insert_n(std::vectorosg::Vec3f,std::allocatorosg::Vec3f ::iterator 
_Where={...}, unsigned int _Count=44, const osg::Vec3f  _Val={...})  Line 823 
+ 0xcC++
osg21-osgTextd.dll!std::vectorosg::Vec3f,std::allocatorosg::Vec3f 
::resize(unsigned int _Newsize=44, osg::Vec3f _Val={...})  Line 510   C++
osg21-osgTextd.dll!std::vectorosg::Vec3f,std::allocatorosg::Vec3f 
::resize(unsigned int _Newsize=44)  Line 504  C++
osg21-osgTextd.dll!osgText::Text::computePositions(unsigned int 
contextID=8)  Line 957  C++
osg21-osgTextd.dll!osgText::Text::computePositions()  Line 814  C++
osg21-osgTextd.dll!osgText::Text::computeGlyphRepresentation()  Line 
744C++
osg21-osgTextd.dll!osgText::Text::setText(const osgText::String  
text={...})  Line 166 C++
osg21-osgTextd.dll!osgText::Text::setText(const 
std::basic_stringchar,std::char_traitschar,std::allocatorchar   
text={...})  Line 170 + 0x28 C++
v3_viewerd.exe!V3viewer_UpdateMessagesCallback::operator()(osg::Node * 
node=0x02ba4628, osg::NodeVisitor * nv=0x025e2dd8)  Line 4898 + 0x52 C++

osg21-osgUtild.dll!osgUtil::UpdateVisitor::handle_callbacks_and_traverse(osg::Node
  node={...})  Line 83 + 0x1aC++
osg21-osgUtild.dll!osgUtil::UpdateVisitor::apply(osg::Projection  
node={...})  Line 56 + 0x1a  C++
osg21-osgd.dll!osg::Projection::accept(osg::NodeVisitor  nv={...})  
Line 36 + 0x3f C++
osg21-osgd.dll!osg::Group::traverse(osg::NodeVisitor  nv={...})  Line 
62 + 0x23C++
osg21-osgd.dll!osg::NodeVisitor::traverse(osg::Node  node={...})  Line 
180 + 0x1c  C++

osg21-osgUtild.dll!osgUtil::UpdateVisitor::handle_callbacks_and_traverse(osg::Node
  node={...})  Line 84 + 0x27C++
osg21-osgUtild.dll!osgUtil::UpdateVisitor::apply(osg::Group  
node={...})  Line 54 + 0x1a   C++
osg21-osgd.dll!osg::Group::accept(osg::NodeVisitor  nv={...})  Line 38 
+ 0x3f  C++
osg21-osgViewerd.dll!osgViewer::Viewer::updateTraversal()  Line 1418 + 
0x30 C++
osg21-osgViewerd.dll!osgViewer::Viewer::frame(double 
simulationTime=1.7976931348623157e+308)  Line 1019 + 0xd   C++
v3_viewerd.exe!renderLoop()  Line 2158 + 0x19   C++___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org