Bug 696352 - gs9.18 is not compatible with gsview5.0 while zooming
Summary: gs9.18 is not compatible with gsview5.0 while zooming
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 9.18
Hardware: PC Windows 7
: P4 normal
Assignee: Ken Sharp
QA Contact: Bug traffic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-15 23:46 UTC by Marek Hycko
Modified: 2015-11-16 05:40 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Hycko 2015-11-15 23:46:01 UTC
OS: Windows 7 x64
Affected program: gsview5.0
Tested versions gs9.16, gs9.18 (for gs9.16 it works flawlessly)

A ps/pdf document opens fine in gsview5.0, but the zoom operations (-in/-out) does not work. The error message is as follows:

-------------------------------
GSview 5.0 2012-01-17
GPL Ghostscript 9.18 (2015-10-05)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Scanning PDF file
%GSVIEW_PDF_PAGES: 1 20
Displaying PDF page 1
%GSVIEW_PDF_PAGE: 1
%GSVIEW_PDF_MEDIA: [0 0 595 842]
%GSVIEW_PDF_ROTATE: 0


gsapi_init_with_args returns -13
--------------------------------

After closing the window with error message, nothing is displayed (probably crashes internally).

For older version of gs, gs9.16, zooming operations work without problems. (At least for tested documents.)

=====
For gsview6.0, which no longer depends on installed version of gs it again works without problems. (From About dialog it uses Ghostscript DLL: GPL Ghostscript GIT PRERELEASE 9.19 64 bit.)
====
Comment 1 Ken Sharp 2015-11-16 00:19:18 UTC
GSView (prior to version 5) isn't supplied by us and we don't support versions below 6.

In order for us to reproduce and fix the problem you need to :

1) Attach here an example file which will demonstrate the problem.
2) Supply a Ghostscript command line which will exhibit the bug.

If you are using some other software which exercises Ghostscript then you need to contact the maintainer of that software and then they can work with us to resolve the problem, by giving us a command line which causes the bug to occur.

GSView 5 and below were produced by Ghostgum Pty.
Comment 2 Marek Hycko 2015-11-16 00:49:17 UTC
Thank you very much for the reply. 

In my opinion, it is not necessary to upload example file(s), because it happens with any ps/pdf file you can stumble upon. The problem that I wanted to point out is "introduced" incompatibility (API change) between gs9.16 and gs9.18 for zooming operations with respect to gsview5.0.

Viewing documents via gs9.18's gswin64.exe interface works without problem (no crash), even when specifying -r option. 
----
I have also contacted the maintainer of gsview5.0.
Comment 3 Ken Sharp 2015-11-16 01:04:24 UTC
(In reply to Marek Hycko from comment #2)

> In my opinion, it is not necessary to upload example file(s), because it
> happens with any ps/pdf file you can stumble upon.

OK we *always* want a file which is known not to work, its amazing how often someone says 'oh any file fails', and it turns out that it doesn't.

If it truly fails with any file, and you didn't want to upload a file, then you could just say that you used (eg) golfer.ps from our examples folder (assuming you had checked that!).


> The problem that I wanted
> to point out is "introduced" incompatibility (API change) between gs9.16 and
> gs9.18 for zooming operations with respect to gsview5.0.

There have been no API changes in Ghostscript. However, GSView uses an awful lot of GS that isn't strictly part of the API. Ghostsgum GSView hasn't been updated in more than 5 years, so its not really entirely surprising that eventually it has drifted out of sync.

Unfortunately it is extremely difficult for us to debug GSView 5 since it doesn't (apparently) have a Visual Studio solution.


> I have also contacted the maintainer of gsview5.0.

I'll be interested if you get a response, I doubt he is interested at this point. If you can find any way to reproduce this with Ghostscript itself we will be happy to look at it further, but at the moment I'm unable to see a way for us to proceed with this.
Comment 4 Marek Hycko 2015-11-16 02:17:53 UTC
Prior, I have not tested any file from examples directory. But as I said earlier, It happens with "any" file e.g. golfer.ps, tiger.ps, escher.ps, etc.

The file opens fine, but when trying to zoom via interface of gsview5.0  it fails to display anything, the error message is aforementioned -13.

I think you are able to reproduce bug:
1) install gs9.18
2) (optionally) install gs9.16
3) install gsview5.0
4) Open gsview5.0, set the rendering gs to version 9.18
5) Select e.g. tiger.ps file from examples directory
6) Zoom in or out by clinking (+), (-) in the interface. It shows error -13.
(optionally)
7) To test older version - gs9.16
8) Select rendering gs to gs9.16
9) Open e.g. tiger.ps file from examples directory
10) Try zoom in or out, it works flawlessly.
--------------------------------------------------------------------
To close it up, the problem is probably not in ps/pdf renderer, but with interface communication between gs9.18 and gsview5.0.
--------------------------------------------------------------------
The workarounds exist:

1) for gsview5.0 use older version of gs - up to gs9.16

2) use gsview6.0 or newer with bundled gs in it. 
(This option is currently little bit unstable as I realized:
  a) when trying to open any file e.g. tiger.ps under another user, the error is "Ghostscript DLL invalid access".
  b) it fails to reopen some files, it is necessary to close the viewer and run it again (or open the file twice). 
  To reproduce:
    1.  Open e.g. doretree.ps (gs\gs9.18\examples) It views fine.
    2.  From the interface, File - Open (CTRL + O) select another file e.g. escher.ps. It says "Notice: Unknown File Type".
    3.  After closing dialog window, it shows new empty window.
    4. Now again CTRL+O (File, Open) the e.g. escher.ps and the file is opened fine.
)


----------------------------------------------------------
Comment 5 Ken Sharp 2015-11-16 02:33:15 UTC
(In reply to Marek Hycko from comment #4)
> Prior, I have not tested any file from examples directory. But as I said
> earlier, It happens with "any" file e.g. golfer.ps, tiger.ps, escher.ps, etc.

Yes but you didn't say that in your original report (comment #0), you simply said 'A ps/pdf document opens fine...' and in any event my point is that we always require an example file that we can use to reproduce the problem.


> I think you are able to reproduce bug

Only by using GSView. 

I'm sorry but we do not accept bug reports that require us to use somebody else's application to reproduce a problem. We simply have too much to do already without learning how to build and debug all the applications that use Ghostscript.

As I sad in comment #1, we need reporters to supply us with a file which demonstrates the problem (attached to the report, not a URL) and a Ghostscript command line which will demonstrate the problem with that file.

Of course we are happy to use the files from our own examples, those don't need to be attached.


> 2) use gsview6.0 or newer with bundled gs in it. 
> (This option is currently little bit unstable as I realized:
>   a) when trying to open any file e.g. tiger.ps under another user, the
> error is "Ghostscript DLL invalid access".
>   b) it fails to reopen some files, it is necessary to close the viewer and
> run it again (or open the file twice). 
>   To reproduce:
>     1.  Open e.g. doretree.ps (gs\gs9.18\examples) It views fine.
>     2.  From the interface, File - Open (CTRL + O) select another file e.g.
> escher.ps. It says "Notice: Unknown File Type".
>     3.  After closing dialog window, it shows new empty window.
>     4. Now again CTRL+O (File, Open) the e.g. escher.ps and the file is
> opened fine.
> )

If you want to raise a bug report against GSView 6 then please do, but please make it a new report, reusing old reports just leads to confusion.
Comment 6 Chris Liddell (chrisl) 2015-11-16 05:40:56 UTC
Fixed in:
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=ff617563