On Thu, Dec 2, 2010 at 10:37 PM, Søren 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.
Shai