Re: [osg-users] Slaves, RTT, and HUD

2014-11-05 Thread Robert Osfield
Hi Ben, Try placing the Text HUD Camera in the scene graph underneath the main scene Camera and leave all the frame buffer/texture attachment settings blank, this way it'll inherit the current frame buffer configuration from it's parent. Robert. On 4 November 2014 20:58, Ben Strukus

Re: [osg-users] GeometryTechnique race condition crash

2014-11-05 Thread Pjotr Svetachov
Hi Robert, I saw that you put the new thread code on svn. I have experimented a little with it and it seems to produce deadlocks on application shutdown for us. In OperationThread::cancel you have replaced a while loop with a join. The problem is that the previous code was periodically calling

Re: [osg-users] GeometryTechnique race condition crash

2014-11-05 Thread Robert Osfield
Hi Pjotr, Thanks for testing out the new code. I changed the code to use of join() to address the false positives generated by valigrind when a thread is stopped without the pthread_join() that it expects. Addressing this false positive made it easier to determine the actual race condition,

Re: [osg-users] GeometryTechnique race condition crash

2014-11-05 Thread Pjotr Svetachov
I first got the deadlock on linux and only in release builds. On windows I was able to reproduce it by placing a 1ms sleep line 403. Adding cancel helps but then the thread will not do any clean up and valgrind spits out a 1mb log file complaining about memory leaks. It's better to try to fix

Re: [osg-users] GeometryTechnique race condition crash

2014-11-05 Thread Robert Osfield
Hi Pjotr, Rather than go adding extra complexity elsewhere in the OSG to handle the use of join() I have reinstated the original OperationThread::cancel() implementation, but retained the join(), placing it after the old while(isRunning()) {} loop. Having the join() there appeases valgrind and

Re: [osg-users] GeometryTechnique race condition crash

2014-11-05 Thread Pjotr Svetachov
Looks like the new code fixes the deadlocks. Attached are my modifications to the InputStream to no modify images when they come from a cache. Note that this is a quick fix. Cheers, Pjotr -- Read this topic online here:

Re: [osg-users] GeometryTechnique race condition crash

2014-11-05 Thread Robert Osfield
Hi Pjotr, Thanks for the changes. I've implemented something similar, the main difference is that I've added a _dummyReadObject member variable to InputSteam and use this object to read the object fields that we wish to ignore. Could you try svn/trunk version of include/osgDB/InputStream and

[osg-users] Undefined reference when building osg for Android

2014-11-05 Thread Julius Haertl
Hello , I'm trying to build OpenSceneGraph for Android and getting started with the osgViewer example application. After getting around the first errors, I'm quite stuck with the following while building with ndk-build. ndk-build keeps complaining about missing reference of rand and stat64.