octave-maintainers
[Top][All Lists]
Advanced

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

Re: wait_for_file ?? [print via pipes - help testing on Windows?]


From: Ben Abbott
Subject: Re: wait_for_file ?? [print via pipes - help testing on Windows?]
Date: Sun, 19 Sep 2010 12:33:54 -0400

On Sep 19, 2010, at 1:27 AM, Michael D Godfrey wrote:

> On 09/18/2010 10:02 PM, Ben Abbott wrote:
>> On Sep 18, 2010, at 9:33 PM, Michael D Godfrey wrote:
>> 
>> 
>>> > 
>>> On 09/18/2010 01:08 PM, Shai Ayal wrote:
>>> 
>>>> >> On Sat, Sep 18, 2010 at 8:00 PM, Michael D Godfrey <address@hidden>
>>>>  wrote:
>>>> 
>>>> >> 
>>>> >> 
>>>> In any case I hope that Shai can figure this out!
>>>> 
>>>> >> 
>>>> >> 
>>>> I'm currently on a family vacation, I will return at the beginning of 
>>>> October. Until then I really can't do much.
>>>> 
>>>> >> 
>>>> >> 
>>>> Shai
>>>> 
>>> > 
>>> I built a new octave from the current tip and find that the behavior has 
>>> changed.
>>> 
>>> > 
>>> There were some patches today, but it appeared to me that none of the 
>>> fltk-related
>>> 
>>> > 
>>> code was changed.  Anyhow, what happens now is:
>>> 
>>> > 
>>> > 
>>> 1. First, as before Ben's example
>>> 
>>> > 
>>>  pid = popen ("cat > test.txt", "w");
>>> 
>>>> > > 
>>>>   fprintf (pid, "Hello World");
>>>> 
>>>> > > 
>>>>   waitpid (pid);
>>>> 
>>>> > > 
>>>>   pclose (pid);
>>>> 
>>>> > > 
>>>> works just fine.
>>>> 
>>> > 
>>> > 
>>> 2. The test_printing script does a bit better:
>>> 
>>> > 
>>> > 
>>> octave:1> test_printing
>>> 
>>> > 
>>> Xlib:  extension "NV-GLX" missing on display ":1175.0".
>>> 
>>> > 
>>> backend is fltk
>>> 
>>> > 
>>> print fltk-aifm  -daifm
>>> 
>>> > 
>>> print fltk-dxf  -ddxf
>>> 
>>> > 
>>> print fltk-emf  -demf
>>> 
>>> > 
>>> print fltk-epsc  -depsc
>>> 
>>> > 
>>> error: structure has no member `preview'
>>> 
>>> > 
>>> error: evaluating argument list element number 1
>>> 
>>> > 
>>> error: called from:
>>> 
>>> > 
>>> error:   /d/src/octave/hg/octave/scripts/plot/print.m at line 483, column 3
>>> 
>>> > 
>>> error: evaluating argument list element number 1
>>> 
>>> > error:   /d/src/octave/hg/octave/scripts/plot/
>>> __fltk_print__.m at line 45, column 10
>>> 
>>> > 
>>> error:   /d/src/octave/hg/octave/scripts/plot/print.m at line 346, column 6
>>> 
>>> > 
>>> error:   /data/d/src/octave/hg/test_printing.m at line 65, column 9
>>> 
>>> > 
>>> octave:1> GL2PS error: Bad file pointer
>>> 
>>> > 
>>> panic: Segmentation fault -- stopping myself...
>>> 
>>> > 
>>> attempting to save variables to `octave-core'...
>>> 
>>> > 
>>> save to `octave-core' complete
>>> 
>>> > 
>>> Segmentation fault (core dumped)
>>> 
>>> > 
>>> ===========================
>>> 
>>> > 
>>> The outputs are:
>>> 
>>> > 
>>> -rw-rw-r-- 1 godfrey godfrey  52 Sep 18 18:14 fltk-aifm.ai
>>> 
>>> > 
>>> -rw-rw-r-- 1 godfrey godfrey 346 Sep 18 18:14 fltk-dxf.dxf
>>> 
>>> > 
>>> -rw-rw-r-- 1 godfrey godfrey   0 Sep 18 18:14 fltk-emf.emf
>>> 
>>> > 
>>> ===========================
>>> 
>>> > 
>>> but, it crashes in the same manner as before.  The gdb bt is
>>> 
>>> > 
>>> attached: fltk02_bt
>>> 
>>> > 
>>> > 
>>> However, if I try a simple:
>>> 
>>> > 
>>> plot(1:200)
>>> 
>>> > 
>>> print tes01.pdf
>>> 
>>> > 
>>> > 
>>> octave hangs.  ctrl-c wakes it up.
>>> 
>>> > 
>>> The PDF file exists, but is empty.
>>> 
>>> > 
>>> the bt for this is attached: fltk03_bt
>>> 
>>> > 
>>> > 
>>> Michael
>>> 
>>> > 
>>> > 
>>> <fltk02_bt.txt><fltk03_bt.txt>
>>> 
>> The `preview' member should be set in __print_parse_opts__.m
>> 
>> I checked the last changeset, and it appears to me that the field is set 
>> correctly.
>> 
>> What do you get when you type .....
>> 
>>      close all
>>      backend fltk
>>      __print_parse_opts__("-depsc", "fltk-epsc.eps")
>> 
>> Ben
>> 
> octave:1> close all
> octave:2> backend fltk
> octave:3> __print_parse_opts__("-depsc", "fltk-epsc.eps")
> ans =
> {
>   append_to_file = 0
>   canvas_size =
> 
>      576   432
> 
>   debug = 0
>   debug_file = octave-print-commands.log
>   devopt = epsc
>   epstool_binary = /usr/bin/epstool
>   figure = [](0x0)
>   fig2dev_binary = /usr/bin/fig2dev
>   fontsize = 
>   font = 
>   force_solid = 0
>   formatted_for_printing = 0
>   ghostscript =
>   {
>     binary = /usr/bin/gs
>     debug = 0
>     device = 
>     epscrop =  1
>     level = [](0x0)
>     output = 
>     papersize = 
>     pageoffset =
> 
>        0   0
> 
>     resolution =  150
>     antialiasing = 0
>   }
> 
>   loose = 0
>   name = fltk-epsc.eps
>   orientation = portrait
>   pstoedit_binary = /usr/bin/pstoedit
>   printer = 
>   send_to_printer = 0
>   special_flag = textnormal
>   tight_flag = 0
>   use_color =  1
>   lpr_options = -l
>   unlink = {}(0x0)
> }
> 
> octave:4> 
> 
> Ben,
> 
> Should I have found "preview" in the above?

Yes. If you look at the changeset, it is there.

Ben



reply via email to

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