octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48669] Segfaults at exit after using OpenGL-b


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #48669] Segfaults at exit after using OpenGL-based toolkits in --no-gui mode
Date: Tue, 2 Aug 2016 21:38:21 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #10, bug #48669 (project octave):

OK, I found one bug, and it has to do with what I guessed concerning FLTK, but
it isn't the at-exit bug.  I bisected the source and found that the following
changeset causes the FLTK draw problems:


changeset:   22192:20b225a3ebf8
date:        Sat Jul 23 17:45:32 2016 +0200
files:       doc/interpreter/genpropdoc.m libinterp/corefcn/gl-render.cc
libinte
description:
Update to light (patch #8943)


By my reasoning, if Fl_Gl_Window() of


  OpenGL_fltk (int xx, int yy, int ww, int hh, double num)
    : Fl_Gl_Window (xx, yy, ww, hh, 0), number (num), renderer (),
      in_zoom (false), zoom_box ()


is failing, it must be something in the initialization prior to drawing that
is the problem.  So, here is the suspect hunk in that changeset:


 opengl_renderer::opengl_renderer (void)
   : toolkit (), xform (), xmin (), xmax (), ymin (), ymax (),
     zmin (), zmax (), xZ1 (), xZ2 (), marker_id (), filled_marker_id (),
@@ -606,6 +633,9 @@
   if (! ok)
     error ("the size of GLsizei is smaller than the size of int");

+  // Check actual maximum number of lights possible
+  max_lights = get_maxlights ();
+
 #else

   err_disabled_feature ("opengl_renderer", "OpenGL");


That get_maxlights() routine has an "if (glGetError ())" call within.  So,
that is an OpenGL call outside of the Fl_Gl_Window instance, which I guess is
unpredictable by the FLTK rules.  I commented out the added line above,
recompiled and FLTK works again.

I'm going to link to this post at the original bug report and have the
changset author see if that initialization can be done after the Fl_Gl_Window
is instantiated.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48669>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]