[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bad file pointer [was: Re: Comparing plots to Matlab]
From: |
Søren Hauberg |
Subject: |
Re: Bad file pointer [was: Re: Comparing plots to Matlab] |
Date: |
Fri, 03 Dec 2010 08:03:54 +0100 |
tor, 02 12 2010 kl. 23:29 +0200, skrev Shai Ayal:
> On Thu, Dec 2, 2010 at 10:37 PM, Soren Hauberg <address@hidden>
> wrote:
> ons, 01 12 2010 kl. 23:37 -0800, skrev Michael D Godfrey:
> > On 12/01/2010 11:05 PM, John W. Eaton wrote:
> > > I know, but it didn't seem to be working at all without
> them, even if
> > > the plots were displayed to the screen. I just tried
> again and it
> > > generated 22 PNG files without the pauses. With them, I
> got 150 PNG
> > > files.
> > >
> > > jwe
> > There is definitely a lot of randomness in this problem.
> The only
> > fairly reliable choice that I know of is to run locally and
> > break up sequences into a few plots each.
> > Do you get the "GL2PS error: Bad file pointer"
> > error? or something else?
>
> I've been trying to debug why print crashes for me (still no
> luck).
> During some of this debugging I started getting the "Bad file
> pointer"
> error, so I thought I'd look into that (hoping it would fix my
> printing
> issue). My *guess* (and I must stress that this is guess-work)
> is as
> follows:
>
> 1. '__fltk_print__' opens some process and sends the
> process ID (as
> a string) to 'drawnow'.
> 2. 'drawnow' passes this string over to the gl2ps
> renderer, which
> converts the string to an integer and attempts to open
> the
> underlying stream using 'fdopen'.
> 3. The call to 'fdopen' fails!
>
> The real question is: why does this call fail? I believe the
> gl2ps
> renderer is running in a different thread, which somehow has
> an
> influence on the behaviour of 'fdopen'.
>
>
> Since I didn't see the original problem I can't test your patch, but
> one thing is for sure: everything runs in the same thread.
Ok! Then my hypothesis is just pure nonsense :-)
I just saw that I was able to successfully convert the string
representing the PID to a FILE pointer in 'drawnow', but not in
'fltk_backend::print_figure'. I didn't really understand why, so I
arbitrarily blamed thread issues (but I guess I was wrong).
Cheers
Soren
- Re: Comparing plots to Matlab, (continued)
- Comparing plots to Matlab, John W. Eaton, 2010/12/02
- Re: Comparing plots to Matlab, Michael D Godfrey, 2010/12/02
- Re: Comparing plots to Matlab, John W. Eaton, 2010/12/02
- Re: Comparing plots to Matlab, Michael D Godfrey, 2010/12/02
- Re: Comparing plots to Matlab, John W. Eaton, 2010/12/02
- Re: Comparing plots to Matlab, John W. Eaton, 2010/12/02
- Re: Comparing plots to Matlab, Shai Ayal, 2010/12/02
- Bad file pointer [was: Re: Comparing plots to Matlab], Søren Hauberg, 2010/12/02
- Re: Bad file pointer [was: Re: Comparing plots to Matlab], Shai Ayal, 2010/12/02
- Re: Bad file pointer [was: Re: Comparing plots to Matlab],
Søren Hauberg <=
- Re: Bad file pointer [was: Re: Comparing plots to Matlab], Shai Ayal, 2010/12/03
Re: Comparing plots to Matlab, Søren Hauberg, 2010/12/02
Re: Comparing plots to Matlab, John W. Eaton, 2010/12/02
Re: Comparing plots to Matlab, Søren Hauberg, 2010/12/02
Re: Comparing plots to Matlab, Søren Hauberg, 2010/12/02
Re: Comparing plots to Matlab, Kai Habel, 2010/12/02