Fix for segmentation fault in stage with intel graphic boards

"Daniel Dube" <[email protected]>
Newsgroups gmane.science.robotics.playerstage
Organization Universität Tübingen
Message-ID <op.va9ioculmu2kz6@ralap111>
Hi,

we had the reproducible problem, that stage crashed on four of five
startups just after the simulation window appears. We noticed this problem
on several Ubuntu 9.10 machines with attached intel graphic hardware. We
tested the trunk and 3.2.2 version with the same result. The problem did  
not occur on machines with NVIDIA graphic boards.

It seems that if Canvas::Resize() is called rather than Canvas::InitGl(),
the intel driver produces a segmentation fault in the function
glLoadIdentity() called by Canvas::FixViewport().

The following patch should fix this problem:

--- libstage/canvas.cc	(Revision 8612)
+++ libstage/canvas.cc	(Arbeitskopie)
@@ -1285,6 +1285,7 @@
  void Canvas::resize(int X,int Y,int W,int H)
  {
    Fl_Gl_Window::resize(X,Y,W,H);
-  FixViewport(W,H);
+  if ( init_done )
+	  FixViewport(W,H);
    invalidate();
  }


Regards
Daniel

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.