Robert Osfield wrote:
Hi Paul,

On Wed, May 14, 2008 at 8:21 AM, Paul Melis <[EMAIL PROTECTED]> wrote:
I didn't manage to find out what is going on. The only different between
osgthirdpersonview (not working) and osgcompositeviewer (working) is that
the former uses separate windows to render its output.

Could you try the osgwindows example?  The has two windows, it uses
osgViewer::Viewer
but this shouldn't make a difference - it's mult-threaded
multi-context that is more likely
pushes the drivers hard, and the underlying code driving the cameras
and context is the
same between Viewer and CompositeViewer.
The osgwindows example is also not working without troubles. Sometimes it runs with no problems, but mostly it locks up in a similar way as osgthirdpersonview. I attached with gdb after a lockup and the stack traces for the different threads are:


(gdb) info threads
 3 Thread 0xa2c7eb90 (LWP 5470)  0xffffe410 in __kernel_vsyscall ()
 2 Thread 0xa247db90 (LWP 5471)  0xffffe410 in __kernel_vsyscall ()
 1 Thread 0xb6fa98f0 (LWP 5469)  0xffffe40e in __kernel_vsyscall ()

(gdb) thread 1
[Switching to thread 1 (Thread 0xb6fa98f0 (LWP 5469))]#0 0xffffe40e in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe40e in __kernel_vsyscall ()
#1 0xb7428576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7f08244 in OpenThreads::Condition::wait () from /home/melis/osg/lib/libOpenThreads.so.10 #3 0xb75e871a in OpenThreads::BlockCount::block () from /home/melis/osg/lib/libosgViewer.so.35 #4 0xb75e5534 in osgViewer::ViewerBase::renderingTraversals () from /home/melis/osg/lib/libosgViewer.so.35 #5 0xb75e4678 in osgViewer::ViewerBase::frame () from /home/melis/osg/lib/libosgViewer.so.35 #6 0xb75e5a6d in osgViewer::ViewerBase::run () from /home/melis/osg/lib/libosgViewer.so.35 #7 0xb75dd89c in osgViewer::Viewer::run () from /home/melis/osg/lib/libosgViewer.so.35
#8  0x0804c64b in main ()

(gdb) thread 2
[Switching to thread 2 (Thread 0xa247db90 (LWP 5471))]#0 0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1 0xb7428576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb7428c29 in [EMAIL PROTECTED] () from /lib/libpthread.so.0
#3  0xb6795a4c in ?? () from /usr/lib/dri/fglrx_dri.so
#4  0x0821bfe0 in ?? ()
#5  0x0821bfc8 in ?? ()
#6  0xa19424a0 in ?? ()
#7  0xa247ca38 in ?? ()
#8  0xb702230e in malloc () from /lib/libc.so.6
#9  0xb64e9974 in ?? () from /usr/lib/dri/fglrx_dri.so
#10 0x0821bf80 in ?? ()
#11 0x00000004 in ?? ()
#12 0x084b2800 in ?? ()
#13 0xa247ca80 in ?? ()
#14 0x00000001 in ?? ()
#15 0x0871aec0 in ?? ()
#16 0xa247ca98 in ?? ()
#17 0xb619f306 in ?? () from /usr/lib/dri/fglrx_dri.so
#18 0x083e8a68 in ?? ()
#19 0x00000014 in ?? ()
#20 0xa247ca88 in ?? ()
#21 0xb5eb928b in ?? () from /usr/lib/dri/fglrx_dri.so
#22 0x00008000 in ?? ()
#23 0x00008000 in ?? ()
#24 0xa247cac8 in ?? ()
#25 0xa247cab0 in ?? ()
#26 0x00000001 in ?? ()
#27 0x083e8a68 in ?? ()
#28 0xa247cac8 in ?? ()
#29 0x00000000 in ?? ()

(gdb) thread 3
[Switching to thread 3 (Thread 0xa2c7eb90 (LWP 5470))]#0 0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1 0xb7428576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7f07c6a in OpenThreads::Barrier::block () from /home/melis/osg/lib/libOpenThreads.so.10 #3 0xb7dabdb4 in osg::BarrierOperation::operator() () from /home/melis/osg/lib/libosg.so.35 #4 0xb7de4326 in osg::OperationThread::run () from /home/melis/osg/lib/libosg.so.35 #5 0xb7dabeed in osg::GraphicsThread::run () from /home/melis/osg/lib/libosg.so.35 #6 0xb7f0780d in OpenThreads::ThreadPrivateActions::StartThread () from /home/melis/osg/lib/libOpenThreads.so.10
#7  0xb742418b in start_thread () from /lib/libpthread.so.0
#8  0xb707a09e in clone () from /lib/libc.so.6

Running osgwindows with OSG_THREADING set to SingleThreaded makes it runs without problems. Although the segfault at exit (just like osgthirdpersonview) remains.

Paul
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to