octave-maintainers
[Top][All Lists]
Advanced

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

Re: OpenGL timing problem


From: Shai Ayal
Subject: Re: OpenGL timing problem
Date: Fri, 29 Oct 2010 11:25:17 +0200

On Tue, Oct 19, 2010 at 7:41 AM, John W. Eaton <address@hidden> wrote:
> On 18-Oct-2010, Michael D Godfrey wrote:
>
> | On 10/18/2010 10:12 PM, Shai Ayal wrote:
> |
> |     A bt of this error from a current system would be helpful. I will try
> |     to recreate this here (surprisingly I too have access to a slow DSL
> |     connection ...), I'll see if I succeed.
> |
> |     Shai
> |
> | The bt is attached.  Also, I do not think that I have mentioned this before,
> | but just before the crash there is output written to the plot window.  The
> | output
> | is written over the original plot. It is the same as the original, but the
> | scale
> | is somewhat greater.
>
>
> | octave:3> GL2PS error: Bad file pointer
> |
> | Program received signal SIGSEGV, Segmentation fault.
> | _IO_new_fclose (fp=0x0) at iofclose.c:57
> | 57      if (fp->_IO_file_flags & _IO_IS_FILEBUF)
> | (gdb) bt
> | #0  _IO_new_fclose (fp=0x0) at iofclose.c:57
> | #1  0x00007ffff74004bf in glps_renderer::draw (this=0xfff4d0, go=...) at 
> gl2ps-renderer.cc:83
>
> The glps_renderer::draw function is:
>
>  void
>  glps_renderer::draw (const graphics_object& go)
>  {
>    static bool in_draw = false;
>
>    if (!in_draw)
>      {
>        in_draw = true;
>
>        FILE *fp = fdopen (fid, "wb");
>
>        ...
>
>        while (state == GL2PS_OVERFLOW)
>          {
>            ...
>
>            gl2psBeginPage ("glps_renderer figure", "Octave", viewport,
>                            gl2ps_term, GL2PS_BSP_SORT,
>                            (GL2PS_SILENT | GL2PS_SIMPLE_LINE_OFFSET
>                             | GL2PS_NO_BLENDING | GL2PS_OCCLUSION_CULL
>                             | GL2PS_BEST_ROOT | gl2ps_text),
>                            GL_RGBA, 0, NULL, 0, 0, 0,
>                            buffsize, fp, "" );
>
>            ...
>          }
>
>        gnulib::fclose (fp);
>
>        in_draw = 0;
>      }
>    else
>      opengl_renderer::draw (go);
>  }
>
> How does FP become 0x0 here?  Is fdopen failing to return a valid FILE
> pointer?  If so, is FID not valid at the point where fdopen is called,
> or is there some other problem?
>
> I would guess that FP is 0x0 when fl2psBeginPage is called and that is
> what the "GL2PS error: Bad file pointer" message is about.
>
> jwe
>
I do not have any progress with this bug since for me fltk plotting
does not work at all over ssh. It works on both machines locally, but
not through ssh.

To continue,  I need Michael. perhaps, following John's suggestion,
lets find out what fp and fid are. can you insert the line

std::cout << "fid=" << fid << ", fp=" << fp << "\n";
just before the
while (state == GL2PS_OVERFLOW)
line, and let's see what we get ...

Shai



reply via email to

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