Hi Paul, output of : cat /proc/drivers/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 169.12 Thu Feb 14 17:51:09 PST 2008 GCC version: gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) Also running on GeForce 7950 GX2 (http://www.nvidia.com/page/geforce_7950.html) It has 2 GPU's maybe there is some problem there? > Hmmm, can you easily try without compiz? Done, and it did nothing im afraid. Regards, David Johansson On Thu, Aug 14, 2008 at 3:45 PM, Paul Melis <[EMAIL PROTECTED]> wrote: > David Johansson wrote: >> >> Hi Paul, >> >> type "view" 2 times to get 2 views. >> close the first window, i always press 'f' to get out of fullscreen, >> type "view" again.. turns up black. >> > > No problems here with that sequence... >> >> Maybe this is my driver? >> > > It could be >> >> I'm using the default ubuntu Nvidia driver. > > cat /proc/drivers/nvidia/version > to discover which version you're running. >> >> Also, running Compiz in >> the background.. >> > > Hmmm, can you easily try without compiz? > Paul >> >> Regards, >> >> David Johansson >> >> >> >> On Thu, Aug 14, 2008 at 3:08 PM, Paul Melis <[EMAIL PROTECTED]> wrote: >> >>> >>> I've tried a different series of entering "view" one or more times, >>> followed >>> by closing one or more of the shown windows and repeating. But I've not >>> seen >>> any "black windows" yet. What is the sequence that reproduces the problem >>> for you? >>> >>> This is on Linux, nVidia 96.43.01 driver >>> >>> Paul >>> >>> David Johansson wrote: >>> >>>> >>>> Hi Robert, >>>> >>>> Here is code that produces the problem. >>>> >>>> I'm building/running on Ubuntu 8.04 with osg 2.4 >>>> >>>> #include <iostream> >>>> #include <vector> >>>> #include <string> >>>> #include <osg/Node> >>>> #include <OpenThreads/Thread> >>>> #include <osgDB/ReadFile> >>>> #include <osgViewer/Viewer> >>>> #include <osgViewer/ViewerEventHandlers> >>>> class viewerThread: public OpenThreads::Thread >>>> { >>>> public: >>>> viewerThread( osg::Node* n ): OpenThreads::Thread(), _scene(n){} >>>> virtual void run(){ >>>> osgViewer::Viewer viewer; >>>> _pViewer = &viewer; >>>> viewer.addEventHandler(new osgViewer::StatsHandler()); >>>> viewer.addEventHandler(new osgViewer::ThreadingHandler()); >>>> viewer.addEventHandler(new >>>> osgViewer::WindowSizeHandler()); >>>> viewer.setSceneData(_scene); >>>> >>>> viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext); >>>> viewer.run(); >>>> _pViewer = NULL; >>>> } >>>> void cancelViewer(){ >>>> if( _pViewer != NULL ) >>>> _pViewer->setDone( true ); >>>> } >>>> private: >>>> osg::Node* _scene; >>>> osgViewer::Viewer* _pViewer; >>>> >>>> }; >>>> >>>> int main(int argc, wchar_t* argv[]) >>>> { >>>> std::vector<viewerThread*> garbage; >>>> osg::ref_ptr<osg::Node> n = osgDB::readNodeFile("cow.osg"); >>>> if( !n ) return -1; >>>> bool bRun = true; >>>> do{ >>>> std::wstring wsCommand; >>>> std::wcout << L"Enter Command : "; >>>> std::getline( std::wcin, wsCommand, L'\n' ); >>>> >>>> if( wsCommand == L"quit" ){ >>>> bRun = false; >>>> }else if ( wsCommand == L"view" ){ >>>> viewerThread* vThread = new viewerThread( n.get() >>>> ); >>>> garbage.push_back( vThread ); >>>> vThread->startThread(); >>>> } >>>> }while( bRun ); >>>> >>>> for( unsigned int i = 0; i < garbage.size(); i++ ){ >>>> viewerThread* p = garbage.at( i ); >>>> p->cancelViewer(); >>>> p->cancel(); >>>> while ( p->isRunning() ) >>>> { >>>> OpenThreads::Thread::microSleep(50); >>>> } >>>> delete p; >>>> } >>>> garbage.clear(); >>>> return 1; >>>> } >>>> >>>> Regards, >>>> >>>> David Johansson >>>> >>>> >>>> On Thu, Aug 14, 2008 at 10:14 AM, Robert Osfield >>>> <[EMAIL PROTECTED]> wrote: >>>> >>>> >>>>> >>>>> Hi David, >>>>> >>>>> I really don't know what is up with your usage, there really isn't >>>>> enough info about how you set up things to know where things are going >>>>> astray. >>>>> >>>>> A window being black suggest to be that rendering itself hasn't >>>>> started yet, just that the window has been realized. The osgViewer >>>>> doesn't support multiple viewers sharing a single GraphicsContext >>>>> (this is what you should use osgViewer::CompositeViewer for so you can >>>>> have multiple views sharing a single context). >>>>> >>>>> Robert. >>>>> >>>>> On Wed, Aug 13, 2008 at 7:09 PM, David Johansson <[EMAIL PROTECTED]> >>>>> wrote: >>>>> >>>>> >>>>>> >>>>>> Hi Everyone, >>>>>> >>>>>> I have a problem with threading and osg::Viewer. >>>>>> >>>>>> Basically i create and recreate a bunch of threads that runs a new >>>>>> Viewer instance and the problem is that the viewers 'draw area' turns >>>>>> up black if i ever close a Viewer. >>>>>> >>>>>> Thread1 creates Window1 - viewing Node1 - OK. >>>>>> Thread2 creates Window2 - viewing Node1 - Ok. >>>>>> User closes Window1 >>>>>> Thread1 dies. >>>>>> Thread3 creates Window3 - viewing Node1 -- Will turn up black >>>>>> Thread4 creates Window4 - viewing Node1 -- All Ok.. >>>>>> Thread5 creates Window5 - viewing Node1 -- Also Ok >>>>>> User closes window 2 >>>>>> Thread2 dies. >>>>>> Thread6 creates Window6 - viewing Node1 -- Will turn up black >>>>>> Thread7 creates Window7 - viewing Node1 -- Ok again. >>>>>> User closes all windows >>>>>> Thread3 - 7 dies. >>>>>> Thread8 creates Window8 - viewing Node1 -- Black. >>>>>> Thread9 creates Window9 - viewing Node1 -- Black. >>>>>> Thread10 creates Window10 - viewing Node1 -- Black. >>>>>> Thread11 creates Window11 - viewing Node1 -- Black. >>>>>> Thread12 creates Window12 - viewing Node1 -- Black. >>>>>> Thread13 creates Window13 - viewing Node1 -- Ok! >>>>>> >>>>>> I noticed that After closing all windows, i had 5 windows running that >>>>>> acctually showed something(5 new Contexts??). After that i had to >>>>>> create 5 threads (that were black) until getting a new view that >>>>>> wasn't black. >>>>>> >>>>>> Looking through the code my guess is that "graphicsContexts" are >>>>>> getting reused, however not reset or something like that. >>>>>> >>>>>> This is the code i use to set-up my viewers: >>>>>> >>>>>> osgViewer::Viewer viewer; >>>>>> viewer.addEventHandler(new osgViewer::StatsHandler()); >>>>>> viewer.addEventHandler(new osgViewer::ThreadingHandler()); >>>>>> viewer.addEventHandler(new osgViewer::WindowSizeHandler()); >>>>>> viewer.setSceneData(g); >>>>>> viewer.setThreadingModel(osgViewer::Viewer::ThreadPerContext); /**/ >>>>>> viewer.run(); >>>>>> >>>>>> Any help would be great! >>>>>> >>>>>> Regards, >>>>>> >>>>>> David Johansson >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

