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

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

[Octave-bug-tracker] [bug #45604] Windows XP Octave 4.0.0 plot crashes


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #45604] Windows XP Octave 4.0.0 plot crashes
Date: Fri, 24 Jul 2015 05:27:20 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #7, bug #45604 (project octave):

I think I know what that warning message is, and honestly I think it may be
undo alarm.  This warning


warning: opengl_selector::select: selection buffer overflow 


comes from gl-select.cc in the function


graphics_object
opengl_selector::select (const graphics_object& ax, int x, int y, int flags)


which does


  glRenderMode (GL_SELECT);
  glInitNames ();

  object_map.clear ();

  draw (ax);

  int hits = glRenderMode (GL_RENDER);


After the above code is a conditional and if 'hits' is negative then the
warning message is issued.  It's a bit tricky, the 'hits' applies not to
GL_RENDER mode, but the previous mode when glRenderMode is called, GL_SELECT. 
So hits indicates the number of items selected, I think, or something related
to it.  There is an explanation here:

https://www.opengl.org/sdk/docs/man2/xhtml/glSelectBuffer.xml

With the plot so dense with points/curves (1000 of them), every pixel where
the data is probably represents dozens of objects that are selected and moving
the mouse across a few pixels could quickly generate a couple hundred hits. 
Hence, the buffer indicating selections is probably overflowing and isn't
large enough to contain all the objects.

Well, that is a problem in the sense of buffer overflow and not knowing
exactly how to handle that situation.  But it is kind of an innocuous problem
too--the solution being to increase the buffer size somehow, but how big?  (It
is now at 128.)  Any choice seems it can overflow with the right Octave plot
command.  One could

1) Increase buffer size dynamically (double size) if the 'hits' value comes
back negative.  Do not issue warning message.

2) Do not issue the warning message, just do nothing if the buffer overflows.

3) Leave the warning message as is.  (But few if any will know what it
means.)

Should I move this to another bug thread?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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