Hi Stefan, On 2/9/07, Stefan Eilemann <[EMAIL PROTECTED]> wrote:
Understandable. Finding this issue was the point of the discussion thread with Don. I haven't observed it, but most of the window closures are handled using the WM_DELETE_WINDOW atom in Equalizer. Maybe I am just lucky to use the DestroyNotify sparsely enough.
I initially tried using DestroyNotify to catch window close events when the window frame close button was called, but it didn't catch the window close. Use the atom trick worked though.
> The other route would be to have separate Display connection for each > window for the main thread. This might be the cleanest alternative > solution. > > XInitThreads itself shouldn't be causing problems, but solving them... > so I wouldn't expect this to be a avenue to look for a solution. I agree. I just digressed in this discussion because I think the second connection is the cleaner approach. Note that you only need a event connection per pipe (a.k.a. X11 screen), but grouping windows by pipe might be difficult in osg.
You could hide this behind a singleton which has a event handler per screen, so it wouldn't be real hard to do. It would be easist to just code one display connection per graphics window, this would have an overhead of course, but only if you multiple windows per screen. BTW, I'm not sure the old SGI naming of channels and pipes will mean much to new developers not exposed to Onyx's and probably aren't too intuitive for these users. In Producer Don went for Camera and RenderSurface respectively. While for osgViewer again channel is equivalent to Camera, and pipe maps to GraphicsWindow.
Back to the XInitThreads/lock issue: Since it also happens in singlethreaded mode, I suspect something fishy like memory corruption or using a deleted resource. I see no other way to deadlock on a mutex from a single thread, since it is definitely not called recursively.
If you remove the XInitThreads does it exit cleanly? Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
