Re: [osg-users] Adding DatabasePager to VRJuggler for PagedLODSupport

2010-01-15 Thread Levi Swartzentruber
I have been working on tracking down why my application seg faults.  The
code seems to be trying to delete a GL buffer that does not exist.  The
problematic code is, to the best of my knowledge, the same as that found in
osgViewer::Renderer::flushAndCompile().  I have that code in postFrame() as
Jason suggested.  Here is the code chunk:

void Application::postFrame()
{
double availableTime = 1.0/10.0;
if(_frameStamp) {
_databasePager-compileGLObjects(*(_sceneViewer-getState()),
availableTime);
_sceneViewer-flushDeletedGLObjects(availableTime);
_databasePager-signalEndFrame();
}
}

Here is a debug backtrace at the seg fault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x41a0d940 (LWP 12980)]
0x0036599c87e9 in glDeleteBuffers () from /usr/lib64/libGL.so.1
(gdb) backtrace
#0  0x0036599c87e9 in glDeleteBuffers () from /usr/lib64/libGL.so.1
#1  0x2ab316220729 in osg::BufferObject::Extensions:
:glDeleteBuffers ()
   from /home/users/vkk2/bin/linux/64Bit/OSG2.9.5/lib64/libosg.so.60
#2  0x2ab3162230a2 in osg::BufferObject::flushDeletedBufferObjects ()
   from /home/users/vkk2/bin/linux/64Bit/OSG2.9.5/lib64/libosg.so.60
#3  0x2ab3162d36f9 in osg::flushDeletedGLObjects () from
/home/users/vkk2/bin/linux/64Bit/OSG2.9.5/lib64/libosg.so.60
#4  0x2ab317030446 in osgUtil::SceneView::flushDeletedGLObjects ()
   from /home/users/vkk2/bin/linux/64Bit/OSG2.9.5/lib64/libosgUtil.so.60
#5  0x004066c8 in Application::postFrame ()
#6  0x2ab31474fdc0 in vrj::Kernel::controlLoop () from
/home/users/bnew/vrjuggler-2.3.16/lib64/x86_64/libvrj-2_3_16.so
#7  0x2ab3151cbbb7 in boost::function0void, std::allocatorvoid
::operator() ()
   from /home/users/bnew/vrjuggler-2.3.16/lib64/x86_64/libvpr-2_1_14.so
#8  0x2ab31521a555 in vpr::ThreadPosix::startThread ()
   from /home/users/bnew/vrjuggler-2.3.16/lib64/x86_64/libvpr-2_1_14.so
#9  0x2ab3151cbbb7 in boost::function0void, std::allocatorvoid
::operator() ()
   from /home/users/bnew/vrjuggler-2.3.16/lib64/x86_64/libvpr-2_1_14.so
#10 0x2ab3151caf46 in vprThreadFunctorFunction () from
/home/users/bnew/vrjuggler-2.3.16/lib64/x86_64/libvpr-2_1_14.so
#11 0x003653806617 in start_thread () from /lib64/libpthread.so.0
#12 0x003652cd3c2d in clone () from /lib64/libc.so.6

Any thoughts on how to solve the problem would be greatly appreciated,
Levi
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Adding DatabasePager to VRJuggler for PagedLODSupport

2010-01-14 Thread Jason Daly

Levi Swartzentruber wrote:
Those comments were very helpful.  I am able to get the VR Juggler 
application to display the PagedLOD properly but I still have one 
problem.  I can only move a set distance around the terrain before the 
program seg faults.  The line that causes the problem is 
osgSceneView-flushDeletedGLObjects(availableTime);.  If I comment 
out that line, I do not get a segmentation fault, but the frame rate 
drops steadily while the application runs.  Is this a threading or 
context issue?  Any help would be greatly appreciated.


Not sure.  I don't recall having any issues with the DatabasePager in 
our code (I'm sure there was one or two, but they weren't memorable 
enough for me to recall right now).


All of our rendering is currently single-threaded (although the 
DatabasePager does run in its own thread).  We never had the need for 
any special thread protection.


--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org