bugGNU Octave - Bugs: bug #55723, print -deps doesn't work with...

 
 

bug #55723: print -deps doesn't work with option -tight on Windows

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Sat 16 Feb 2019 08:18:12 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  2 - Minor
Priority:  3 - Low Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.1.0 Operating System:  * Microsoft Windows
Fixed Release:  9.1.0 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 15 Jan 2024 08:07:56 PM UTC, comment #9: 

I get the same thing on Linux, i.e., the files generated with either -tight or -loose are the same.  It might be that one needs a specific type of file to show the difference in bounding boxes. 

In any case, output is now created and it seems to match Linux so I will close this report.

Rik <rik5>
Group administrator
Mon 15 Jan 2024 10:17:25 AM UTC, comment #8: 

In Octave 9.0.1 (hg id 1c40194c7b1f), both `print -deps -tight test_tight.eps` and `print -deps -loose test_loose.eps` produce .eps files for me.

Both files are identical though (see attachment). I'm not sure if that is expected.

(file #55569, file #55570)

Markus Mützel <mmuetzel>
Group administrator
Mon 15 Jan 2024 04:53:14 AM UTC, comment #7: 

This bug is ancient.  Is it still a problem.  It was reported against Octave 5.1 and Octave 9.1 is about to be release.

Rik <rik5>
Group administrator
Fri 14 Aug 2020 11:29:44 PM UTC, comment #6: 

Is printing with option -tight still an issue on Windows?  Does this need to be updated for the 6.1 release?

Rik <rik5>
Group administrator
Tue 26 Feb 2019 11:24:23 PM UTC, comment #5: 

There is a lot of logic in print.m for constructing command pipelines on either Unixy systems or Windows systems. Part of that logic uses the " & " separator between subsequent commands on Windows systems (and the " ; " separator on Unixy systems). That shows in the debug output you pasted in comment #0.

Is that still correct on current systems? Or is the command pipeline being sent to bash even on Windows these days, and the " & " is being interpreted as a background job delimiter?

Mike Miller <mtmiller>
Group Member
Tue 19 Feb 2019 08:59:28 PM UTC, comment #4: 

It didn't work in 4.4.1 either.
So given that the default is changed to '-loose' in Octave 5, this is no longer a regression.

Markus Mützel <mmuetzel>
Group administrator
Tue 19 Feb 2019 06:41:51 PM UTC, comment #3: 

I don't get any errors on Debian with 'print -deps -tight', with either 4.4.1 or 5.0.91, and ghostscript 9.26. So is this error specific to Windows? Did 'print -deps -tight' work on Windows in 4.4.1?

Mike Miller <mtmiller>
Group Member
Sun 17 Feb 2019 11:21:31 AM UTC, comment #2: 

Printing with the loose option does indeed work. Re-titling accordingly.

This might be related to [1] where the error is suspected to be in recent versions of Ghostscript. But it already occurs for us with a quite old Ghostscript 9.16 that we bundle in the Windows installer.

Updating to a more recent version of Ghostscript (bug #55724) doesn't help either. But it avoids the part with the binary data in the error message.

Something in the interaction between Ghostscript and epstool doesn't seem to be right. Or it might be that gl2ps produces odd output.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917277

Markus Mützel <mmuetzel>
Group administrator
Sun 17 Feb 2019 01:09:56 AM UTC, comment #1: 

This may be related to the loose/tight bounding box.

Could you try


plot ([0 1]);
print -deps -loose test.epas


and see if that works?

Incidentally, I changed the default back to "-loose" for eps printing with 5.1 in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/3a10bdbe6839).

Rik <rik5>
Group administrator
Sat 16 Feb 2019 08:18:12 PM UTC, original submission:  

The following code doesn't produce any file with Octave 5.0.91:

plot ([0 1]);
print -deps test.eps


With Octave 4.4.1 this was working.

Stripping the "quiet" commands from the pipeline produced in print, I see the following:

>> plot([0 1]);
>> tmpfile = [tempname() ".eps"];
>> pipeline2 = [OCTAVE_HOME '\bin\gs.exe -dNOPAUSE -dBATCH -dSAFER -dAutoRotatePages=/None -sDEVICE=eps2write -sOutputFile="' tmpfile '" - ' tmpfile ' & '
 OCTAVE_HOME '\bin\epstool.exe --copy --bbox ' tmpfile ' ''test.eps'''];
>> drawnow ('eps', ['|' pipeline2]);
GPL Ghostscript 9.16 (2015-03-30)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusSan-Reg font from %rom%Resource/Font/NimbusSan-Reg... 4261748 2704464 2196304 875951 2 done.

DSC Information
At line 1281:
   h6m5 W;l4?rz/cpݿS3x[V߅j_~Vâj:mN@[A͒@z<.<0?[(!k1[EL FsQZ    b !

Lines in DSC documents must be shorter than 255 characters.

"gswin32c.exe"  -dNOPAUSE -dBATCH -sDEVICE=bbox   -c "<</PageSize [9400 9400] /PageOffset [3000 3000]>> setpagedevice" -f "c:\users\markus\appdata\local\te
mp\gsviewa04964"
Ghostscript failed to obtain bounding box
Failed
>>


In Octave 4.4.1 the pipeline sent to drawnow was different:

C:\Octave\OCTAVE~1.1\bin\gs.exe -dQUIET -dNOPAUSE -dBATCH -dSAFER -dAutoRotatePages=/None -sDEVIC
E=eps2write -sOutputFile=""test.eps"" -


Maybe related to bug #48689.

Markus Mützel <mmuetzel>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55570:  test_loose.eps added by mmuetzel (168KiB - application/postscript)
file #55569:  test_tight.eps added by mmuetzel (168KiB - application/postscript)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-15 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.1.0
    2024-01-15 mmuetzel Attached File- Added test_tight.eps, #55569
        Attached File- Added test_loose.eps, #55570
    2019-02-26 mtmiller Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Release5.0.91 5.1.0
        SummaryPrinting to .eps doesn't work with option -tight print -deps doesn't work with option -tight on Windows
    2019-02-19 mmuetzel Item GroupRegression Unexpected Error or Warning
    2019-02-17 mmuetzel SummaryPrinting to .eps doesn't work Printing to .eps doesn't work with option -tight
    2019-02-17 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code