Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-19 Thread Serge Lages
Thanks again Robert for these informations.

I've made some tests and everything fails :

- I've tweaked osg::Object to have all the objects in DYNAMIC, it still
crash.
- I've installed the NVIDIA beta drivers, it doesn't change anything.
- I've tested the CullDrawThreadPerContext mode, still the same crash.
- I've tested with a simple model and not my whole application.

It only works on SingleThreaded mode, but the frame drop in this mode is not
acceptable. :/
I'll continue to investigate on the subject but I start to desesperate.

My application uses a CompositeViewer with different osgViewer::View for
each window, I'll try different setups to see if it still crash.

On Thu, Sep 18, 2008 at 9:43 PM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Serge,

 On Thu, Sep 18, 2008 at 5:36 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  As a side note, setting a drawable to DYNAMIC protects it from being
  modified by the update traversal,

 No, it doesn't affect your ability to update, it doesn't affect the
 update traversal at all, it's just a hint from the app developer to
 the draw traversal that that object will be updated, so drawables and
 stateset that you update in the update traversal should have a
 DataVariance of DYNAMIC, the rest should be STATIC.

  but if I remove a drawable (or its geode)
  from the scene during the update, do I need to set it to DYNAMIC too ? In
  other words, drawables in STATIC mode are the only ones which are never
  modified nor removed from the scene ?

 Adding or removing Drawable or StateSet is safe, you don't need to
 protect this at all as the draw traversal retains it's own references
 to prevent the objects from getting deleted.

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-19 Thread Robert Osfield
HI Serge,

What happens with the OSG examples on this setup?

Is there any chance you could dual boot and test out under Linux, it
wouldn't solve the problem you have under XP directly, but it would at
least provide another data point into the nature of the problem.  If
it crashes under Linux then there is good chance that it's an OSG or
your app related problem, which is easier for us to track down and
solve.

Also have you been able to get stack traces?

Robert.

On Fri, Sep 19, 2008 at 1:33 PM, Serge Lages [EMAIL PROTECTED] wrote:
 Thanks again Robert for these informations.

 I've made some tests and everything fails :

 - I've tweaked osg::Object to have all the objects in DYNAMIC, it still
 crash.
 - I've installed the NVIDIA beta drivers, it doesn't change anything.
 - I've tested the CullDrawThreadPerContext mode, still the same crash.
 - I've tested with a simple model and not my whole application.

 It only works on SingleThreaded mode, but the frame drop in this mode is not
 acceptable. :/
 I'll continue to investigate on the subject but I start to desesperate.

 My application uses a CompositeViewer with different osgViewer::View for
 each window, I'll try different setups to see if it still crash.

 On Thu, Sep 18, 2008 at 9:43 PM, Robert Osfield [EMAIL PROTECTED]
 wrote:

 Hi Serge,

 On Thu, Sep 18, 2008 at 5:36 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  As a side note, setting a drawable to DYNAMIC protects it from being
  modified by the update traversal,

 No, it doesn't affect your ability to update, it doesn't affect the
 update traversal at all, it's just a hint from the app developer to
 the draw traversal that that object will be updated, so drawables and
 stateset that you update in the update traversal should have a
 DataVariance of DYNAMIC, the rest should be STATIC.

  but if I remove a drawable (or its geode)
  from the scene during the update, do I need to set it to DYNAMIC too ?
  In
  other words, drawables in STATIC mode are the only ones which are never
  modified nor removed from the scene ?

 Adding or removing Drawable or StateSet is safe, you don't need to
 protect this at all as the draw traversal retains it's own references
 to prevent the objects from getting deleted.

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



 --
 Serge Lages
 http://www.tharsis-software.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] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-19 Thread Jean-Sébastien Guay

Hi Serge,

My application uses a CompositeViewer with different osgViewer::View for 
each window, I'll try different setups to see if it still crash.


If osgviewer (or osgcompositeviewer) itself does not crash, and your app 
crashes, you could try to start with osgviewer.cpp (or 
osgcompositeviewer.cpp) and work up to something that looks like your 
application. Add one thing at a time, and test to see if the crash happens.


At this point it's really hard to say if the problem you're seeing is an 
OSG bug, a driver bug or a bug in your application, but since no one 
here seems to be able to reproduce what you're seeing, I'd suspect the 
latter until you can prove the contrary... So as I said, work up from 
something simple that doesn't crash to something that looks like your 
app, and you might find what you're doing that causes the crash.


Hope this helps,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-18 Thread Serge Lages
Hi all,

First of all, here are the setups I currently use :
- 1x GeForce 8600 GTS with 2 monitors
- 2x GeForce 8900 GT with 2 monitors (one on each card)
The whole installed with Windows XP, the latest OSG version and the latest
NVidia drivers.

My application use the two screens (a part of the scene is shared by each
screen), and I am facing some crashes on the rendering part. Currently if
the two rendering threads (I am in DrawThreadPerContext mode) try to compile
a display list at the same time, or try to upload a texture to the graphic
card, it fails. To avoid it, I need to put mutexes to protect from doing
such operations at the same time (it fails with the 2 setups I use).

If I use the DrawThreadPerContext mode with only one monitor (but still 2
windows with different contexts), it works without problems.

Anyone has already seen such a problem ? Or anyone has some success with
multi-monitor on WinXP and NVidia cards ?

-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-18 Thread Jean-Sébastien Guay

Hi Serge,

Anyone has already seen such a problem ? Or anyone has some success with 
multi-monitor on WinXP and NVidia cards ?


Search the archives for multi-monitor, Windows XP, NVidia. You'll find 
extensive discussion in the past few months, with great investigation by 
Wojtek Lewandowski. But the problem noted then should be worked around 
by a double MakeCurrent call, so if you're indeed using OSG 2.6+ then 
perhaps your problem is a different one.


Here we use OSG on multi-monitor setups on both XP and Vista and for the 
most part things work well, though we use the threading mode that OSG 
chooses for us so I'm not sure it's the same one you use.


Sorry I can't help more,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-18 Thread Wojciech Lewandowski

Hi Serge,

Try latest NVidia 177.92 beta drivers. They fixed my latest problems related 
to multithreaded use. Also may I suggest to stick to --SingleThreaded and
--CullDrawThreadPerContext modes while testing ? If everything goes fine 
then try other threading modes. Default threading mode is 
DrawThreadPerContext and is usually not a safest one to work with 
multi-monitor.


Wojtek


Hi Serge,

Anyone has already seen such a problem ? Or anyone has some success with 
multi-monitor on WinXP and NVidia cards ?


Search the archives for multi-monitor, Windows XP, NVidia. You'll find 
extensive discussion in the past few months, with great investigation by 
Wojtek Lewandowski. But the problem noted then should be worked around by 
a double MakeCurrent call, so if you're indeed using OSG 2.6+ then perhaps 
your problem is a different one.


Here we use OSG on multi-monitor setups on both XP and Vista and for the 
most part things work well, though we use the threading mode that OSG 
chooses for us so I'm not sure it's the same one you use.


Sorry I can't help more,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.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] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-18 Thread Serge Lages
Thanks Wojciech for the tip, I'll try the beta drivers, but could you
explain why CullDrawThreadPerContext should be safer than
DrawThreadPerContext ?

On Thu, Sep 18, 2008 at 6:04 PM, Wojciech Lewandowski [EMAIL PROTECTED]
 wrote:

 Hi Serge,

 Try latest NVidia 177.92 beta drivers. They fixed my latest problems
 related to multithreaded use. Also may I suggest to stick to
 --SingleThreaded and
 --CullDrawThreadPerContext modes while testing ? If everything goes fine
 then try other threading modes. Default threading mode is
 DrawThreadPerContext and is usually not a safest one to work with
 multi-monitor.

 Wojtek


  Hi Serge,

  Anyone has already seen such a problem ? Or anyone has some success with
 multi-monitor on WinXP and NVidia cards ?


 Search the archives for multi-monitor, Windows XP, NVidia. You'll find
 extensive discussion in the past few months, with great investigation by
 Wojtek Lewandowski. But the problem noted then should be worked around by a
 double MakeCurrent call, so if you're indeed using OSG 2.6+ then perhaps
 your problem is a different one.

 Here we use OSG on multi-monitor setups on both XP and Vista and for the
 most part things work well, though we use the threading mode that OSG
 chooses for us so I'm not sure it's the same one you use.

 Sorry I can't help more,

 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-18 Thread Serge Lages
Thanks you very much for this explanation Robert, I better understand it
now.

As a side note, setting a drawable to DYNAMIC protects it from being
modified by the update traversal, but if I remove a drawable (or its geode)
from the scene during the update, do I need to set it to DYNAMIC too ? In
other words, drawables in STATIC mode are the only ones which are never
modified nor removed from the scene ?

On Thu, Sep 18, 2008 at 6:24 PM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Serge,

 On Thu, Sep 18, 2008 at 5:16 PM, Serge Lages [EMAIL PROTECTED]
 wrote:
  Thanks Wojciech for the tip, I'll try the beta drivers, but could you
  explain why CullDrawThreadPerContext should be safer than
  DrawThreadPerContext ?

 A scene graph that has it's Drawable and StateSet DataVariance setup
 correctly (i.e. DYNAMIC for items that change) should be as stable in
 DrawThreadPerContext as CullDrawThreadPerContext, but... it's easy to
 miss them, but if you get crash on the OSG side then this is something
 to look for.

 CullDrawThreadPerContext isn't sensitive to DataVariance settings as
 the cull and draw traversal always finished before
 Viewer::renderingTraversals() completes, so the main thread that is
 calling it (or frame) will work single threaded, while
 DrawThreadPerContext and CullThreadPerCameraDrawThreadPerContext will
 allow the draw thread to overlap with the main thread.

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problems with multi-monitor and DrawThreadPerContext mode

2008-09-18 Thread Robert Osfield
Hi Serge,

On Thu, Sep 18, 2008 at 5:16 PM, Serge Lages [EMAIL PROTECTED] wrote:
 Thanks Wojciech for the tip, I'll try the beta drivers, but could you
 explain why CullDrawThreadPerContext should be safer than
 DrawThreadPerContext ?

A scene graph that has it's Drawable and StateSet DataVariance setup
correctly (i.e. DYNAMIC for items that change) should be as stable in
DrawThreadPerContext as CullDrawThreadPerContext, but... it's easy to
miss them, but if you get crash on the OSG side then this is something
to look for.

CullDrawThreadPerContext isn't sensitive to DataVariance settings as
the cull and draw traversal always finished before
Viewer::renderingTraversals() completes, so the main thread that is
calling it (or frame) will work single threaded, while
DrawThreadPerContext and CullThreadPerCameraDrawThreadPerContext will
allow the draw thread to overlap with the main thread.

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