octave-maintainers
[Top][All Lists]
Advanced

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

Re: OpenGL timing problem


From: John W. Eaton
Subject: Re: OpenGL timing problem
Date: Tue, 19 Oct 2010 01:41:53 -0400

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


reply via email to

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