bugGNU Octave - Bugs: bug #57197, [MXE Octave] Printing doesn't...

 
 

bug #57197: [MXE Octave] Printing doesn't create valid files for some formats

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Sun 10 Nov 2019 09:52:22 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Fri 13 Dec 2019 09:05:47 PM UTC, comment #8: 

For windows for comment #3,

running pstoedit.exe -ssp -f fig 6-ps.ps -psarg -dNOSAFER

Does output a fig text file

John Donoghue <lostbard>
Project Member
Fri 13 Dec 2019 08:19:59 PM UTC, comment #7: 

I can confirm that EMF doesn't work for me either on linux.
We have done some work to have EMF work again on both Windows and linux, see bug #55906, so this used to work on both platforms earlier this year.
It looks like an issue upstream in pstoedit and/or ghostscript since reverting Octave to the following cset doesn't work anymore:

changeset:   26932:aa9745a1114a
branch:      stable
parent:      26928:3e6aa7c7bbbb
user:        Pantxo Diribarne <pantxo.diribarne@gmail.com>
date:        Fri Mar 15 23:41:48 2019 +0100
summary:     Feed fig2dev with PDF files converted from svg (bug #55906)

I tried to feed pstoedit with the "-psarg -dNOSAFER" option (as suggested in [1]), but still emf files look empty in libreoffice.

[1] https://sourceforge.net/p/pstoedit/patches/3/

Pantxo Diribarne <pantxo>
Project Member
Fri 13 Dec 2019 06:49:00 PM UTC, comment #6: 

Comment #5 is all about case #14 (emf) and case #15 (meta) not eps

John Donoghue <lostbard>
Project Member
Fri 13 Dec 2019 06:29:00 PM UTC, comment #5: 

Running  ubuntu 18, for case #4 (eps) and case #5 (epsc)

In Octave 6.0.0:

I see the same 0 sized files for case #14 (emf) and case #15 (meta), so at least those are not a windows only issue.

It is using the pstoedit command same as windows, and unable to redirect binary output on the pstoedit version used.

In Octave 5.1.0:

I see no files  - using pstoedit - the binary output issue

Windows also uses the pstoedit pipelines with fig2dev, but since fig2dev is just going to get an empty file, it still ends up with a 0 sized file

John Donoghue <lostbard>
Project Member
Tue 10 Dec 2019 08:49:36 PM UTC, comment #4: 

And on pstoedit, a bug report is there that matches the error we are seeing in wondows for the fig files

https://sourceforge.net/p/pstoedit/patches/3/

John Donoghue <lostbard>
Project Member
Tue 10 Dec 2019 07:06:28 PM UTC, comment #3: 

And window, fig files:

$ pstoedit.exe -ssp -f fig 6-ps.ps
pstoedit: version 3.74 / DLL interface 108 (built: Dec  9 2019 - release build -
g++ 9.2.0 - 32-bit) : Copyright (C) 1993 - 2019 Wolfgang Glunz
#FIG 3.2
Portrait
Flush left
Inches
Letter
100.00
Single
0
1200 2
running-win command line: gs.exe -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -d
NOEPS C:/Octave/OCTAVE~4.0/tmp/psin3

*** WARNING - you have selected SAFER, indicating you want Ghostscript
               to execute in a safer environment, but at the same time
               have selected DELAYBIND. Unless you use this option with
               care (and specifically, remember to call .bindnow) it is
               possible that malicious code may be able to evade the
               limited security offered by the SAFER option.

*** WARNING - you have selected SAFER, indicating you want Ghostscript
               to execute in a safer environment, but at the same time
               have selected WRITESYSTEMDICT. Unless you use this option with
               care and specifically, remember to execute code like:
                      "systemdict readonly pop"
               it is possible that malicious code may be able to evade the
               limited security offered by the SAFER option.
Error: /invalidfileaccess in --file--
Operand stack:
   false   outstream   (C:/Octave/OCTAVE~4.0/tmp/psout2)   (w)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push   1973   1   3   %oparray_pop   1972   1   3   %oparray_
pop   1960   1   3   %oparray_pop   1817   1   3   %oparray_pop   --nostringval-
-   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringv
al--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1174/1684(G)--   --dict:0/20(G)--   --dict:133/200(L)--
Current allocation mode is global
Last OS error: Permission denied
Current file position is 7885
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
Could not open file C:/Octave/OCTAVE~4.0/tmp/psout2 in grep
The interpreter seems to have failed, cannot proceed !

John Donoghue <lostbard>
Project Member
Tue 10 Dec 2019 06:46:57 PM UTC, comment #2: 

And in windows:

$ pstoedit.exe -ssp -f emf 6-ps.ps > t.emf
pstoedit: version 3.74 / DLL interface 108 (built: Dec  9 2019 - release build -
g++ 9.2.0 - 32-bit) : Copyright (C) 1993 - 2019 Wolfgang Glunz
The driver for the selected format cannot write to standard output because it writes binary data

In ubuntu 18 pstoedit version is 3.70, in windows, 3.74

John Donoghue <lostbard>
Project Member
Tue 10 Dec 2019 06:43:40 PM UTC, comment #1: 

Perhaps related: on my ubuntu 18 machine, running print coverage with octave 6, case #14 (emf) and case #15 (meta) are also empty

Running on that machine a test:

pstoedit -ssp -f emf test.ps > test.emf

where test.ps is a valid ps file, and the above command is basically the same as the pipeline I see in ubuntu, it prints an error:

The driver for the selected format cannot write to standard output because it writes binary data

John Donoghue <lostbard>
Project Member
Sun 10 Nov 2019 09:52:22 AM UTC, original submission:  

I'm re-uploading Pantxo's "print_coverage.m" script from bug #49718.
Running it on a current development version of Octave 6 (hg id d05d6eebde10) on Windows, some output formats are broken. Specifically these are:
case #4 (eps) and case #5 (epsc):
no output at all
case #14 (emf) and case #15 (meta):
empty files
case #16 (fig):
invalid content

Running the same script in Octave 5.1, the results are slightly different:
case #4 (eps) and case #5 (epsc):
valid files
case #14 (emf) and case #15 (meta):
empty files
case #16 (fig):
invalid content but different from Octave 6.0

I'm also uploading the complete content of the print_test folders.

All formats are working fine for me on Ubuntu 19.04.

Wrt the failing cases #4 and #5, Dmitri wrote in bug #49718 (comment #59 there):

> The eps file has an illegal operator "setpagedevice"
>
> See
> http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/postscript/pdfs/5002.EPSF_Spec.pdf (page 10)


and (comment #61 there):

> I wonder if this is ghostscript 9.50 getting more strict about it than 9.27.
>
> Try this link:
>
> https://web.archive.org/web/20170818010030/http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/postscript/pdfs/5002.EPSF_Spec.pdf

Markus Mützel <mmuetzel>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47827:  print_coverage.m added by mmuetzel (2KiB - application/octet-stream)
file #47828:  print_test_5.1.zip added by mmuetzel (332KiB - application/x-zip-compressed)
file #47829:  print_test_6.0.zip added by mmuetzel (202KiB - application/x-zip-compressed)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

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

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-04 mmuetzel Dependencies- => bugs #58702 is dependent
    2019-11-10 mmuetzel Attached File- => Added print_coverage.m, #47827
        Attached File- => Added print_test_5.1.zip, #47828
        Attached File- => Added print_test_6.0.zip, #47829
        Carbon-Copy- => Added pantxo
        Carbon-Copy- => Added dasergatskov

    Back to the top


    Powered by Savane 3.5