Bug 1072244 - Third-party printer driver 'rastertoptc' failed for 'PARTNER TECH RP-31O Receipt Printer'
Third-party printer driver 'rastertoptc' failed for 'PARTNER TECH RP-31O Rece...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Printing
Current
x86-64 SUSE Other
: P1 - Urgent : Critical (vote)
: ---
Assigned To: Johannes Meixner
Johannes Meixner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-11 20:23 UTC by Ian Powell
Modified: 2017-12-15 17:45 UTC (History)
1 user (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
access_log after fresh start and the test (635 bytes, text/plain)
2017-12-15 10:34 UTC, Ian Powell
Details
error_log after fresh start and the "echo hello" to print queue test (142.81 KB, text/plain)
2017-12-15 10:35 UTC, Ian Powell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Powell 2017-12-11 20:23:59 UTC
My printer has been working for ages but suddenly from this morning it has stopped printing.
Cups admin finds and configures the printer (identifies it as a Sewoo LK-T12 but its a Partner RP320 and has been using the RP310 driver) with no problems but when i try to print it gets the message (under "State" column) "Stopped, filter failed" on the "Printers" page where is lists the jobs.  

From the error_log.

[11/Dec/2017:20:05:01 +0000] [Job 1333] PID 4050 (/usr/lib/cups/backend/usb) exited with no errors. 
[11/Dec/2017:20:05:01 +0000] [Job 1333] Error: /ioerror in --showpage--
[11/Dec/2017:20:05:01 +0000] [Job 1333] Operand stack: 
[11/Dec/2017:20:05:01 +0000] [Job 1333] (/var/spool/cups/tmp/gs_knCp7Y)   --nostringval--   1   true 
[11/Dec/2017:20:05:01 +0000] [Job 1333] Execution stack: 
[11/Dec/2017:20:05:01 +0000] [Job 1333] %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nos
tringval--   false   1   %stopped_push   1987   1   3   %oparray_pop   1986   1   3   %oparray_pop   1970   1   3   %oparray_pop   --nostringval--   --nostringval--   --nostringval--  
2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   1858   2   9   %oparray_pop   --nostringval--   --nostringval-- 
[11/Dec/2017:20:05:01 +0000] [Job 1333] Dictionary stack: 
[11/Dec/2017:20:05:01 +0000] [Job 1333] --dict:1217/1684(ro)(G)--   --dict:1/20(G)--   --dict:83/200(L)--   --dict:83/200(L)--   --dict:137/256(ro)(G)--   --dict:298/300(ro)(G)--   -
-dict:32/32(L)--   --dict:6/9(L)--   --dict:23/40(L)-- 
[11/Dec/2017:20:05:01 +0000] [Job 1333] Current allocation mode is local 
[11/Dec/2017:20:05:01 +0000] [Job 1333] Last OS error: Broken pipe 
[11/Dec/2017:20:05:01 +0000] [Job 1333] GPL Ghostscript 9.21: Unrecoverable error, exit code 1 
[11/Dec/2017:20:05:01 +0000] [Job 1333] Rendering completed

If i configure it with an incorrect driver, it prints garbage so it physically works.
Comment 1 Ian Powell 2017-12-15 10:34:46 UTC
Created attachment 753224 [details]
access_log after fresh start and the test
Comment 2 Ian Powell 2017-12-15 10:35:37 UTC
Created attachment 753226 [details]
error_log after fresh start and the "echo hello" to print queue test
Comment 3 Ian Powell 2017-12-15 10:43:13 UTC
First, the basic information.

// Printer name as per the label on the printer
Partner
Product Name: Receipt Printer
Model Name: RP-320 

// get queue name
lpstat -a
  SEWOO_LK-T12

// How is it connected
lpstat -v SEWOO_LK-T12
  device for SEWOO_LK-T12: usb://SEWOO/LK-T12

// Name of Printer Driver 
egrep 'NickName|cupsFilter' /etc/cups/ppd/SEWOO_LK-T12.ppd
  *ShortNickName: "PARTNER TECH RP-31O Receipt Printer"
  *NickName: "PARTNER TECH RP-31O Receipt Printer, 1.0"
  *cupsFilter: "application/vnd.cups-raster 100 rastertoptc"

OPENSUSE version:
  opensuse:tumbleweed:20171213 
  Qt: 5.9.3 KDE Frameworks: 5.40.0, KDE Plasma:5.11.4, kwin 5.11.4
libcupsppdc1-2.2.6-2.1.x86_64 libcupsmime1-32bit-2.2.6-2.1.x86_64
cups-filters-1.17.6-2.3.x86_64 cups-2.2.6-2.1.x86_64
cups-client-2.2.6-2.1.x86_64 libcups2-2.2.6-2.1.x86_64
libcupsmime1-2.2.6-2.1.x86_64

The printer worked immediately when first installed (about March 2017) and has been working ever since until about 3 weeks ago, I can't remember exactly when but possibly when cups was updated to 2.2.6, my first failed job for this printer according to the print queue is 29 Nov. There have been no updates to the printer driver installed by me.

I use cups on localhost:631 to manage the printer.

Now the test:

Made sure there were no jobs in the queue
Removed all files in /var/log/cups
1. Change "LogLevel" to "debug" in cupsd.conf.
2. systemctl stop cups
3. cd /var/log/cups
4. rm *
5. systemctl start cups
    5a. ls -l /var/log/cups - "error_log" created
6. Plugged in and turned on the printer
    6a. ls -l /var/log/cups - "access_log" created
7. Test to print queue
      [cli] # echo Hello | lp -d SEWOO_LK-T12
        request id is SEWOO_LK-T12-1342 (0 file(s))
    7a. This job state reported in cups/Pinters page as [stopped "Filter Failed"]
    7b. cancelled stopped job via cups/Printer

See attached for the error and access logs
Comment 4 Ian Powell 2017-12-15 10:56:06 UTC
I went back to the program i use to print to the receipt printer and printed a test file to a pdf instead of to the printer. 

I ran "gs" to validate the file - success.
[cli] # gs -r50 -dNOPAUSE -dBATCH -sDEVICE=nullpage ~/bin/test.pdf
  GPL Ghostscript 9.22 (2017-10-04)
  Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
  This software comes with NO WARRANTY: see the file PUBLIC for details.
  Processing pages 1 through 2.
  Page 1
  Page 2

I then ran "gs" to display file  - success
gs -r50 -sPAPERSIZE=a4 -dFIXEDMEDIA ~/bin/test.pdf
  GPL Ghostscript 9.22 (2017-10-04)
  Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
  This software comes with NO WARRANTY: see the file PUBLIC for details.
  Processing pages 1 through 2.
  Page 1
  >>showpage, press <return> to continue<<

  Page 2
  >>showpage, press <return> to continue<<
Comment 5 Johannes Meixner 2017-12-15 12:08:02 UTC
The CUPS error_log in your attachment #753226 [details]
contains (excerpts):
--------------------------------------------------------------------------
Started filter /usr/lib/cups/filter/texttopdf (PID 11560)
Started filter /usr/lib/cups/filter/pdftopdf (PID 11561)
Started filter /usr/lib/cups/filter/gstoraster (PID 11562)
Started filter /usr/lib/cups/filter/rastertoptc (PID 11563)
Started backend /usr/lib/cups/backend/usb (PID 11564)

SEWOO_LK-T12: error while loading shared libraries:
 libcupsimage.so.2: cannot open shared object file:
 No such file or directory

PID 11563 (/usr/lib/cups/filter/rastertoptc) stopped with status 127
 (File too large)

PID 11564 (/usr/lib/cups/backend/usb) exited with no errors.
PID 11560 (/usr/lib/cups/filter/texttopdf) exited with no errors.
PID 11561 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
PID 11562 (/usr/lib/cups/filter/gstoraster) stopped with status 1.
--------------------------------------------------------------------------

I guess the root cause is:
--------------------------------------------------------------------------
SEWOO_LK-T12: error while loading shared libraries:
 libcupsimage.so.2: cannot open shared object file:
 No such file or directory
--------------------------------------------------------------------------

In newer openSUSE Tumbleweed
/usr/lib64/libcupsimage.so.2
is provided by the libcupsimage2 RPM package.

FYI:
Those are all CUPS RPM packages in newer openSUSE Tumbleweed:
cups
cups-client
cups-config
cups-ddk
cups-devel
libcups2
libcupscgi1
libcupsimage2
libcupsmime1
libcupsppdc1

I assume some usually needed CUPS RPM packages
are not installed on your system.

In particular it seems libcupsimage2 is missing on your system.
Comment 6 Ian Powell 2017-12-15 13:36:34 UTC
I'm baffled.  The file does exist according to this:

ls -l /usr/lib64/libcupsimage.so.*
-rwxr-xr-x 1 root root 39200 Nov 16 13:28 /usr/lib64/libcupsimage.so.2


This is what is installed on my system that refers to cups
>rpm -qa | grep cups
libcupsppdc1-2.2.6-2.1.x86_64
libcupsmime1-32bit-2.2.6-2.1.x86_64
cups-filters-1.17.6-2.3.x86_64
cups-pk-helper-0.2.6-2.2.x86_64
python3-pycups-1.9.73-1.2.x86_64
libcupsimage2-2.2.6-2.1.x86_64
cups-2.2.6-2.1.x86_64
python2-pycups-1.9.73-1.2.x86_64
cups-client-2.2.6-2.1.x86_64
libcups2-2.2.6-2.1.x86_64
libcupsmime1-2.2.6-2.1.x86_64
libcupscgi1-2.2.6-2.1.x86_64
libcups2-32bit-2.2.6-2.1.x86_64
cups-config-2.2.6-2.1.x86_64
python3-cupshelpers-1.5.7-12.2.noarch

Could this some sort cups config change recently with the update that didn't apply something during its install?  I'll reinstall that package via Yast and see if it starts to work
Comment 7 Ian Powell 2017-12-15 13:51:40 UTC
Found it.
I didn;t have the libcupsimage2 32bit version installed, not sure why it needs the 32bit version.  seems to work with "lp" of a file.  I'll go and check the program i use for printing where it initially went wrong and then come back and close this bug if it works
Comment 8 Ian Powell 2017-12-15 14:15:51 UTC
Success.

Not sure how that file got lost during an update.

Thanks for the help, most appreciated
Comment 9 Ian Powell 2017-12-15 14:17:04 UTC
Closing this bug.
Comment 10 Johannes Meixner 2017-12-15 15:59:23 UTC
I assume 'rastertoptc' (i.e. that third-party printer driver)
is 32-bit software so that all libraries it needs must be 32-bit.
Comment 11 Ian Powell 2017-12-15 17:45:23 UTC
That would make sense as its an old one. But i'm not sure how it "disappeared" from the set up after working for 10 months.  I'll know where to look if it happens again.
Thanks again for the help.