Bug 73655 - fstobdf gives 'Floating exception' or 'Segmentation fault' on a few fonts
Summary: fstobdf gives 'Floating exception' or 'Segmentation fault' on a few fonts
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: XFree86
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-07 21:01 UTC by P Fudd
Modified: 2007-04-18 16:46 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-09-07 21:01:36 UTC
Embargoed:


Attachments (Terms of Use)

Description P Fudd 2002-09-07 21:01:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.19-rc3 i686)

Description of problem:
I'm using fstobdf to translate all fonts on my system into .bdf format (to be
used with pbmtext).  I've taken the output of 'xlsfonts' and run fstobdf on
every font it prints.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. /usr/bin/X11/fstobdf -s unix/:7100 -fn '-zz_abiword-times new
roman-bold-r-normal-medium-0-0-0-0-p-0-iso8859-1'
2. /usr/bin/X11/fstobdf -s unix/:7100 -fn
'-greek-lucidatypewriter-bold-r-normal-sans-12-1-75-75-m-89-iso8859-7'
3.
	

Actual Results:  % fstobdf -s unix/:7100 -fn '-zz_abiword-times new
roman-regular-r-normal--0-0-0-0-p-0-iso8859-1' | more
Segmentation fault
% fstobdf -s unix/:7100 -fn
'-greek-lucidatypewriter-bold-r-normal-sans-12-1-75-75-m-89-iso8859-7' | more
Floating exception
% perl ./checkallfonts
bad: -greek-lucidatypewriter-bold-r-normal-sans-12-1-75-75-m-89-iso8859-7
bad: -greek-lucidatypewriter-bold-r-normal-sans-12-1-75-75-m-89-iso8859-7
bad: -greek-lucidatypewriter-bold-r-normal-sans-14-0-75-75-m-90-iso8859-7
bad: -greek-lucidatypewriter-bold-r-normal-sans-14-0-75-75-m-90-iso8859-7
bad: -urw-chancery l-medium-i-normal--0-0-0-0-p-0-iso8859-1
bad: -urw-chancery l-medium-i-normal--0-0-0-0-p-0-iso8859-2
bad: -urw-standard symbols l-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -urw-symbol-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -urw-zapf chancery-medium-i-normal--0-0-0-0-p-0-iso8859-1
bad: -urw-zapf chancery-medium-i-normal--0-0-0-0-p-0-iso8859-2
bad: -urw-zapf dingbats-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-arial-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-arial-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-arial-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-arial-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-bookman-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-bookman-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-bookman-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-bookman-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-century schoolbook-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-century schoolbook-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-century schoolbook-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier new-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier new-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier new-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier new-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-courier-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-dingbats-bold-i-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-dingbats-bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-dingbats-regular-i-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-dingbats-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-gothi-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-gothi-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-gothi-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-gothi-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-helvetic-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-helvetic-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-helvetic-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-helvetic-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus mono-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus mono-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus mono-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus mono-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus roman-bold-i-normal-medium-0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus roman-bold-r-normal-medium-0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus roman-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus roman-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans condensed-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans condensed-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans condensed-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans condensed-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-nimbus sans-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-palladio-bold-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-palladio-bold-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-palladio-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-palladio-regular-r-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-standard symbols-bold-i-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-standard symbols-bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-standard
symbols-regular-i-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-standard
symbols-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-symbol-bold-i-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-symbol-bold-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-symbol-regular-i-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-symbol-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific
bad: -zz_abiword-times new roman-bold-i-normal-medium-0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-timesnew roman-bold-r-normal-medium-0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-times new roman-regular-i-normal--0-0-0-0-p-0-iso8859-1
bad: -zz_abiword-times new roman-regular-r-normal--0-0-0-0-p-0-iso8859-1
%

Expected Results:  I expected a couple of bdf files on the standard output.
In any event, programs shouldn't croak with segfaults or floating exceptions.
Step 1: fix the fstobdf program.
Step 2: fix any fonts that are broken, if they come with RedHat Linux.

Additional info:

Here's a perl program to check all fonts by running fstobdf on every font
reported by xlsfonts.  On my system, that's 3150 successes, 75 failures.

#!/usr/bin/perl -w
use strict;

my $XLSFONTS="/usr/bin/X11/xlsfonts";
my $FSTOBDF="/usr/bin/X11/fstobdf";

if (!-e $XLSFONTS) { die("$XLSFONTS doesn't exist!\n");}
if (!-f $XLSFONTS) { die("$XLSFONTS isn't a file!\n");}
if (!-x $XLSFONTS) { die("$XLSFONTS isn't executable!\n");}

if (!-e $FSTOBDF) { die("$FSTOBDF doesn't exist!\n");}
if (!-f $FSTOBDF) { die("$FSTOBDF isn't a file!\n");}
if (!-x $FSTOBDF) { die("$FSTOBDF isn't executable!\n");}

my @result=mybackticks($XLSFONTS);
if (@result == 0) { die("$XLSFONTS didn't list any fonts\n");}
# print join("",@result);
# exit 0;

chomp(@result);
foreach (@result) { checkfont($_);}

sub checkfont {
  my $font=$_[0];
  my @result;
  if ( -e "$font.bdf") {return;}
  @result=mybackticks($FSTOBDF,"-s","unix/:7100","-fn",$font);
  if (@result == 0) { print "bad: $font\n"; return;}
  open(OUT,">","$font.bdf") or die("$font.bdf: $!");
  print OUT @result;
  close(OUT);
  #print "good: $font\n";
}

sub mybackticks {
  my @cmd=@_;
  my @result;
  my $pid = open(KID, "-|");
  if (!defined $pid) {die("Fork failed: $!");}
  if ($pid) {           # parent
    @result=<KID>;
    close KID;
    return @result;
  } else {
    open(STDERR, "/dev/null") or die("Can't send STDERR to /dev/null: $!");
    exec(@cmd);
    die("Can't exec $cmd[0]: $!");
  }
}

Comment 1 Mike A. Harris 2002-09-08 09:12:44 UTC
This isn't really a "Red Hat" problem but rather more of a generic
XFree86.org problem.  This application is definitely not a general
purpose application, nor one that would be widely used by anyone.

Most likely only XFree86 developers themselves and a very small
number of other people use this application for development
purposes, at least from what I gather from the manpage.  I would
suspect the application could even be removed entirely and nobody
would notice.

Since the impact of this is extremely low, the likelyhood of it
being debugged/fixed by Red Hat is practically nil considering the
number of bugs that are currently open which are much more important
and relevant to a much larger portion of the userbase out there.

It is strongly recommend if this issue is important to you to get
fixed sooner rather than later, that you report it directly to
XFree86.org, where more than a single developer will see the
problem, and more likely - the author of the application will fix
it himself.

All bugs of this nature should be reported to XFree86 by posting
an email message to the xpert mailing list, the
xfree86 bug tracking list, or in this case the
fonts mailing list.

This will be the fastest path to having the problem resolved.



Note You need to log in before you can comment on or make changes to this bug.