Anti-aliased X display mode of Ghostscript does not work, in gv anti-aliasing needs to get turned off therefore

Bug #746600 reported by jimav
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ghostscript (Ubuntu)
Fix Released
Medium
Unassigned
gv (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: ghostscript

If gv is invoked on certain PDF files, a ghostscript crash occurs. However if pdf2ps is run on the offending PDF, the resulting postscript file -can- be displayed by gv.

Attached is an example PDF which works with acroread. When fed to gv, the following appears in a pink "Ghostscript messages" window:

Error: /rangecheck in --.discardtransparencygroup--
Operand stack:
   --dict:10/19(L)--
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- GPL Ghostscript 8.71: Unrecoverable error, exit code 1
2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval--
Dictionary stack:
   --dict:1159/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:287/300(ro)(G)-- --dict:22/25(L)-- --dict:6/8(L)-- --dict:24/40(L)--
Current allocation mode is local

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ghostscript 8.71.dfsg.2-0ubuntu7
ProcVersionSignature: Ubuntu 2.6.35-28.49-generic 2.6.35.11
Uname: Linux 2.6.35-28-generic x86_64
Architecture: amd64
CupsErrorLog:

Date: Thu Mar 31 10:45:54 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
Lpstat:
 device for hp-LaserJet-3030: hp:/usb/hp_LaserJet_3030?serial=00CNBM066305
 device for hp-LaserJet-3030-Fax: hpfax:/usb/hp_LaserJet_3030?serial=00CNBM066305
MachineType: System manufacturer System Product Name
Papersize: letter
PpdFiles:
 hp-LaserJet-3030: HP LaserJet 3030 - CUPS+Gutenprint v5.2.6 Simplified
 hp-LaserJet-3030-Fax: HP Fax hpijs
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-28-generic root=UUID=0700c70a-3863-4647-b8ff-9c2173fa76dc ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: ghostscript
dmi.bios.date: 03/08/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1303
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P6T
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1303:bd03/08/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP6T:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
jimav (james-avera) wrote :
Changed in ghostscript (Ubuntu):
status: New → Confirmed
Changed in gv (Ubuntu):
status: New → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

To work around the problem turn off "Antialias" in the "State" menu and the file will display immediately. To let gv permanently start with anti-aliasing turned off, choose "gv Options" in the "State" menu, turn off "Antialias" there, "Save" and "Dismiss".

You are hitting a general problem of recent Ghostscript versions. The anti-aliased X output (output device "x11alpha") is broken and most files do not display in this mode. The workaround for now is to use the non-anti-aliased "x11" standard output device. Therefore I have already changed the defaults in Ghostscript so that a simple "gs <file>" call uses "x11" and not "x11alpha".

I have added a task for "gv" for applying the workaround to the "gv" package so that it comes with anti-aliasing turned off by default.

The problem of the non-working "x11alpha" device is already reported upstream and I hope it will be fixed soon.

summary: - Some PDFs crash with: /rangecheck in --.discardtransparencygroup
+ Anti-aliased X display mode of Ghostscript does not work, in gv anti-
+ aliasing needs to get turned off therefore
Changed in ghostscript (Ubuntu):
importance: Undecided → Medium
Changed in gv (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Markus Steinborn (upstream maintainer of GNU gv) (msteinbo) wrote :

According to some ghostscript upstream bug (I do not remember which bug it has been) reducing the value of "-dMaxBitmap" to some very small value is a good workaround, even better than disabling antialias.

This can be done in the window "State -> Ghostscript options".

Feedback to the quality of this workaround is welcome.

According to http://bugs.ghostscript.com/show_bug.cgi?id=689734 this bug has been fixed in rev 12380 of ghostscript, and indeed, using Ghostscript 9.02 + patch 12380, the example file of this bug report is working as expected. (In case you may ask how to install that ghostscript: I did not do my tests with Ubuntu.)

BTW: To disable antialias by default, the following patch will do - just in case you still decide to apply it (patching ghostscript seems to be more reasonable now that a patch is available):

diff --git a/gv/src/gv_user_res.dat b/gv/src/gv_user_res.dat
index 3d8de9c..9ea1473 100644
--- a/gv/src/gv_user_res.dat
+++ b/gv/src/gv_user_res.dat
@@ -8,7 +8,7 @@ GV.orientation: Automatic
 GV.fallbackOrientation: Portrait
 GV.swapLandscape: False
 GV.autoCenter: True
-GV.antialias: True
+GV.antialias: False
 GV.respectDSC: True
 GV.ignoreEOF: True
 GV.confirmPrint: True

I will not change the ntialias default in upstream GNU gv, as a bugfixed ghostscript is available.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fixed in Ghostscript 8.94 as it comes with Oneiric. Closing ...

Changed in ghostscript (Ubuntu):
status: Confirmed → Fix Released
Changed in gv (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.