Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108

Bug #6614 reported by Daniel Hahler
76
Affects Status Importance Assigned to Milestone
defoma (Ubuntu)
Invalid
Medium
Unassigned
ghostscript (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

As far as I can see, it's FFFF in:

                    if ($c eq 'truetype-cjk') {
                       # FIXME: need to support the sub font id for the collection.
                       print FFFF '/', $Id->{0}->[$i], ' << /FileType /TrueType /Path (', $f, ') /SubfontID ', '0', ' /CSI [(', $h[6], ') ', $hh{$h[6]}, "] >> ;\n";
                    }

It should probably be FF (from the lines above).

defoma version: 0.11.8ubuntu2

Revision history for this message
atie (atie-at-matrix) wrote :

The lines reported are from 106 ~ 109 lines of /usr/share/defoma/scripts/gs.defoma which is installed by gs-common.

Revision history for this message
Ming Hua (minghua) wrote :

Indeed. The culprit is /var/lib/defoma/scripts/gs.defoma file. Reassign to gs-common.

Matt Zimmerman (mdz)
Changed in defoma:
status: Unconfirmed → Rejected
Changed in gs-common:
assignee: nobody → doko
status: Unconfirmed → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

the proposed fix is not correct.

Revision history for this message
Ian Jackson (ijackson) wrote : A test package

# I've done some investigating and found a bit of a rats-nest,
# unfortunately. (Defoma is rather strange inside and gs.defoma reaches
# right inside Defoma's private data structures, for example.)
#
# In any case, I think I've established that:
# * This warning is generated when trying to produce a `/CID'
# value which is a character set identifier, which ought to
# consist (in this case) of a registry and a `supplement'.
# * The registry value is invented by a fixed mapping from the
# `Location' field in the hints file supplied by the font package.
# This seems wrong - at best, a guess - but I can't find any
# relevant documentation for the model so I'm not sure.
# * There is no mechanism for discovering the `supplement' (which
# indicates which version of the registry is in use). The machinery
# in gs.defoma which is intended to calculate the supplement doesn't
# work at all in my tests.
# * I have no idea at the moment how /correct/ registry and supplement
# values might be obtained.
#
# So I have produced a version of gs-common which does not attempt to
# produce a /CID setting at all. This definitely solves the warning.
# The package can be found at
# http://www.chiark.greenend.org.uk/~ian/d/
# as gs-common_0.3.9ubuntu1.0iwjtest1_all.deb (source, etc.,
# in the same directory).
#
# But it may break all users of affected CJK fonts. For a list of
# affected fonts, run
# find /var/lib/defoma/gs.d ! -name '*.ttf' ! -name '*.pfb' | xargs grep /CSI
# before installing the test version of gs-common. (Afterwards there
# will be no output.)
#
# So I would like one or two CJK users to try out this package and let
# us know if it breaks the fonts listed by the command above. If it
# doesn't then the code that I've removed was probably ill-advised. If
# it does then we need to think again.
#
# Ian.
#
# (Lines prefixed with `#' to avoid a Malone command parsing bug.)

Revision history for this message
atie (atie-at-matrix) wrote : gs-common test before installing test deb

Attached is made by the command before installing the test deb. And I can't see any output by same command after installing the test deb.

Revision history for this message
Nicolas Spalinger (yosch) wrote :

Until we find a real fix to this bug, changing FFFF to FF silences the error messages when installing/uninstalling any font package.

Revision history for this message
Ian Jackson (ijackson) wrote : Re: [Bug 6614] Re: Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108

Nicolas Spalinger writes ("[Bug 6614] Re: Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108"):
> Until we find a real fix to this bug, changing FFFF to FF silences the
> error messages when installing/uninstalling any font package.

If all you want to do is make the bug appear to go away it would be
better to comment out the offending line.

DO NOT just change FFFF to FF. The code uses FFFF and FF to refer to
_different_ files and I have no idea what sending this output to FF
(when it's not an uninitialized value) will do.

(No, I don't know why FFFF, FF and F !)

Ian.

Revision history for this message
Nicolas Spalinger (yosch) wrote :

Of course you're right, commenting out would be much better than this ugly interim measure I foolishly suggested.

However, considering the fact that pretty much every font package installation/uninstallation currently shows this warning, even for non CID fonts and the number of duplicates of this bug, maybe we should find a bypass kind of solution for truetype/opentype fonts using fontconfig.

I'm interested in fixing this bug but I'm rather puzzled by the perl bits in defoma.
We need to do more testing with CJK fonts and how they work with non-fontconfig-using apps.

Revision history for this message
Nicolas Spalinger (yosch) wrote :

Installing the cmaps-adobe-* packages gets rid of the warning. Apparently the gs.defoma file needs these maps.

Revision history for this message
Nicolas Spalinger (yosch) wrote :

the trouble is that these packages are non-free (in multiverse)

Revision history for this message
Nicolas Spalinger (yosch) wrote :

The bug is still present for font installs/uninstalls in Edgy

Revision history for this message
Nicolas Spalinger (yosch) wrote :

As suggested in #4454 simply adding a "print FFFF;" removes the warning about the uninitialized value. It doesn't seem to break CJK font lists. Can CJK font specialists test this further?

Revision history for this message
Juanjo Garcia-Ripoll (worm) wrote :

Could somebody do something about this bug? It is not only a warning. It prevents defoma from building a fonts.dir file and thus most installed fonts do not appear at all in X windows. From the log /var/log/Xorg.0.log of a fresh new installed machine

(WW) `fonts.dir' not found (or not valid) in "/var/lib/defoma/x-ttcidfont-conf.d
/dirs/TrueType".
        Entry deleted from font path.
        (Run 'mkfontdir' on "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType").

Revision history for this message
johnhedge (johnhedge) wrote :

Sorry to belabor a point but

Installing java5-fonts gives:
Setting up sun-java5-fonts (1.5.0-08-0ubuntu1) ...
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.

Running defoma-reconfigure gives:
Updating category psprint..
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.

Revision history for this message
Matthias Klose (doko) wrote :

Ian, assigning to you, as you did the analysis.

Changed in gs-common:
assignee: doko → ijackson
Revision history for this message
amadeov (amadeo3d) wrote :

I am getting the same error when I try to install the sun-java6-fonts package in Ubuntu Edgy.

My exact error message:

Setting up sun-java6-fonts (6-00-0ubuntu1~edgy1) ...
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
opendir: No such file or directory

Any ideas on how to fix this?

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

gs-common has merged into the ghostscript package now.

Ian Jackson (ijackson)
Changed in ghostscript:
assignee: ijackson → nobody
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Changed in ghostscript:
status: Confirmed → Incomplete
Revision history for this message
Eric Spierings (ericspierings) wrote : Re: [Bug 6614] Re: Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108

Hi

I haven't had any problems with this in the latest Ubuntu version 8.04

Eric

http://ericspierings.blogspot.com/

On Sat, Jul 5, 2008 at 12:42 AM, Jean-Baptiste Lallement <
<email address hidden>> wrote:

> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering is this still an issue
> for you? Can you try with latest Ubuntu release? Thanks in advance.
>
> ** Changed in: ghostscript (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma
> line 108
> https://bugs.launchpad.net/bugs/6614
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I'm closing this report due to your last comment regarding this is not reproducible anymore. If someone is still facing this issue, please re-open.

Thanks for your time.

Changed in ghostscript:
status: Incomplete → Fix Released
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.