Bug 516438

Summary: cannot print text files beginning with 'BM'
Product: [Fedora] Fedora Reporter: Pete Zaitcev <zaitcev>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4-0.rc1.15.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-15 08:27:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
surplus-store.txt
none
error_log
none
cupsd.conf none

Description Pete Zaitcev 2009-08-09 17:37:03 UTC
Description of problem:

After running "lpr foo.txt", file is not printed, and the following
confusing message appears in error_log:

E [09/Aug/2009:11:20:39 -0600] [Job 192] Unable to open image file for printing!

If debugging is enabled, the following is added too (see attached):

D [09/Aug/2009:11:25:39 -0600] [Job 192] Auto-typing file...
D [09/Aug/2009:11:25:39 -0600] [Job 192] Request file type is image/x-bitmap.
D [09/Aug/2009:11:25:39 -0600] [Job 192] File of type image/x-bitmap queued by "zaitcev".
.......
D [09/Aug/2009:11:25:39 -0600] [Job 192] Bad BMP dimensions 825635338x1866670135x8307
D [09/Aug/2009:11:25:39 -0600] [Job 192] Set job-printer-state-message to "Unable to open image file for printing!", current level=ERROR

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

cups-1.4-0.rc1.12.fc12.x86_64

How reproducible:

May depend on specific file (attached). Otherwise synchronous.

Steps to Reproduce:
1. lpr surplus-store.txt
  
Actual results:

Job is stuck forever

Expected results:

Printing

Additional info:

Comment 1 Pete Zaitcev 2009-08-09 17:39:02 UTC
Created attachment 356817 [details]
surplus-store.txt

Attention - this file is attached to Bugzilla as MIME type application/
octet-stream, in order to prevent any damage from text conversion.
Do not "correct" the MIME type.

Comment 2 Pete Zaitcev 2009-08-09 17:40:12 UTC
Created attachment 356818 [details]
error_log

Full and complete error_log, as generated by the GUI troubleshooter.

Comment 3 Pete Zaitcev 2009-08-09 17:41:37 UTC
Created attachment 356819 [details]
cupsd.conf

The cupsd.conf should be stock, but attaching just in case.

Comment 4 Jiri Popelka 2009-08-10 09:16:55 UTC
I experienced the same behaviour when printing (lpr, lp) this surplus-store.txt

If I create in vi editor my own test.txt file with different content and
try to print it, lpr (or lp) says
"lpr: successful-ok"
but nothing is printed.

D [10/Aug/2009:11:12:11 +0200] [Job 35] Auto-typing file...
D [10/Aug/2009:11:12:11 +0200] [Job 35] Request file type is text/plain.
D [10/Aug/2009:11:12:11 +0200] Send-Document client-error-document-format-not-supported: Unsupported format 'text/plain'!
E [10/Aug/2009:11:12:11 +0200] Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/Canon-iR-3170C-EUR) from localhost

file command says both files are ASCII text
>>>file surplus-store.txt test.txt 
surplus-store.txt: ASCII text
test.txt:         ASCII text

Comment 5 Tim Waugh 2009-08-10 09:24:04 UTC
The problem is the MIME type rule for application/x-bitmap is incorrect.  It uses '&&' instead of the correct operator '+', which means that any file beginning 'BM' gets classified as image/x-bitmap.

Jiri: the problem you're seeing with text/plain seems to be different -- could you file a separate bug report for it please?  Thanks.

Comment 6 Fedora Update System 2009-08-11 22:40:45 UTC
cups-1.4-0.rc1.15.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8133

Comment 7 Fedora Update System 2009-08-15 08:26:42 UTC
cups-1.4-0.rc1.15.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.