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