info-inventor
[Top] [All Lists]

Problems with SoGLRenderAction

To: info-inventor@xxxxxxxxxxx
Subject: Problems with SoGLRenderAction
From: Simon Adler <simon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jun 2004 10:55:11 +0200
Sender: info-inventor-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
Hello erverybody, 

I've got Problems with the action SoGLRenderAction. My
sources compile, but if I run the programm, it crashed with
an Segmentation fault. I want to use RenderAction, because
of the Anti Aliasing etc.

My Code:

<snip>
int 
main ( int argc, char ** argv )
{
  Widget Window = SoXt::init(argv[0]);
  if (!Window) return 1;
  SoXtRenderArea * viewport = new SoXtRenderArea(Window);

  SoSeparator * root = new SoSeparator; 

  SoGLRenderAction * render = new 
SoGLRenderAction(viewport->getViewportRegion());
  
  SoPerspectiveCamera * cam1 = new SoPerspectiveCamera;
  root->ref();
  root->addChild(cam1);
  setLight(root);
  BuildPlanets(root);
  cam1->viewAll(root, viewport->getViewportRegion());

  render->apply(root);

  viewport->setSceneGraph(root);
  viewport->show();
  SoXt::show(Window);
  SoXt::mainLoop();
  
  return 0;
}
</snip>

I use inventor-dev 2.1.5-8-4

The gdb generates, the following Output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 682)]
0x4059d739 in strncmp () from /lib/libc.so.6
(gdb) bt
#0  0x4059d739 in strncmp () from /lib/libc.so.6
#1  0x4015b162 in SoGLCacheContextElement::areMipMapsFast ()
   from /usr/lib/libInventor.so.0
#2  0x4015fe98 in SoGLTextureImageElement::sendTex ()
   from /usr/lib/libInventor.so.0
#3  0x4015fd2f in SoGLTextureImageElement::set ()
   from /usr/lib/libInventor.so.0
#4  0x4022ea55 in SoTexture2::GLRender () from /usr/lib/libInventor.so.0
#5  0x401c6579 in SoNode::GLRenderBelowPath () from /usr/lib/libInventor.so.0
#6  0x40226d92 in SoSeparator::GLRenderBelowPath ()
   from /usr/lib/libInventor.so.0
#7  0x40226d92 in SoSeparator::GLRenderBelowPath ()
   from /usr/lib/libInventor.so.0
#8  0x40226b72 in SoSeparator::GLRender () from /usr/lib/libInventor.so.0
#9  0x401c6ad9 in SoNode::GLRenderS () from /usr/lib/libInventor.so.0
#10 0x40150741 in SoGLRenderAction::renderPass ()
   from /usr/lib/libInventor.so.0
#11 0x401505b1 in SoGLRenderAction::renderAllPasses ()
   from /usr/lib/libInventor.so.0
#12 0x40150408 in SoGLRenderAction::beginTraversal ()
   from /usr/lib/libInventor.so.0
#13 0x4014d920 in SoAction::apply () from /usr/lib/libInventor.so.0
#14 0x08049c2b in main (argc=1, argv=0xbffff9f4) at space.cpp:95
(gdb) A debugging session is active.


Thanks for any help

Simon Adler

-- 
If you wait long enough, it will go away... after having done its 
damage. If it was bad, it will be back.

<Prev in Thread] Current Thread [Next in Thread>