HI Paul,

This suggests that display being used is the incorrect one for the
thread you are doing it from.  This is something
osgViewer::GraphicsWindowX11 should manage internally though, so this
is a bug that needs to be better solved than it is now.  A proper fix
will need to better manage the two Display's that GraphicsWindowX11
maintained - one for the graphics thread and one for the main thread -
this one is for events etc.

As a quick workaround in your code could call viewer.stopThreading();
doTheWindowResizeCode; viewer.startThreading();

Is there an core OSG example that we can piggyback you code on to
illustrate this problem?  I'm think of been able to get something that
reproduces the problem checked into the core OSG so we can use it as a
unit test for this problem.


Robert.

On Tue, Mar 4, 2008 at 10:42 AM, Paul Melis <[EMAIL PROTECTED]> wrote:
> I'm using the code below to give the viewer window a specific size at
>  startup (for movie capturing purposes). See the attached file based on
>  applications/osgviewer.cpp, to which I added this piece of code.
>      ...
>    viewer.realize();
>
>    osgViewer::Viewer::Windows  windows;
>    viewer.getWindows(windows);
>
>    for (osgViewer::Viewer::Windows::iterator it = windows.begin(); it !=
>  windows.end(); ++it)
>    {
>        (*it)->setWindowDecoration(true);
>        (*it)->setWindowRectangle(10, 10, 960, 540);
>    }
>    ...
>
>  This works fine if the threading model is set to SingleThreaded, but
>  with the default threading model (which I seem to remember is
>  multi-threaded in some way) I get all kinds of trouble ranging from
>  errors like "Xlib: unexpected async reply (sequence 0x2c)!" + a hanging
>  program to an X server crash in the worst case. This is with a very
>  recent SVN version.
>
>  Paul
>
>
>
> _______________________________________________
>  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

Reply via email to