The osgViewer library in SVN/1.9.x and upcomming 2.0 don't have a
separate thread loop like Producer so won't exhibit these problems on
exit.

On 6/13/07, Lohmann, Sina, OPS3 <[EMAIL PROTECTED]> wrote:

Hi,

I have been looking into the problem and tracked it down to
Thread::start not returning properly. It seems that RenderSurface::run
is doing something and not returning in my case. I have looked at the
code and found some comments there. I am absolutely new to this, so
maybe what I have tried is complete nonsense.

I found a for loop in the RenderSurface::run routine that looks like
this:

for( ;; )
{
#if 0
        fd_set rfds;
        int fd = ConnectionNumber(ldpy);
        FD_ZERO(&rfds);
        FD_SET( fd, &rfds );
        if( select(fd+1,&rfds,0,0,0) < 0 )
            testCancel();
#endif
        do
        {
            _checkEvents(ldpy);
            testCancel();
        } while(XPending(ldpy));
 }

What is that for( ;; ) good for anyway?

Naive as I am, I simply took out the comments, desperately trying to get
my program running. To my surprise, the program seems to be running fine
now, no messages about threads not being cancelled anymore, no stopping
of the program. As I said, I am new to this, so what is the part between
#if 0 and #endif doing, if I take out those two lines?

Thanks for the help!

Sina












-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wiedemann,
Rudolf, OPS3
Sent: Wednesday, April 18, 2007 7:16 PM
To: osg users
Subject: RE: [osg-users] no return from osgsimple

Hi Gordon,

Producer::RenderSurface is derived from OpenThreads::Thread.
In the destructor of RenderSurface, first the "cancel()" method of the
thread is called, then the window is destroyed (_fini()) and then there
is a while-loop, waiting until the thread has stopped
(while(isRunning()), but this never happens.
I can see this effect on a SuSE-10.2 machine, too, and I tried it with
three different nvidia gpus and two different nvidia opengl drivers.
I wonder, whether this is really a nvidia problem or an OpenThreads-bug
(alas I don't know much about thread-programming)?

Rudi

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gordon
Tomlinson
Sent: Wednesday, April 18, 2007 5:50 PM
To: 'osg users'
Subject: RE: [osg-users] no return from osgsimple

HI

We have been seeing similar issue on windows with 1.2, if you return
from the program, it crashes some were deep down in Nvidia land, it
seems some resource used by the ogl/driver is not released, dispite
spending quite a bit of time on this we have not yet been able to track
this down as it happens on all the graphics cards and driver revs we
have :(


__________________________________________________________
Gordon Tomlinson

Email   : [EMAIL PROTECTED]
Website : www.vis-sim.com www.gordontomlinson.com

__________________________________________________________

"Self defence is not a function of learning tricks but is a function of
how quickly and intensely one can arouse one's instinct for survival"
-Master Tambo Tetsura


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wiedemann,
Rudolf, OPS3
Sent: 18 April 2007 15:33
To: osg-users@openscenegraph.net
Subject: [osg-users] no return from osgsimple

Hello,

I'm running OSG-1.2 under SuSE-Linux-10.1 on a dual-core notebook with a
GeForce Go 7900 GTX.
When I run "osgsimple cow.osg" and then close the appearing
Producer::RenderSurface by a mouse-click on the close button, the
program seems to hang.
It can only be terminated by pressing <Ctrl-C>. But an added "std::cout
<< "***" << std::endl" to osgsimple.cpp between the while-loop and the
return statement is executed.
If I change "return 0;" to "exit(0);" this problem doesn't occur.
Any ideas?
Has this behaviour already been fixed in the svn-version?

Thanks in advance!
Rudi
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to