Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-07-12 Thread David Guthrie
Hi, I occasionally have issues with X11 and multi-threading osg viewer where I get Xlib: unexpected async replay ... It happens on window resizes sometimes. X11 is not thread safe and requires some locking, but osg doesn't seem to do any of that. Has no one seen this problem? Thank you!

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-07-12 Thread Alberto Luaces
Hi David, David Guthrie writes: X11 is not thread safe and requires some locking, but osg doesn't seem to do any of that. Has no one seen this problem? OSG calls XInitThreads(), see src/osgViewer/GraphicsWindowX11.cpp:1911. Nevertheless, I don't know if this is enough, as the manpage

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-07-12 Thread David Guthrie
Hmm, it's if 0 out in 2.8. I'm not using 3.0 yet. Does 3.0 have it enabled. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41322#41322 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-07-12 Thread Alberto Luaces
David Guthrie writes: Hmm, it's if 0 out in 2.8. I'm not using 3.0 yet. Does 3.0 have it enabled. Oh, yes, you are right. It's disabled here too. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-07-12 Thread David Guthrie
Okay, I just added XInitThreads() to my app and that seems to help, but that's kind of a problem that it's not called by default. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41327#41327 ___

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-05-30 Thread Per Nordqvist
Hi JP, I had similar problem on 2.8.x, your code doesn't compile for me but have your tried wrapping the cursor stuff with viewer.stopThreading(); .. viewer.startThreading(); /Per On 26 May 2011 15:40, J.P. Delport jpdelp...@csir.co.za wrote: Hi all, the attached little app crashes if I

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-05-30 Thread J.P. Delport
Hi Per, On 30/05/11 09:37, Per Nordqvist wrote: Hi JP, I had similar problem on 2.8.x, your code doesn't compile for me but have your tried wrapping the cursor stuff with viewer.stopThreading(); .. viewer.startThreading(); hmm, your suggestion works. I didn't realize that viewer.realize()

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-05-30 Thread Robert Osfield
Hi J.P, et. al, I have tracked down and fixed the setCursor() crash issue ;-) The problem occurred because of subtle timing issue with the GraphicsContext::_threadOfLastMakeCurrent variable in the GraphicsContext::makeCurrent() and how this variable is used in the

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-05-30 Thread J.P. Delport
Hi Robert, On 30/05/11 11:36, Robert Osfield wrote: Hi J.P, et. al, I have tracked down and fixed the setCursor() crash issue ;-) The problem occurred because of subtle timing issue with the GraphicsContext::_threadOfLastMakeCurrent variable in the GraphicsContext::makeCurrent() and how this

[osg-users] X11 cursor setting - Single- vs Multithread

2011-05-26 Thread J.P. Delport
Hi all, the attached little app crashes if I don't run it with --SingleThreaded. Can anyone on Linux check if the same happens for them? Also let me know your OSG version. ./test cow.osg thanks jp PS. adding a frame() call before the cursor change also seems to work for the default

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-05-26 Thread Alberto Luaces
J.P. Delport writes: Can anyone on Linux check if the same happens for them? Also let me know your OSG version. I happens the same for me (always blocks or segfaults in several ways) if I don't use --SingleThreaded. OSG version 2.9.14. -- Alberto

Re: [osg-users] X11 cursor setting - Single- vs Multithread

2011-05-26 Thread Robert Osfield
Hi J.P, I have backlog of submissions to tackle and not too much X11 exertise to through at the problem so for now I'll hang back from exploring this issue and let yourself and the rest of the community see if you can devine what the issue is. This problem does sound vaguely familiar though, I