bugGNU Octave - Bugs: bug #39131, print -dFORMAT without an output...


bug #39131: print -dFORMAT without an output file crashes or confuses Octave

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Fri 31 May 2013 10:28:41 PM UTC  
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: DuplicateAssigned to: Ben Abbott <bpabbott>
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 05 Sep 2013 11:48:38 PM UTC, comment #4:

A changeset has been pushed


Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 03 Sep 2013 01:30:10 AM UTC, comment #3:

I haven't confirmed, but the problem looks to be that the "-sOutputFile=-" isn't included in the ghostscript options.


For Unix or Windows the proper pipeline would be,

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 31 Aug 2013 08:45:49 PM UTC, comment #2:

Just for reference, in the absence of a file name the result should be spooled to the system printer via lpr

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Fri 31 May 2013 10:40:25 PM UTC, comment #1:

Oops, just found this has been reported and commented on already as #38166. I have provided extra detail here that wasn't in that report.

Mike Miller <mtmiller>
Project Administrator
Fri 31 May 2013 10:28:41 PM UTC, original submission:

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:

Example 2, "print -dpng" with gnuplot:

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

Example 3, "print -deps" with fltk:

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:

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.

Mike Miller <mtmiller>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by mtmiller (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 05 Sep 2013 11:48:38 PM UTCbpabbottOpen/ClosedOpen=>Closed
    Thu 05 Sep 2013 12:31:30 AM UTCbpabbottAssigned toNone=>bpabbott
    Fri 31 May 2013 10:40:25 PM UTCmtmillerStatusNone=>Duplicate
      Dependencies-=>Depends on bugs #38166

    Back to the top

    Powered by Savane 3.1-cleanup1