Bug 220136 - irrelevant and incorrect error when using own PPD file
irrelevant and incorrect error when using own PPD file
Product: Fedora
Classification: Fedora
Component: system-config-printer (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
Blocks: FC6Update
  Show dependency treegraph
Reported: 2006-12-18 22:06 EST by Anthony Symons
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 0.7.45-1.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-05 18:57:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Anthony Symons 2006-12-18 22:06:15 EST
Description of problem:

When adding a local printer on lpt port, and opting to provide own ppd file
system-config-printer throws an irrelevant and incorrect error.

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

system-config-printer 0.7.40 (current fc6?)

How reproducible:

Every time

Steps to Reproduce:
1. run system-config-printer via system/administration/printing (enter root passwd)
2. pick new printer
3. pick forward
4. pick lpt port
5. pick provide PPD file and navigate to ppd and select it
6. hit forward
7. hit apply
8. observe strange "database error" error message

Actual results:

database error about generic driver (not relevant to ppd)

Expected results:

accepted ppd and working printer :)

Additional info:

See http://www.symons.net.au/system-config-printer/
for screen shots, as well as this ppd file for brother hl-2040 printer (which is
not otherwise listed, although it seems to work when configured as a brother
2400CeN Foomatic/hl1250)
Comment 1 Tim Waugh 2006-12-21 12:29:59 EST
Thanks for the detailed bug report.  There are several things going on here:

1. The error message should say 'There is a problem with the PPD file', and show
the output of 'cupstestppd' on the PPD file, because that's what has triggered
this error.

2. The libcups routine for parsing PPD files should perhaps be more lenient in
what it accepts.

3. The PPD file in question has lots of things wrong with it!
Comment 2 Tim Waugh 2006-12-22 04:20:30 EST
Please try 0.7.43-1.fc6 from updates-testing:

yum --enablerepo=updates-testing update 'system-config-printer*'

You should get a better error message.
Comment 3 Anthony Symons 2006-12-27 22:54:48 EST
Ok. I tried something slightly different first since its christmas holidays and
Im at home while this printer is on my workstation at work.

This is what I did:

1. run system-config-printer, couldnt do anything. Start cups service and set it
to auto run on reboot, ran system-config-printer again
2. hit "new printer"
3. hit forward
4. pick ipp protocol ip= (workstation at work, via vpn sharing this
printer with ipp and samba) printername=printer then forward
5. pick provide ppd, pick this same ppd file
6. "going to create new printer printer at ipp://"
click apply
7. nothing happens?
8. error observed in terminal where system-config-printer was run:
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 2490,
in on_btnNPApply_clicked
    ppd = get_PPD_but_handle_errors ()
  File "/usr/share/system-config-printer/system-config-printer.py", line 2460,
in get_PPD_but_handle_errors
    err = _('Failed to read PPD file.  Possible reason '
TypeError: not all arguments converted during string formatting

9. retest configuring on lpt1:, same lack of error in gui, and same trace info
in terminal.

Comment 4 Anthony Symons 2007-01-03 03:39:15 EST
Back at work, tried this again on FC6 workstaion here. Got this PPD error:

PPD error

Failed to read PPD file.  Possible reason follows:
/home/ant/BH2040.PPD: FAIL
      **FAIL**  Unable to open PPD file - Missing PPD-Adobe-4.x header on line 1.
                REF: Page 42, section 5.2.
        WARN    File contains a mix of CR, LF, and CR LF line endings!
        WARN    Non-Windows PPD files should use lines ending with only LF, not

Looks like a more appropriate error than originally found. 

I added a header to line 1:

*PPD-Adobe: "4.3"

Then removed the lines that had been commented out with % (should it just skip

Then loaded the PPD. It was accepted and the printer is listed.
Then when I click on the printer name of this printer, system-config-printer
crashes out with a segfault!

[root@ant ~]# system-config-printer 
Segmentation fault
[root@ant ~]# 

Should I file this under a seperate bug?
Comment 5 Anthony Symons 2007-01-03 03:49:07 EST
The PPD ive patched, which is accepted, but which causes system-config-printer
to segfault can be downloaded here:


Other possibly relevant info that may help with reproducability is that I have
this printer configured twice, both times on the same port. The first works
fine, the second (named printertest) causes the segfault. This configureation
may be relevant more than the ppd itself. If this bug is not reproducable I can
dig more deeply.
Comment 7 Tim Waugh 2007-01-03 07:51:19 EST
The segfault was in the pycups library provided by system-config-printer.  I've
fixed this in system-config-printer-0.7.45-1.fc6, which will be available
shortly in updates-testing.  Thanks for reporting it!
Comment 8 Tim Waugh 2007-01-04 11:44:01 EST
0.7.45-1.fc6 should be available now:

yum --enablerepo=updates-testing update 'system-config-printer*'
Comment 9 Anthony Symons 2007-01-04 20:03:48 EST
yes, this has fixed the crash! 

However now whenever i click off the printer to another printer, I get asked to
apply the changes (without making any changes). I say apply, then click back on
and off the new printer again, and get asked to apply changes every time...
Comment 10 Tim Waugh 2007-01-05 06:16:40 EST
This is because it's a bad PPD file.  Try playing around with cupstestppd and
you'll find lots and lots of problems with it.  For example, none of the options
use OpenUI/CloseUI, and so none of them are typed properly.  There are at least
ten missing required attributes.  It uses illegal control characters for more or
less every single option choice string.

I would recommend that you use a better PPD file.  Perhaps the one linked from
this page?: http://openprinting.org/show_printer.cgi?recnum=Brother-HL-2040
Comment 11 Fedora Update System 2007-01-05 13:21:13 EST
Fixed in update: system-config-printer-0.7.45-1.fc6

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