Error: /typecheck in /findfont

Bug #1313223 reported by Adrian Mariano
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ghostscript (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

When searching for fonts ghostscript issues the error "Error: /typecheck in /findfont:" and aborts.

This appears to be a bug in ghostscript having to do with .woff files.

http://bugs.ghostscript.com/show_bug.cgi?id=695031

I applied the patch given above and it fixed the problem.

[Impact]

Ghostscript gets unusable when fonts which are incompatible with Ghostscript are installed. This makes printing not working for nearly all printers and displaying PostScript files gets impossible.

[Test Case]

Install a package with .woff fonts:

sudo apt-get install fonts-font-awesome

Then try to print or display PostScript files, or call Ghostscript directly:

gs file.pdf

Current Ghostscript will error and your printing or file display will not work. The proposed patch will make Ghostscript immune against the .woff fonts so that everything will work again.

[Regression Potential]

It is a small and simple patch to make Ghostscript ignore incompatible fonts. Every non-.woff font will work as before and the ,woff fonts get ignored but also are not needed by Ghostscript.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ghostscript 9.10~dfsg-0ubuntu10
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CupsErrorLog:

Date: Sat Apr 26 20:25:23 2014
InstallationDate: Installed on 2014-04-19 (7 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
Lpstat:
 device for fast: tpu://Canon/MG5300_series
 device for medium: tpu://Canon/MG5300_series
 device for photo: tpu://Canon/MG5300_series
Papersize: letter
PpdFiles:
 medium: Canon_PIXMA_MG5300series TurboPrint
 photo: Canon_PIXMA_MG5300series TurboPrint
 fast: Canon_PIXMA_MG5300series TurboPrint
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic root=UUID=438c04e7-515a-40e7-9d34-abb723b52200 ro quiet splash vt.handoff=7
SourcePackage: ghostscript
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/15/2010
dmi.bios.vendor: Intel Corp.
dmi.bios.version: BLH6710H.86A.0076.2010.1115.1959
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: DH67CL
dmi.board.vendor: Intel Corporation
dmi.board.version: AAG10212-203
dmi.chassis.type: 3
dmi.modalias: dmi:bvnIntelCorp.:bvrBLH6710H.86A.0076.2010.1115.1959:bd11/15/2010:svn:pn:pvr:rvnIntelCorporation:rnDH67CL:rvrAAG10212-203:cvn:ct3:cvr:

Revision history for this message
Adrian Mariano (avm4) wrote :
Changed in ghostscript (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.10~dfsg-0ubuntu11

---------------
ghostscript (9.10~dfsg-0ubuntu11) utopic; urgency=low

  * debian/patches/020140428-f4584b0-skip-unsupported-font-files.patch:
    When Ghostscript is scanning through available font files let it skip
    the ones which it does not understand. Before Ghostscript got totally
    blocked by having one broken or incompatible font installed
    (LP: #1313223, Upstream bug #695031).
 -- Till Kamppeter <email address hidden> Mon, 28 Apr 2014 17:28:33 +0200

Changed in ghostscript (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded a proposed fix to trusty-proposed. As soon as this package gets approved instructions will be posted here how to install it. Please install it and test whether it fixes the problem. Your feadback is required for the fixed package to get an official update.

description: updated
Changed in ghostscript (Ubuntu Trusty):
status: New → Fix Committed
milestone: none → trusty-updates
importance: Undecided → High
Changed in ghostscript (Ubuntu):
importance: Undecided → High
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Adrian, or anyone else affected,

Accepted ghostscript into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ghostscript/9.10~dfsg-0ubuntu10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Revision history for this message
Adrian Mariano (avm4) wrote :

I'm a little confused. I reverted my patch to /usr/share/ghostscript/9.10/Resource/Init/gs_fonts.ps and then I installed the proposed package, I think.

[code]
% dpkg -l | grep ghost
ii ghostscript 9.10~dfsg-0ubuntu10.1 amd64 interpreter for the PostScript language and for PDF
[/code]

But it still fails.

[code]
adrian> gs out.ps
GPL Ghostscript 9.10 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonL-Bold font from /usr/share/fonts/type1/gsfonts/n022004l.pfb... 3892772 2351788 3934520 2576164 1 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.10/Resource/Font/DejaVuSansMono.
Can't find (or can't open) font file DejaVuSansMono.
Querying operating system for font files...
Error: /typecheck in /findfont
Operand stack:
   fontdict DejaVuSansMono
Execution stack:
   %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1916 1 3 %oparray_pop 1915 1 3 %oparray_pop 1899 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1868 2 3 %oparray_pop
Dictionary stack:
   --dict:1171/1684(ro)(G)-- --dict:0/20(G)-- --dict:110/200(L)--
Current allocation mode is local
Current file position is 10735
GPL Ghostscript 9.10: Unrecoverable error, exit code 1
[/code]

When I took a look at gs_fonts.ps it appears that it is still the version I had before that did not work. In other words, it does not appear to have been patched. I reapplied the patch I used before and the patch applied, and then ghostscript started working again. So I'm not sure what's going on.

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please run the following commands:

dpkg -S gs_fonts.ps
dpkg -l | grep libgs9-common

and post the output here.

Then run

sudo apt-get update
sudo apt-get install libgs9-common

Does something get installed? Run

dpkg -l | grep libgs9-common

again.

Run

sudo apt-get install --reinstall libgs9-common

Check the file /usr/share/ghostscript/9.10/Resource/Init/gs_fonts.ps again. Is it patched now?

tags: added: verification-needed
removed: verification-failed
Revision history for this message
Adrian Mariano (avm4) wrote :

root# dpkg -S gs_fonts.ps
libgs9-common: /usr/share/ghostscript/9.10/Resource/Init/gs_fonts.ps
root# dpkg -l | grep libgs9-common
ii libgs9-common 9.10~dfsg-0ubun all interpreter for the PostScript language and f
root# dpkg -l | grep libgs9-common
ii libgs9-common 9.10~dfsg-0ubuntu10 all interpreter for the PostScript language and for PDF - common files

Looks like that's the problem. I upgraded ghostscript and it didn't install dependencies?

root# apt-get install libgs9-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgs9-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.

No change here. But:

root# apt-get install libgs9-common/trusty-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '9.10~dfsg-0ubuntu10.1' (Ubuntu:14.04/trusty-proposed [all]) for 'libgs9-common'
The following packages will be upgraded:
  libgs9-common
1 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Need to get 2,066 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-proposed/main libgs9-common all 9.10~dfsg-0ubuntu10.1 [2,066 kB]
Fetched 2,066 kB in 0s (2,571 kB/s)
(Reading database ... 361884 files and directories currently installed.)
Preparing to unpack .../libgs9-common_9.10~dfsg-0ubuntu10.1_all.deb ...
Unpacking libgs9-common (9.10~dfsg-0ubuntu10.1) over (9.10~dfsg-0ubuntu10) ...
Setting up libgs9-common (9.10~dfsg-0ubuntu10.1) ...
root# dpkg -l | grep libgs9-common
ii libgs9-common 9.10~dfsg-0ubuntu10.1 all interpreter for the PostScript language and for PDF - common files

After this the file is patched and gs finds the font.

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

Thanks for testing.

As most source packages create several binary packages I recommend to always do

sudo apt-get dist-upgrade

to get all updated binary packages after adding -proposed to verify a bug fix.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Adrian Mariano (avm4) wrote :

Why wouldn't "sudo apt-get install package" install all of the package's dependencies? I didn't want to potentially install a bunch of extra stuff from -proposed. I vaguely recall that when I upgraded ghostscript that it did in fact install some other things.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.10~dfsg-0ubuntu10.1

---------------
ghostscript (9.10~dfsg-0ubuntu10.1) trusty-proposed; urgency=low

  * debian/patches/020140428-f4584b0-skip-unsupported-font-files.patch:
    When Ghostscript is scanning through available font files let it skip
    the ones which it does not understand. Before Ghostscript got totally
    blocked by having one broken or incompatible font installed
    (LP: #1313223, Upstream bug #695031).
 -- Till Kamppeter <email address hidden> Mon, 28 Apr 2014 17:28:33 +0200

Changed in ghostscript (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ghostscript has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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.