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

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

[Octave-bug-tracker] [bug #46417] GL2PS info: OpenGL feedback buffer ove


From: Rik
Subject: [Octave-bug-tracker] [bug #46417] GL2PS info: OpenGL feedback buffer overflow when printing
Date: Wed, 25 Nov 2015 18:30:57 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #6, bug #46417 (project octave):

The issue may reside in gl2ps.  Octave is essentially doing the following


while (state == GL2PS_OVERFLOW)
{
   bufsize += 1024*1024;
   gl2psBeginPage (..., bufsize,...);
   draw_scene_with_opengl
   state = gl2psEndPage ();
}


I ran Octave under gdb and the problem is that gl2psEndPage is always
returning GL2PS_NO_FEEDBACK (the feedback buffer is empty) rather than
GL2PS_OVERFLOW (the size of the feedback buffer given to gl2psBeginPage is not
large enough).

The example code should require three trips through the loop.


pcolor (rand (200));
print try.png


I do get messages printed to stderr about GL2PS_OVERFLOW for the first two
function calls so gl2ps knows about the error, but is not reporting it back
correctly upstream.  I don't know if this is a problem with gl2ps or with the
way we are calling it.  I suspect maybe the latter because I downloaded the
code for gl2ps and the sample test file is written as


while(state == GL2PS_OVERFLOW){
  buffsize += 1024*1024;
  gl2psBeginPage(file, "gl2psTest", viewport, format, sort, options,
                 GL_RGBA, 0, NULL, nbcol, nbcol, nbcol,
                 buffsize, fp, file);
  display();
  state = gl2psEndPage();
}


I modified this to 


while(state == GL2PS_OVERFLOW){
  buffsize += 1024;
  gl2psBeginPage("test", "gl2psTestSimple", NULL, GL2PS_EPS,
GL2PS_SIMPLE_SORT,
                 GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT,
                 GL_RGBA, 0, NULL, 0, 0, 0, buffsize, fp, "out.eps");
  display();
  state = gl2psEndPage();
  printf ("Final state: %d\n", state);
}


Now when I run the simple test program it spits out a bunch of
GL2PS_OVERFLOWs, but eventually ends with success.  It never returns
GL2PS_NO_FEEDBACK.

If I modify gl2psTest.c in the same way then I can get GL2PS_NO_FEEDBACK
returns, but eventually the function succeeds.

It seems long, but might have to build a version of the gl2ps library with
debugging symbols included and then run all of Octave under it to see what is
going on.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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