Hello Robert,

Robert Osfield wrote:

>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.
>  
>
Ok

>As a quick workaround in your code could call viewer.stopThreading();
>doTheWindowResizeCode; viewer.startThreading();
>  
>
Thanks, that works...

>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.
>  
>
The osgcompositeviewer currently also sets its window size at startup, 
but uses a different method. Looks like it gives the window a specific 
size at creation time, instead of resizing it after creation.
Perhaps that one is suitable?

But do you see a way to make this into a unit test that can be run 
automatically? I guess it would be more of a manual thing: try to run it 
and see if any X errors/crashes occur.

Paul

>
>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
>> [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

Reply via email to