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

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

[Octave-bug-tracker] [bug #31931] figure (1, "visible", "off") -> Bus er


From: Søren Hauberg
Subject: [Octave-bug-tracker] [bug #31931] figure (1, "visible", "off") -> Bus error
Date: Sun, 06 Feb 2011 20:31:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; da-DK; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13

Follow-up Comment #17, bug #31931 (project octave):

I've spend a little time on investigating this issue as it really makes FLTK
unstable for me. With the current code I see a crash when I do

  graphics_toolkit fltk
  figure

The crash happens in the call to 'canvas->resize' in
'plot_window::show_menubar'. The issue is that en OpenGL context has not been
created at this time, which causes the line

  glMatrixMode (GL_PROJECTION);

in 'OpenGL_fltk::setup_viewport' to crash Octave. Thus, the real question is:
why has an OpenGL context not been created?

Well, in the 'plot_window' constructor we have the following code

  if (fp.get_currentaxes ().ok())
    show_canvas ();
  else
    hide_canvas ();

As I have just called 'figure' from the Octave prompt, there is no plot
content and hence no axes. This means that 'show_canvas' is not called. This
is important as 'show_canvas' calls 'canvas->make_current ()' which creates
the current OpenGL context.

I tried adding

  canvas->make_current ();

before the above-mentioned conditional expression in the 'plot_window'
constructor and I no longer see the crash and things work for me. I realise
that this is most-likely not the correct solution, but hopefully it provides a
hint of what the right solution might be.

I hope this is helpful :-)

Søren

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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