applet.py crashed with KeyError in _map_printer()

Bug #597612 reported by Thomas B Homburg
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: system-config-printer

I have a print job waiting with the printer name: "k'{iA..." (see attached screenshot)

ProblemType: Crash
DistroRelease: Ubuntu 10.04
Package: system-config-printer-gnome 1.2.0+20100408-0ubuntu5.2
Uname: Linux 2.6.34-020634-generic i686
Architecture: i386
Date: Wed Jun 23 11:14:08 2010
ExecutablePath: /usr/share/system-config-printer/applet.py
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
InterpreterPath: /usr/bin/python2.6
Lpstat:
 device for HP-Color-LaserJet-1600: smb://peterhomburg-pc/printer
 device for Officejet-J4500-series: ipp://192.168.0.4:631/printers/Officejet-J4500-series
 device for PDF: cups-pdf:/
Lsusb:
 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Acer, inc. TravelMate 4220
PackageArchitecture: all
Papersize: a4
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
PpdFiles:
 HP-Color-LaserJet-1600: HP Color LaserJet 1600 Foomatic/foo2hp (recommended)
 PDF: Generic CUPS-PDF Printer
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.34-020634-generic root=UUID=b89f7d6c-11f3-43e1-8e4e-d97205cddcd5 ro quiet splash
ProcCmdline: python /usr/share/system-config-printer/applet.py
ProcEnviron:
 PATH=(custom, user)
 LANG=da_DK.utf8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/system-config-printer/applet.py']
SourcePackage: system-config-printer
Title: applet.py crashed with KeyError in _map_printer()
UserGroups: adm admin cdrom dialout fuse lpadmin mythtv plugdev sambashare
dmi.bios.date: 06/23/06
dmi.bios.vendor: Acer
dmi.bios.version: v0.3122
dmi.board.name: Bodensee2
dmi.board.vendor: Acer, Inc.
dmi.board.version: Not Applicable
dmi.chassis.type: 1
dmi.chassis.vendor: , Inc.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAcer:bvrv0.3122:bd06/23/06:svnAcer,inc.:pnTravelMate4220:pvrNotApplicable:rvnAcer,Inc.:rnBodensee2:rvrNotApplicable:cvn,Inc.:ct1:cvrN/A:
dmi.product.name: TravelMate 4220
dmi.product.version: Not Applicable
dmi.sys.vendor: Acer, inc.

Revision history for this message
Thomas B Homburg (thomasbhomburg) wrote :
tags: removed: need-duplicate-check
visibility: private → public
Revision history for this message
Cesare Mastroianni (cece) wrote :

Many thanks to have open this report to public visibility. My original bug report #602160 was automatically marked as duplicate of this present one.

I would like to help in finding the bug (my goal is to have the printer working again in the shortest time as possible). Please, tell me instructions: how could I help the debugging process?

Ciao.
CM

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

Can you run the following commands in a terminal window and post the output here:

lpstat -l -o
lpstat -l -p -v

and post the output here?

After that, run

cancel -a

Can you print now?

Changed in system-config-printer (Ubuntu):
status: New → Incomplete
Revision history for this message
Cesare Mastroianni (cece) wrote :

Thanks. Here I am:

COMMAND: lpstat -l -o
OUTPUT: no output at all - nothing

COMMAND: lpstat -l -p -v
OUTPUT: la stampante hp-LaserJet-1320-series è in attesa. Abilitata da mar 06 lug 2010 09:27:33 CEST
 Modulo montato:
 Tipi di contenuto: qualsiasi
 Tipi di stampante: sconosciuti
 Descrizione: Hewlett-Packard hp LaserJet 1320 series
 Avvisi: none
 Posizione: uffcom2
 Connessione: diretta
 Interfaccia: /etc/cups/ppd/hp-LaserJet-1320-series.ppd
 In caso di fallimento: nessun avviso
 Dopo il fallimento: continua
 Utenti autorizzati:
  (tutti)
 Moduli consentiti:
  (nessuno)
 Banner richiesto
 Set di caratteri:
  (nessuno)
 Tono predefinito:
 Dimensioni predefinite pagina:
 Impostazioni predefinite porta:
dispositivo per hp-LaserJet-1320-series: hp:/usb/hp_LaserJet_1320_series?serial=00CNRW66G0LB

COMMAND: cancel -a
OUTPUT: no output at all - nothing

QUESTION: Can you print now?
ANSWER: no, I can't - the printing-queue window still claims for "printing in progress - the printer may be not connected" (I'm translating from Italian). From the control-panel interface, the "ink-level update" button leads me to the same message "the printer may be not connected".

The file /var/log/cups/error_log shows these tail lines (repeated many many times):
D [06/Jul/2010:12:31:15 +0200] [Job 1030] Error: Illegal entry in bfrange block in ToUnicode CMap

and after these lines, something more:
D [06/Jul/2010:12:31:15 +0200] [Job 1030] STATE: +connecting-to-device
D [06/Jul/2010:12:31:15 +0200] [Job 1030] prnt/backend/hp.c 745: ERROR: open device failed stat=12: hp:/usb/hp_LaserJet_1320_series?serial=00CNRW66G0LB
D [06/Jul/2010:12:31:15 +0200] [Job 1030] Backend returned status 1 (failed)
D [06/Jul/2010:12:31:15 +0200] [Job 1030] End of messages
D [06/Jul/2010:12:31:15 +0200] [Job 1030] printer-state=3(idle)
D [06/Jul/2010:12:31:15 +0200] [Job 1030] printer-state-message="/usr/lib/cups/backend/hp failed"
D [06/Jul/2010:12:31:15 +0200] [Job 1030] printer-state-reasons=none

I hope this will help You (and me as well!).

Many thanks for Your very fast reply.

Ciao
CM

Changed in system-config-printer (Ubuntu):
status: Incomplete → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Cesare Mastroianni, seems that you are also affected by bug 595650. Please perform the libusb downgrade described there. The crash of the job viewer is independent of your inability to print.

Revision history for this message
Cesare Mastroianni (cece) wrote :

Yeah!!! Printing ok after downgrading the USB driver.

Many thanks Mr. Till !!! I would not be able to discover this subtle link to that bug !!!

A big BRAVO from Italy.

As long as concerned with me, the present bug should be marked as "invalid". But I see there is another user who is affected ...

Ciao
CM

Revision history for this message
Cesare Mastroianni (cece) wrote :

Thanks You all ... after downgrading libusb driver, printer is running well.

However, when I need to access the system printers configuration applet and/or the printing queue panel, I detect often a crash from alternatively /usr/share/system-config-printer/config.py or /usr/share/system-config-printer/config.py

I tried to make a backtrace, but I'm not able to catch the PID of the process on-the-fly: when I open the panel I find the running pid with "pidof", but later the crash happens from a forked new process, and I'm not able to know its pid.

So it seems that the libusb downgrade is only part of the matter.

Sorry for my English.

Ciao
CM

Revision history for this message
Cesare Mastroianni (cece) wrote :

Since July 8th I made some tests and investigations. Here You see what I discovered:

(Please, consider here below I'm translating from Italian to English all the system messages and buttons or menu descriptions.)

1) Every time I access to the menu "system > admin > printing" I've got a crash - see for example the last event today (I attach here a TGZ archive).

2a) When I select "test print" from the control panel, I get the correct typical ubuntu test-page (grayscale images, ubuntu logo, ...).

2b) When I select "automatic test print" (I suppose this means to use the internal test page procedure of the printer), then I got an error message: "CUPS server error: an error happened during CUPS operation: <<client-error-document-format-not-supported>>

3a) When right-click on to the printer icon from the "system > admin > printing" menu, and selecting "show printing queue" I only obtain an empty window even if I select "show completed jobs". This leads always to a crash.

3b) When I click on to the printer queue icon in the notification area I obtain the real queue window, where all the running or completed jobs are displayed.

4a) The printer fails always to print some kind of documents, for instance large PDF files which include images. I saw this error log message:
/var/log/daemon.log:
Jul 14 08:44:19 uffcom2 hp[9036]: io/hpmud/musb.c 1403: unable to write data hp:/usb/hp_LaserJet_1320_series?serial=00CNRW66G0LB: 45 second io timeout

4b) I reported this event to bug #595650 - somebody supposed that my printer runs out of memory. Could it be? If yes, how to fix this problem?

Ciao
CM

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

If you are on Maverick, update system-config-printer and python-cups. I have uploaded new versions of these packages yesterday. Several bugs can be fixed by that,

1) The attached crash is in the Job Viewer, but "system > admin > printing" opens the printer setup tool. Are you sure that you selected "system > admin > printing" when getting this crash. Can you reproduce the crash and then post the output of "lpstat -l -o"? Thanks.

2b) Your printer does not support a printer-internal test page. It is a bug of system-config-printer not graying out the buttons in such a situation. Report this as a separate bug of system-config-printer.

3a) Report a separate bug on system-config-printer.

4a/b) Right-click your printer's icon in the main window of the printer setup tool ("system > admin > printing"), choose "Properties" in the pop-up menu, then click "Change" button for make and model. Leave manufacturer and model as it is currently and choose as driver "hpcups", or "Foomatic/pxlmono".

Changed in system-config-printer (Ubuntu):
status: New → Incomplete
Revision history for this message
Cesare Mastroianni (cece) wrote :

@Till: You are a real helper. Thank You a lot !!!

Re: 0) I'm on Lucid. Should I download Your new packages as "proposed" or should I move to Maverick, or what else?

Re: 1) Yes, You are right. First I open the setup tool. From its printer icon, right click and I open the job viewer. It looks empty (see 3a above). If I select menu "view > completed jobs" the crash happen even if the window doesn't close, and it seems still alive. The new crash is attached here (it happens every time I follow the step written just here setuptool->job viewer->show completed jobs). "lpstat -l -o" produces no output at all.

Re: 2) I will do a separate report. Thanks.

Re: 4a/b) No "hpcups" nor "Foomatic/pxlmono" are available here. When push "change" printer brand/type, I get a tree-way switch that propose:

i) "select printer from database" = the long list shows many brand, including HP and not including Foomatic --- if I select HP there is a long sub-listing of models, including mine (1320n) and not "hplip" - if I select my model 1320n only one driver is shown, which is "HP LaserJet 1320 HPIJS 3.10.2 [en]" which is the current driver.

ii) "Provide PPD file" = a file requester is open ... I have no PPD file to provide.

iii) "Search for a printer driver to download" = if I write the real model name, the the search tool answers "With this choice no driver download will be performed. In next steps a locally installed driver will be seleced" which later leads to the usual driver HPIJS. = if I write "HPCUPS" the search tool answers "no match found". The same for "foomatic".

Therefore I'm not able to find HPCUPS or FOOMATIC.

Thank You so far.

Ciao
CM

Changed in system-config-printer (Ubuntu):
status: Incomplete → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Cesare:

0) Take the packages from -proposed. Try also a Maverick daily live CD to see whether the problems of system-config-printer and the job viewer are solved with system-config-printer 1.2.3.

1) Tim, can you have a look into this?

2) Please post a link as soon as you have done the separate report.

4a/b) Choose the HP LaserJet 1320 (without "n") as your printer model. Use 600 dpi and not 1200 dpi as output resolution.

Revision history for this message
Cesare Mastroianni (cece) wrote :

@Till: thanks again.

0) Thanks for this hint. I will try this later (I need some more time to download, burn the cd ...)

1) The crashing procedure has been reported to bug #605448 - LaunchPad automatically marked this as a duplicate of bug #560508 --- unfortunately this bug is not accessible "Not allowed here - Sorry, you don't have permission to access this page." - is there anybody able to "open" this bug for me or for everybody?

2) Print self test page is not an issue for laserjet: the button should be disabled (grey) - see bug #510781

3) Issue #3 has been included in crash description of issue #1 into bug #605448

4a/b) Removing the "n" from the model name - the driver search includes now more options, which are:
HP LaserJet 1320 series Postiscrip [en]
HP LaserJet 1320 hpijs, 3.10.2 [en] (which is the current one)
HP LaserJet 1320 Series hpijs pcl3, 3.10.2 [en]
HP LaserJet 1320 - CUPS+Guteprint v5.2.5 Simplified [en]
HP LaserJet 1320 - CUPS+Guteprint v5.2.5 [en]
HP LaserJet 1320 Foomatic/Postscript [en]
HP LaserJet 1320 Foomatic/pxlmono [en]

According to Your instructions, I installed the last one Foomatic/pxlmono. It works with plain-text files, and also from OpenOffice, GIMP, and with two-side printing.

Then I tried to print some PDF files which showed me the problem... a disaster!!! For 6 minutes the computer became not usable (later, "uptime" command show a max load of 9). The hard-disk worked a lot, and all the applications became "gray-shadows", while the mouse moves jumping.

/var/log/Xorg.0.log reported 2 errors:
[mi] EQ overflowing. The server is probably stuck in an infinite loop.
Got unexpected buttonTimer in state 0

As soon as this problem finished (6 minutes more or less) the "data communication" LED of the printer start flashing, meaning that data is incoming. The (good) job viewer shows "work in progress" for the 1489KBytes file pending at the end of the printing queue. I wait for 10 more minutes with this LED flashing but nothing else happened. The jobviewer still display the "work in progress", the LED is still flashing, and I can't find any error in /var/log about the printer. And the document is not printed.

After this total 16 minutes I cancelled the document from the queue, but the LED of the printer still flashes, as before. I turn it off and on again to resume it normal operations.

Ciao
CM

Revision history for this message
Tim Waugh (twaugh) wrote :

Till, this looks like Red Hat bug #588409, which Jiri applied a fix upstream for a day after the report was filed, back in May.

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

The currently used source is from July 23, so it should contain the fix. So in Maverick it is fixed. If you need an SRU (Stable Release Update for Lucid, please tell).

Changed in system-config-printer (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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