Problem with Print under Octave 3.8.1 under windows

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Print under Octave 3.8.1 under windows

ijourneaux
I started to install Octave 3.8.1 on a new computer and I am getting the following error message. This same install pack works on an other computer so I am not sure what the problem might be.  I tried reinstalling Octave and GhostScript to no avail.  A search of the forum indicates the problem has occurred with others but I was unable to locate a solution

>> x = -10:0.1:10;
>> plot (x, sin (x));
>> print ('-dpng','test.png')
warning: print.m: epstool binary is not available.
Some output formats are not available.
Error: /undefined in -1.#IND
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval
--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
false   1   %stopped_push   1950   1   3   %oparray_pop   1949   1   3   %oparr
ay_pop   --nostringval--   1933   1   3   %oparray_pop   1819   1   3   %oparra
y_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nost
ringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1189/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--   --dict:4
0/64(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.14: Unrecoverable error, exit code 1
>> print ('-dpng','test.png')
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
After more tests, this same error occurs with all version of octave 3.6.4 thru 3.8.2. This seems to point to an issue with ghostscript but all of my attempt to resolve have not worked.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

Andreas Weber-4
In reply to this post by ijourneaux
Am 14.06.2014 02:09, schrieb ijourneaux:

> I started to install Octave 3.8.1 on a new computer and I am getting the
> following error message. This same install pack works on an other computer
> so I am not sure what the problem might be.  I tried reinstalling Octave and
> GhostScript to no avail.  A search of the forum indicates the problem has
> occurred with others but I was unable to locate a solution
>
>>> x = -10:0.1:10;
>>> plot (x, sin (x));
>>> print ('-dpng','test.png')
> warning: print.m: epstool binary is not available.
> Some output formats are not available.
> Error: /undefined in -1.#IND
> Operand stack:
>    --nostringval--
> Execution stack:
>    %interp_exit   .runexec2   --nostringval--   --nostringval--  
> --nostringval
> --   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
> false   1   %stopped_push   1950   1   3   %oparray_pop   1949   1   3  
> %oparr
> ay_pop   --nostringval--   1933   1   3   %oparray_pop   1819   1   3  
> %oparra
> y_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--  
> --nost
> ringval--   --nostringval--   2   %stopped_push   --nostringval--
> Dictionary stack:
>    --dict:1189/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--  
> --dict:4
> 0/64(L)--
> Current allocation mode is local
> Last OS error: No such file or directory
> GPL Ghostscript 9.14: Unrecoverable error, exit code 1
>>> print ('-dpng','test.png')

Are you using fltk or gnuplot as graphics_toolkit?
You could also add "-debug" to your print command (for example
print("testplot.ps","-debug") to see the gnuplot or fltk pipeline.
In the case of gnuplot you'll also find a octave-print-commands.log
which might help finding the problem (if it also exists with gnuplot).

Another way to find the problem is to save as ps or eps and run then gs
from the commandline without QUIET (perhaps there is also a verbose flag)

-- Andy

PS: I want to create a wiki page "debug plotting issues in octave",
would you like to help me?

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
I would be glad to help with the Wiki. Just point me in the direction.

Regarding my printing problem, fltk is the default. I tried gnuplot and although I did not get an error, the file crated (png, jpg, or tif) file created was just a white page.

I am heading back to the office for another project but will post the debug info. I did run with debug but did not get any info that looked useful to me.

Right now I have uninstalled Octave and Ghostscript and will re-install once more. Ghostscript 9.14 and Octave 3.8.0. I have clean up the path env var in case that is part of the problem,
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

tmacchant
In reply to this post by ijourneaux
----- Original Message -----

> From: ijourneaux 
> To: [hidden email]
> Cc:
> Date: 2014/6/14, Sat 21:17
> Subject: Re: Problem with Print under Octave 3.8.1 under windows
>
> After more tests, this same error occurs with all version of octave 3.6.4
> thru 3.8.2. This seems to point to an issue with ghostscript but all of my
> attempt to resolve have not worked.


Sorry if I am misleading your situation.

Is the ghostscript working 32 bit or 64 bit?
On the wiki page (http://wiki.octave.org/Octave_for_Microsoft_Windows
Octave with Visual Studio,Printing (installing Ghostscript) ), 
it is described that 


**********************************
If the 64 bit version of Ghostscript is installed, Octave will not automatically detect it. To use the 64 bit version an option telling Octave about it must be passed to the print command. For example to produce PDF output for a figure, using the 64 bit version of Ghostscript, the command below may be used.

 print -Ggswin64c.exe figure.pdf
**********************************

BTW, if you downgrade ghostscript from 9.14 to e.g. 9.10, what will happen?

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
I have two machines running 9.14 without any problems. This is a 32bit win7 computer and I am running the 32bit ghostscript.
You gave me a couple of tips to follow up on though will post when I get octave and ghostscript reinstalled.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
I have everything reinstalled but unfortunately no go. executing

print -Ggswin32c.exe -debug figure.pdf

produces

Error: /undefined in -1.#IND
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval
--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
false   1   %stopped_push   1950   1   3   %oparray_pop   1949   1   3   %oparr
ay_pop   --nostringval--   1933   1   3   %oparray_pop   1819   1   3   %oparra
y_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nost
ringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1187/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--   --dict:4
0/64(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.14: Unrecoverable error, exit code 1
---- begin C:\Users\ADMINI~1\AppData\Local\Temp\oct-3.ps ----
%!PS-Adobe-3.0
<< /Margins [0 0] /.HWMargins [0 0 0 0] /PageOffset [18 180] >> setpagedevice
%%EOF
----- end C:\Users\ADMINI~1\AppData\Local\Temp\oct-3.ps -----
Ghostscript command: 'C:\Progra~1\gs\gs9.14\bin\gswin32c.exe -dQUIET -dNOPAUSE
-dBATCH -dSAFER -sDEVICE=pdfwrite -dEmbedAllFonts=true -dOptimize=true -dEPSCro
p -sPAPERSIZE=letter -dFIXEDMEDIA -sOutputFile="figure.pdf" C:\Users\ADMINI~1\A
ppData\Local\Temp\oct-3.ps -'
fltk-pipeline: 'C:\Progra~1\gs\gs9.14\bin\gswin32c.exe -dQUIET -dNOPAUSE -dBATC
H -dSAFER -sDEVICE=pdfwrite -dEmbedAllFonts=true -dOptimize=true -dEPSCrop -sPA
PERSIZE=letter -dFIXEDMEDIA -sOutputFile="figure.pdf" C:\Users\ADMINI~1\AppData
\Local\Temp\oct-3.ps - & rm C:\Users\ADMINI~1\AppData\Local\Temp\oct-3.ps'
>>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
I tried the same thing under Gnuplot. that produces a file but the file is only a blank page.

Ian

>>  print -Ggswin32c.exe -debug figure1.pdf
---- begin C:\Users\ADMINI~1\AppData\Local\Temp\oct-9.ps ----
%!PS-Adobe-3.0
<< /Margins [0 0] /.HWMargins [0 0 0 0] /PageOffset [18 180] >> setpagedevice
%%EOF
----- end C:\Users\ADMINI~1\AppData\Local\Temp\oct-9.ps -----
Ghostscript command: 'C:\Progra~1\gs\gs9.14\bin\gswin32c.exe -dQUIET -dNOPAUSE
-dBATCH -dSAFER -sDEVICE=pdfwrite -dEmbedAllFonts=true -dOptimize=true -dEPSCro
p -sPAPERSIZE=letter -dFIXEDMEDIA -sOutputFile="figure1.pdf" C:\Users\ADMINI~1\
AppData\Local\Temp\oct-9.ps C:\Users\ADMINI~1\AppData\Local\Temp\oct-8.eps'
gnuplot-pipeline: 'C:\Progra~1\gs\gs9.14\bin\gswin32c.exe -dQUIET -dNOPAUSE -dB
ATCH -dSAFER -sDEVICE=pdfwrite -dEmbedAllFonts=true -dOptimize=true -dEPSCrop -
sPAPERSIZE=letter -dFIXEDMEDIA -sOutputFile="figure1.pdf" C:\Users\ADMINI~1\App
Data\Local\Temp\oct-9.ps C:\Users\ADMINI~1\AppData\Local\Temp\oct-8.eps & del C
:\Users\ADMINI~1\AppData\Local\Temp\oct-8.eps & rm C:\Users\ADMINI~1\AppData\Lo
cal\Temp\oct-9.ps'
>>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

Andreas Weber-4
In reply to this post by ijourneaux
Am 14.06.2014 02:09, schrieb ijourneaux:
> I started to install Octave 3.8.1 on a new computer and I am getting the
> following error message.

Is this a MXE build from http://mxeoctave.osuv.de/? If yes, have you
tried the http://mxeoctave.osuv.de/octave-gui.bat which adds /bin to PATH?

Or is this Cygwin? (Do we have 3.8.1 for MinGW and Visual Studio, I
don't know)

-- Andy

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
Andy
To narrow the problem down, I current have the MXE Octave 3.8.0-5 from mxeoctave.osuv.de installed I am actually running from within the bin dir already (for troubleshooting purposes).
Still no luck.

From teh Octave bin directory I can actually run ghostscript and process an example file correctly so the past to Ghostscript seem to be correct.

I don't know of a 3.8.1 for Mingw or Visual Studio.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

tmacchant
In reply to this post by ijourneaux
----- Original Message -----

> From: ijourneaux >
> To: help-octave
> Cc:
> Date: 2014/6/14, Sat 21:54
> Subject: Re: Problem with Print under Octave 3.8.1 under windows
>
> I would be glad to help with the Wiki. Just point me in the direction.
>
> I tried gnuplot and
> although I did not get an error, the file crated (png, jpg, or tif) file
> created was just a white page.


Perhaps this comes from postscript prologue files are not set properly in
building gnuplot.
set the environment variable GNUPLOT_PS_DIR to the directory 
in which postscript prologue files are installed.

On octave 3.8.1, it is C:\octave\Octave-3.8.1\share\PostScript.

If this operation correct the print of plot on gnuplot graphics_toolkit,
this is a bug of mxe-octave building scripts and please file to the bug tracker.

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
Tatsuro
In my 3.8.0 installation there is no Postscript folder. I copied the folder from an installaiton of 3.6.4 and set the path as required and the output to file is correct. So bug confirmed. I submitted a bug to the bug tracker.

I am still not able to print with the fltk toolkit.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

ijourneaux
After more tests, the problem is restricted the fltk. Gnuplot works as expected to any format.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Print under Octave 3.8.1 under windows

tmacchant




----- Original Message -----
> From: ijourneaux 
> To: help-octave
> Cc:
> Date: 2014/6/16, Mon 07:21
> Subject: Re: Problem with Print under Octave 3.8.1 under windows
>
> After more tests, the problem is restricted the fltk. Gnuplot works as
> expected to any format.
>
As Andy wrote previously:


Another way to find the problem is to save as ps or eps and run then gs 
from the command line without QUIET (perhaps there is also a verbose flag) 


Did you try the above already?
The command gs is to be replaced gswin32c or gswin64c on windows.

Tatsuro


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Solved: Problem with Print under Octave 3.8.1 under windows

ijourneaux

After confirming that everything worked with gnuplot on MXE octave 3.81-3.8.2, I also confirmed that the problem still occurred if I tried to using the fltk graphics toolkit. I was unable to even output to a .ps or .eps file successfully.

After reading though the  various references to the error, I noticed that someone recommended checking the graphics drivers. Although skeptical, the drivers (Intel 4000HD)were not the newest available (just the stock version delivered with the PC) so I installed the update.

After rebooting the computer, the fltk graphics toolkit  works as expected.