octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #39131] print -dFORMAT without an output file


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #39131] print -dFORMAT without an output file crashes or confuses Octave
Date: Fri, 31 May 2013 22:28:42 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31

URL:
  <http://savannah.gnu.org/bugs/?39131>

                 Summary: print -dFORMAT without an output file crashes or
confuses Octave
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Fri 31 May 2013 06:28:41 PM EDT
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Originally reported at http://bugs.debian.org/710423

The print command fails to print to a printer when no filename is specified if
various -d options are passed to print. At the very least print should either
error on an invalid combination or just ignore and print as if no -d option
had been given. I can't say what Matlab does.

Example 1, "print -deps" with gnuplot:


plot (1:10, 1:10);
print -deps
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr
panic: Aborted -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Aborted


Example 2, "print -dpng" with gnuplot:


plot (1:10, 1:10);
print -dpng
GPL Ghostscript 9.05: **** Could not open the file  .
GPL Ghostscript 9.05: Unrecoverable error, exit code 1


... and the following is actually sent to the printer and printed as plain
text:


Error: /invalidfileaccess in --showpage--
                                         Operand stack:
                                                          1   true
                                                                  Executation
stac


Example 3, "print -deps" with fltk:


plot (1:10, 1:10);
print -deps


No error, but the contents of the EPS are dumped as text to the same terminal
that Octave is running in.

Example 4, "print -dpng" with fltk:


plot (1:10, 1:10);
print -dpng


Also no error message, but what appears to be the byte content of a PNG is
sent as text to the printer and printed, one or two lines of nonsense per
page.

I started looking at what __print_parse_opts__ does with these various
combinations of options. I assume this can be fixed in there with some logic
about whether the output filename was specified or not.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39131>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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